diff options
Diffstat (limited to 'src/corelib/global/qtypeinfo.h')
-rw-r--r-- | src/corelib/global/qtypeinfo.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/corelib/global/qtypeinfo.h b/src/corelib/global/qtypeinfo.h index 6297b35b9c..1c08bbe1cf 100644 --- a/src/corelib/global/qtypeinfo.h +++ b/src/corelib/global/qtypeinfo.h @@ -49,15 +49,12 @@ QT_BEGIN_NAMESPACE /* QTypeInfo - type trait functionality - qIsDetached - data sharing functionality */ /* The catch-all template. */ -template <typename T> inline bool qIsDetached(T &) { return true; } - template <typename T> class QTypeInfo { @@ -161,6 +158,10 @@ public: \ template<> \ Q_DECLARE_TYPEINFO_BODY(TYPE, FLAGS) +/* Specialize QTypeInfo for QFlags<T> */ +template<typename T> class QFlags; +template<typename T> +Q_DECLARE_TYPEINFO_BODY(QFlags<T>, Q_PRIMITIVE_TYPE); /* Specialize a shared type with: @@ -184,7 +185,6 @@ QT_BEGIN_NAMESPACE #endif #define Q_DECLARE_SHARED(TYPE) \ -template <> inline bool qIsDetached<TYPE>(TYPE &t) { return t.isDetached(); } \ template <> inline void qSwap<TYPE>(TYPE &value1, TYPE &value2) \ { qSwap(value1.data_ptr(), value2.data_ptr()); } \ Q_DECLARE_SHARED_STL(TYPE) |