diff options
author | Andrew den Exter <andrew.den-exter@nokia.com> | 2012-03-09 11:02:03 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-03-13 02:02:49 +0100 |
commit | c4e25d2cf6fe49277a37e183504990535242037f (patch) | |
tree | fd2d947bbd02ef26b643c2fb2e3ada2230660348 /src/quick/util/qquickchangeset_p.h | |
parent | be8675ab01132ffb03b81cc81842775d6a8fa3f9 (diff) |
Declare change set and compositor structs as movable primative types.
Allows QVector to avoid invoking contructors for these types
unnecessarily.
Change-Id: Icc8670e4a033c943666f907c7e1b006a3d205597
Reviewed-by: Bea Lam <bea.lam@nokia.com>
Diffstat (limited to 'src/quick/util/qquickchangeset_p.h')
-rw-r--r-- | src/quick/util/qquickchangeset_p.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/quick/util/qquickchangeset_p.h b/src/quick/util/qquickchangeset_p.h index 64179666c7..04a1e77c24 100644 --- a/src/quick/util/qquickchangeset_p.h +++ b/src/quick/util/qquickchangeset_p.h @@ -152,6 +152,11 @@ private: int m_difference; }; +Q_DECLARE_TYPEINFO(QQuickChangeSet::Change, Q_PRIMITIVE_TYPE); +Q_DECLARE_TYPEINFO(QQuickChangeSet::Remove, Q_PRIMITIVE_TYPE); +Q_DECLARE_TYPEINFO(QQuickChangeSet::Insert, Q_PRIMITIVE_TYPE); +Q_DECLARE_TYPEINFO(QQuickChangeSet::MoveKey, Q_PRIMITIVE_TYPE); + inline uint qHash(const QQuickChangeSet::MoveKey &key) { return qHash(qMakePair(key.moveId, key.offset)); } inline bool operator ==(const QQuickChangeSet::MoveKey &l, const QQuickChangeSet::MoveKey &r) { return l.moveId == r.moveId && l.offset == r.offset; } |