From f526aa725d968569850f112ecfb63e683f2c2ada Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Wed, 22 Feb 2017 11:58:43 +0000 Subject: [PATCH] Sprinkle Q_DECLARE_TYPEINFO on types used in containers Change-Id: I6c71ed8c20cd5e785037ad25c2d3da8994e8e3a0 Reviewed-by: Thiago Macieira --- src/corelib/io/qsettings.cpp | 2 ++ src/corelib/io/qsettings_p.h | 2 ++ src/corelib/kernel/qabstracteventdispatcher.h | 2 ++ src/corelib/kernel/qcore_unix_p.h | 2 ++ src/corelib/kernel/qobject_p.h | 1 + src/corelib/thread/qresultstore.h | 2 ++ src/corelib/tools/qringbuffer_p.h | 2 ++ 7 files changed, 13 insertions(+) diff --git a/src/corelib/io/qsettings.cpp b/src/corelib/io/qsettings.cpp index 16dab38a60..24fa00c4d9 100644 --- a/src/corelib/io/qsettings.cpp +++ b/src/corelib/io/qsettings.cpp @@ -1802,6 +1802,8 @@ struct QSettingsIniSection inline QSettingsIniSection() : position(-1) {} }; +Q_DECLARE_TYPEINFO(QSettingsIniSection, Q_MOVABLE_TYPE); + typedef QMap IniMap; /* diff --git a/src/corelib/io/qsettings_p.h b/src/corelib/io/qsettings_p.h index 639605d8c4..d8e91e48ce 100644 --- a/src/corelib/io/qsettings_p.h +++ b/src/corelib/io/qsettings_p.h @@ -109,6 +109,8 @@ private: }; #endif +Q_DECLARE_TYPEINFO(QSettingsKey, Q_MOVABLE_TYPE); + typedef QMap UnparsedSettingsMap; typedef QMap ParsedSettingsMap; diff --git a/src/corelib/kernel/qabstracteventdispatcher.h b/src/corelib/kernel/qabstracteventdispatcher.h index 68d9bf180f..961148d9ec 100644 --- a/src/corelib/kernel/qabstracteventdispatcher.h +++ b/src/corelib/kernel/qabstracteventdispatcher.h @@ -124,6 +124,8 @@ protected: QObject *parent); }; +Q_DECLARE_TYPEINFO(QAbstractEventDispatcher::TimerInfo, (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) ? Q_PRIMITIVE_TYPE : Q_RELOCATABLE_TYPE)); + QT_END_NAMESPACE #endif // QABSTRACTEVENTDISPATCHER_H diff --git a/src/corelib/kernel/qcore_unix_p.h b/src/corelib/kernel/qcore_unix_p.h index 80058d9115..63b45d7f89 100644 --- a/src/corelib/kernel/qcore_unix_p.h +++ b/src/corelib/kernel/qcore_unix_p.h @@ -103,6 +103,8 @@ struct sockaddr; QT_BEGIN_NAMESPACE +Q_DECLARE_TYPEINFO(pollfd, Q_PRIMITIVE_TYPE); + // Internal operator functions for timespecs inline timespec &normalizedTimespec(timespec &t) { diff --git a/src/corelib/kernel/qobject_p.h b/src/corelib/kernel/qobject_p.h index a7d7ef0889..2bdaffb465 100644 --- a/src/corelib/kernel/qobject_p.h +++ b/src/corelib/kernel/qobject_p.h @@ -243,6 +243,7 @@ public: QAtomicPointer sharedRefcount; }; +Q_DECLARE_TYPEINFO(QObjectPrivate::ConnectionList, Q_MOVABLE_TYPE); /*! \internal diff --git a/src/corelib/thread/qresultstore.h b/src/corelib/thread/qresultstore.h index 56cfcb6ed6..fa6907dde2 100644 --- a/src/corelib/thread/qresultstore.h +++ b/src/corelib/thread/qresultstore.h @@ -228,6 +228,8 @@ public: } // namespace QtPrivate +Q_DECLARE_TYPEINFO(QtPrivate::ResultItem, Q_PRIMITIVE_TYPE); + #endif //Q_QDOC QT_END_NAMESPACE diff --git a/src/corelib/tools/qringbuffer_p.h b/src/corelib/tools/qringbuffer_p.h index 325b71f267..558a456515 100644 --- a/src/corelib/tools/qringbuffer_p.h +++ b/src/corelib/tools/qringbuffer_p.h @@ -159,6 +159,8 @@ private: qint64 bufferSize; }; +Q_DECLARE_TYPEINFO(QRingBuffer, Q_MOVABLE_TYPE); + QT_END_NAMESPACE #endif // QRINGBUFFER_P_H