QtCore: mark some more types as movable/primitive

These are already held in QVectors.

Change-Id: I6fe831ba5b75d792fd13e63ef0d2e178b52e1107
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Marc Mutz 2015-07-05 22:33:18 +02:00
parent 8b5cdc20be
commit a11b631752
8 changed files with 9 additions and 0 deletions

View File

@ -127,6 +127,7 @@ struct QConfFileCustomFormat
QSettings::WriteFunc writeFunc;
Qt::CaseSensitivity caseSensitivity;
};
Q_DECLARE_TYPEINFO(QConfFileCustomFormat, Q_MOVABLE_TYPE);
typedef QHash<QString, QConfFile *> ConfFileHash;
typedef QCache<QString, QConfFile> ConfFileCache;
@ -1761,6 +1762,7 @@ public:
int position;
};
Q_DECLARE_TYPEINFO(QSettingsIniKey, Q_MOVABLE_TYPE);
static bool operator<(const QSettingsIniKey &k1, const QSettingsIniKey &k2)
{

View File

@ -127,6 +127,7 @@ public:
int num;
int maxNum;
};
Q_DECLARE_TYPEINFO(QSettingsGroup, Q_MOVABLE_TYPE);
inline QString QSettingsGroup::toString() const
{

View File

@ -164,6 +164,7 @@ public:
QHash<int,QByteArray> roleNames;
static const QHash<int,QByteArray> &defaultRoleNames();
};
Q_DECLARE_TYPEINFO(QAbstractItemModelPrivate::Change, Q_MOVABLE_TYPE);
QT_END_NAMESPACE

View File

@ -116,6 +116,7 @@ public:
//! True if parse() needs to be called
bool needsParsing;
};
Q_DECLARE_TYPEINFO(QCommandLineParserPrivate::PositionalArgumentDefinition, Q_MOVABLE_TYPE);
QStringList QCommandLineParserPrivate::aliases(const QString &optionName) const
{

View File

@ -252,6 +252,7 @@ public:
Qt::TimeSpec spec; // spec if used by QDateTimeEdit
Context context;
};
Q_DECLARE_TYPEINFO(QDateTimeParser::SectionNode, Q_PRIMITIVE_TYPE);
Q_CORE_EXPORT bool operator==(const QDateTimeParser::SectionNode &s1, const QDateTimeParser::SectionNode &s2);

View File

@ -340,6 +340,7 @@ struct TCBPoint {
qFuzzyCompare(_b, other._b);
}
};
Q_DECLARE_TYPEINFO(TCBPoint, Q_PRIMITIVE_TYPE);
typedef QVector<TCBPoint> TCBPoints;

View File

@ -3306,6 +3306,7 @@ struct QStringCapture
int len;
int no;
};
Q_DECLARE_TYPEINFO(QStringCapture, Q_PRIMITIVE_TYPE);
#endif
#ifndef QT_NO_REGEXP

View File

@ -165,6 +165,7 @@ public:
protected:
QByteArray m_id;
};
Q_DECLARE_TYPEINFO(QTimeZonePrivate::Data, Q_MOVABLE_TYPE);
template<> QTimeZonePrivate *QSharedDataPointer<QTimeZonePrivate>::clone();