summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel
diff options
context:
space:
mode:
authorRohan McGovern <rohan.mcgovern@nokia.com>2010-09-16 00:31:26 (GMT)
committerRohan McGovern <rohan.mcgovern@nokia.com>2010-09-16 01:04:55 (GMT)
commite40ea467df17d2cff1ca51c7b02a31962a5a1622 (patch)
tree9db7b391cb944211cc2ca30ceabeb6e37054644f /src/corelib/kernel
parentab31c1a482630007eccd532b49e03f0345421aa8 (diff)
downloadQt-e40ea467df17d2cff1ca51c7b02a31962a5a1622.zip
Qt-e40ea467df17d2cff1ca51c7b02a31962a5a1622.tar.gz
Qt-e40ea467df17d2cff1ca51c7b02a31962a5a1622.tar.bz2
Fixed Q_DECLARE_METATYPE for aix-xlc
XLC needs to see the full declaration of these classes to use them in templates, where other compilers are satisfied with a forward declaration. Reviewed-by: Kevin Wu Won
Diffstat (limited to 'src/corelib/kernel')
-rw-r--r--src/corelib/kernel/qmetatype.h26
1 files changed, 12 insertions, 14 deletions
diff --git a/src/corelib/kernel/qmetatype.h b/src/corelib/kernel/qmetatype.h
index 2108b92..e16ffe8 100644
--- a/src/corelib/kernel/qmetatype.h
+++ b/src/corelib/kernel/qmetatype.h
@@ -156,7 +156,18 @@ void qMetaTypeLoadHelper(QDataStream &stream, T *t)
}
#endif // QT_NO_DATASTREAM
-template <typename T> struct QMetaTypeId2;
+template <typename T>
+struct QMetaTypeId
+{
+ enum { Defined = 0 };
+};
+
+template <typename T>
+struct QMetaTypeId2
+{
+ enum { Defined = QMetaTypeId<T>::Defined };
+ static inline int qt_metatype_id() { return QMetaTypeId<T>::qt_metatype_id(); }
+};
namespace QtPrivate {
template <typename T, bool Defined = QMetaTypeId2<T>::Defined>
@@ -210,19 +221,6 @@ void qRegisterMetaTypeStreamOperators(const char *typeName
#endif // QT_NO_DATASTREAM
template <typename T>
-struct QMetaTypeId
-{
- enum { Defined = 0 };
-};
-
-template <typename T>
-struct QMetaTypeId2
-{
- enum { Defined = QMetaTypeId<T>::Defined };
- static inline int qt_metatype_id() { return QMetaTypeId<T>::qt_metatype_id(); }
-};
-
-template <typename T>
inline int qMetaTypeId(
#ifndef qdoc
T * /* dummy */ = 0