From ba87568655dad3e830e692109b5e571ae78b71a0 Mon Sep 17 00:00:00 2001 From: Kent Hansen Date: Mon, 2 Jul 2012 20:45:49 +0200 Subject: statemachine: Don't crash if property assignment target is deleted Do like QPropertyAnimation and store the QObject in a QPointer. Purge the assignments list upon state entry and property restore. Change-Id: I54a56885a2905178ab6aa5cf292b3d25c86b7a97 Reviewed-by: Eskil Abrahamsen Blomfeldt --- src/corelib/statemachine/qstatemachine_p.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/corelib/statemachine/qstatemachine_p.h') diff --git a/src/corelib/statemachine/qstatemachine_p.h b/src/corelib/statemachine/qstatemachine_p.h index ae5660719f..6159107dc0 100644 --- a/src/corelib/statemachine/qstatemachine_p.h +++ b/src/corelib/statemachine/qstatemachine_p.h @@ -60,6 +60,7 @@ #include #include #include +#include #include #include #include @@ -183,7 +184,7 @@ public: void cancelAllDelayedEvents(); #ifndef QT_NO_PROPERTIES - typedef QPair RestorableId; + typedef QPair, QByteArray> RestorableId; QHash registeredRestorables; void registerRestorable(QObject *object, const QByteArray &propertyName); void unregisterRestorable(QObject *object, const QByteArray &propertyName); -- cgit v1.2.3