diff options
author | George Kiagiadakis <george.kiagiadakis@collabora.co.uk> | 2011-01-20 15:44:35 +0200 |
---|---|---|
committer | George Kiagiadakis <george.kiagiadakis@collabora.co.uk> | 2011-01-20 15:44:35 +0200 |
commit | 5ac3f6f9e90a1cc6493bfe3d30c4a46c9f67bf4f (patch) | |
tree | cb0828bfcfe391830b5fc44a18cd969920092b56 | |
parent | efebc95526e0ae2f99dcb0214bff0029b38a6baf (diff) |
Add hack to support glib < 2.26, as it is foolish to depend on 2.26 just for this.
-rw-r--r-- | codegen/generator.cpp | 1 | ||||
-rw-r--r-- | src/QGlib/paramspec.h | 8 |
2 files changed, 9 insertions, 0 deletions
diff --git a/codegen/generator.cpp b/codegen/generator.cpp index a109c18..08acf57 100644 --- a/codegen/generator.cpp +++ b/codegen/generator.cpp @@ -33,6 +33,7 @@ int main(int argc, char *argv[]) QCoreApplication a(argc, argv); QTextStream outStream(stdout); outStream << "// Autogenerated by the QtGStreamer helper code generator" << endl + << "#define INCLUDED_FROM_CODEGEN" << endl << "#include <boost/static_assert.hpp>" << endl << endl << "#define REGISTER_TYPE_IMPLEMENTATION(T, GTYPE) \\" << endl diff --git a/src/QGlib/paramspec.h b/src/QGlib/paramspec.h index 4a4ad43..c1a2980 100644 --- a/src/QGlib/paramspec.h +++ b/src/QGlib/paramspec.h @@ -71,4 +71,12 @@ QGLIB_REGISTER_TYPE(QGlib::ParamSpec) //codegen: GType=G_TYPE_PARAM QGLIB_REGISTER_TYPE(QGlib::ParamSpec::ParamFlags) QGLIB_REGISTER_WRAPIMPL_FOR_SUBCLASSES_OF(QGlib::ParamSpec, QGlib::Private::wrapParamSpec) +// HACK to support glib 2.24 when compiling the generated assertions of ParamFlag +// REMOVE THIS in future versions +#ifdef INCLUDED_FROM_CODEGEN +# if !GLIB_CHECK_VERSION(2,26,0) +# define G_PARAM_DEPRECATED QGlib::ParamSpec::Deprecated +# endif +#endif //CODEGEN_RUN + #endif |