diff options
Diffstat (limited to 'src/corelib/kernel/qmetatype.h')
-rw-r--r-- | src/corelib/kernel/qmetatype.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/corelib/kernel/qmetatype.h b/src/corelib/kernel/qmetatype.h index a47fbfe28d..a6c90fc3ed 100644 --- a/src/corelib/kernel/qmetatype.h +++ b/src/corelib/kernel/qmetatype.h @@ -216,7 +216,7 @@ inline Q_DECL_CONSTEXPR int qMetaTypeId(); F(QQueue) \ F(QStack) \ F(QSet) \ - F(QLinkedList) + /*end*/ #define QT_FOR_EACH_AUTOMATIC_TEMPLATE_2ARG(F) \ F(QHash, class) \ @@ -849,7 +849,7 @@ struct VariantData const uint flags; private: // copy constructor allowed to be implicit to silence level 4 warning from MSVC - VariantData &operator=(const VariantData &) Q_DECL_EQ_DELETE; + VariantData &operator=(const VariantData &) = delete; }; template<typename const_iterator> @@ -1715,12 +1715,17 @@ namespace QtPrivate { } }; + // hack to delay name lookup to instantiation time by making + // EnableInternalData a dependent name: + template <typename T> + struct EnableInternalDataWrap; + template<typename T> struct QSmartPointerConvertFunctor<QWeakPointer<T> > { QObject* operator()(const QWeakPointer<T> &p) const { - return p.data(); + return QtPrivate::EnableInternalDataWrap<T>::internalData(p); } }; } @@ -1994,7 +1999,7 @@ struct QMetaTypeId< SINGLE_ARG_TEMPLATE<T> > \ static int qt_metatype_id() \ { \ static QBasicAtomicInt metatype_id = Q_BASIC_ATOMIC_INITIALIZER(0); \ - if (const int id = metatype_id.load()) \ + if (const int id = metatype_id.loadRelaxed()) \ return id; \ const char *tName = QMetaType::typeName(qMetaTypeId<T>()); \ Q_ASSERT(tName); \ |