aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/util/qquickanimatorcontroller_p.h
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar.sletta@jollamobile.com>2014-05-15 21:01:06 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-05-19 11:15:08 +0200
commit851ae1a77dc207ec11b8ed3f0786bfe1c1905e4c (patch)
tree6576f581a94851366e4481ea6994b610636f5fe0 /src/quick/util/qquickanimatorcontroller_p.h
parent8f6254a88e4c634203df779aa385d9955e91b56f (diff)
Fix crash with running animators on re-shown windows.
The non-threaded render loops would clean up the nodes for a window when it was hidden, but the animators kept running and had a reference to the deleted nodes. This was not a problem for the threaded render loop as it would wipe the animator controller as well which would clean the jobs. Fix it by triggering a reset of all nodes in the animators when the window is told to clean up. If an animator is ticked when it doesn't have a node, it will simply do nothing. When the window is made visible again, we call initialize on all animators to find the new node. Task-number: QTBUG-37995 Change-Id: Ie5609d95db29f4b2b30ca5bf641dce901e528389 Reviewed-by: Michael Brasser <michael.brasser@live.com>
Diffstat (limited to 'src/quick/util/qquickanimatorcontroller_p.h')
-rw-r--r--src/quick/util/qquickanimatorcontroller_p.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/quick/util/qquickanimatorcontroller_p.h b/src/quick/util/qquickanimatorcontroller_p.h
index 6223a9938f..745a494eec 100644
--- a/src/quick/util/qquickanimatorcontroller_p.h
+++ b/src/quick/util/qquickanimatorcontroller_p.h
@@ -76,6 +76,8 @@ public:
void lock() { m_mutex.lock(); }
void unlock() { m_mutex.unlock(); }
+ void windowNodesDestroyed();
+
public Q_SLOTS:
void itemDestroyed(QObject *);
@@ -92,6 +94,8 @@ public:
QSet<QQuickItem *> m_deletedSinceLastFrame;
QQuickWindow *m_window;
QMutex m_mutex;
+
+ bool m_nodesAreInvalid;
};
QT_END_NAMESPACE