diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2015-06-14 01:54:13 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2015-07-13 10:36:28 +0000 |
commit | a89c62c17d9c7db6548616789c7b20759680e6a0 (patch) | |
tree | 6bfd7e907413d9d7a8549b8b60bda1d1bb0e8e9e /src/corelib/statemachine/qstate_p.h | |
parent | fa4b57e8c5a82cb1e16c44a3c170850cb6bb6f24 (diff) |
QStateMachinePrivate: replace an inefficient QList with QVector
QPropertyAssignment is larger as a void*, and wasn't marked as
movable, so QList<QPropertyAssignment> is horribly inefficient.
Fix by marking it movable and using a QVector.
Change-Id: I34e21e3f28f64dd8b187c144fb5bee022414216b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'src/corelib/statemachine/qstate_p.h')
-rw-r--r-- | src/corelib/statemachine/qstate_p.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/corelib/statemachine/qstate_p.h b/src/corelib/statemachine/qstate_p.h index 2ce0c13522..3b8dae9499 100644 --- a/src/corelib/statemachine/qstate_p.h +++ b/src/corelib/statemachine/qstate_p.h @@ -75,6 +75,7 @@ struct QPropertyAssignment QVariant value; bool explicitlySet; // false means the property is being restored to its old value }; +Q_DECLARE_TYPEINFO(QPropertyAssignment, Q_MOVABLE_TYPE); #endif // QT_NO_PROPERTIES @@ -108,7 +109,7 @@ public: mutable QList<QAbstractTransition*> transitionsList; #ifndef QT_NO_PROPERTIES - QList<QPropertyAssignment> propertyAssignments; + QVector<QPropertyAssignment> propertyAssignments; #endif }; |