diff options
author | Shane Kearns <shane.kearns@sosco.com> | 2009-09-16 07:10:34 (GMT) |
---|---|---|
committer | Shane Kearns <shane.kearns@sosco.com> | 2009-09-16 07:13:33 (GMT) |
commit | 314e5680c8276d539b596927874036a873966d8f (patch) | |
tree | 0a444173e25581ccd9f81605f1dbede77d679f99 /src | |
parent | dc1f76eb8a577aaa4a8342f5444b62a339d405cf (diff) | |
download | Qt-314e5680c8276d539b596927874036a873966d8f.zip Qt-314e5680c8276d539b596927874036a873966d8f.tar.gz Qt-314e5680c8276d539b596927874036a873966d8f.tar.bz2 |
Hide getStaticMetaObject() on platforms without Q_NO_DATA_RELOCATION
getStaticMetaObject() is a workaround for linkage problems on symbian
platform, so it does not exist on other platforms.
This change makes the forward declaration inside Q_OBJECT only present
when Q_NO_DATA_RELOCATION is defined
Reviewed-by: axis
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/kernel/qobjectdefs.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/corelib/kernel/qobjectdefs.h b/src/corelib/kernel/qobjectdefs.h index 63502cc..6a9cead 100644 --- a/src/corelib/kernel/qobjectdefs.h +++ b/src/corelib/kernel/qobjectdefs.h @@ -145,12 +145,18 @@ template <typename T1, typename T2> inline void qYouForgotTheQ_OBJECT_Macro(T1, T2) {} #endif // QT_NO_MEMBER_TEMPLATES +#ifdef Q_NO_DATA_RELOCATION +#define Q_OBJECT_GETSTATICMETAOBJECT static const QMetaObject &getStaticMetaObject(); +#else +#define Q_OBJECT_GETSTATICMETAOBJECT +#endif + /* tmake ignore Q_OBJECT */ #define Q_OBJECT \ public: \ Q_OBJECT_CHECK \ static const QMetaObject staticMetaObject; \ - static const QMetaObject &getStaticMetaObject(); \ + Q_OBJECT_GETSTATICMETAOBJECT \ virtual const QMetaObject *metaObject() const; \ virtual void *qt_metacast(const char *); \ QT_TR_FUNCTIONS \ @@ -162,7 +168,7 @@ private: #define Q_GADGET \ public: \ static const QMetaObject staticMetaObject; \ - static const QMetaObject &getStaticMetaObject(); \ + Q_OBJECT_GETSTATICMETAOBJECT \ private: #else // Q_MOC_RUN #define slots slots |