aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates2/qquickstackview_p_p.h
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2017-02-24 12:58:56 +0100
committerJ-P Nurmi <jpnurmi@qt.io>2017-02-24 12:14:21 +0000
commit398691d74e9a2bc944a4816ebc78d0beef780fec (patch)
treebcf9f989cec3084b0cbe005a835e4039597c4c96 /src/quicktemplates2/qquickstackview_p_p.h
parentec1f70c4c58b923ff50eb4adc36c88e5a6611281 (diff)
QQuickStackView: fix pop/replace exit leak
QQuickStackView did not keep track of the element that was exiting the view during a pop/replace exit transition, but it was expecting viewItemTransitionFinished() to be called and cleaned up the element there. If a pop/replace exit transition was running at the destruction time, QQuickStackView did not clean up the element at all (because it had been already removed from the internal stack of elements) and thus the transition was left running. Task-number: QTBUG-59034 Change-Id: I3cd7c761fab79574b9a7cc849788f36765def45b Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/quicktemplates2/qquickstackview_p_p.h')
-rw-r--r--src/quicktemplates2/qquickstackview_p_p.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/quicktemplates2/qquickstackview_p_p.h b/src/quicktemplates2/qquickstackview_p_p.h
index 39a9ba9b..ca610153 100644
--- a/src/quicktemplates2/qquickstackview_p_p.h
+++ b/src/quicktemplates2/qquickstackview_p_p.h
@@ -53,6 +53,7 @@
#include <QtQuick/private/qquickitemviewtransition_p.h>
#include <QtQuick/private/qquickitemchangelistener_p.h>
#include <QtQml/private/qv4value_p.h>
+#include <QtCore/qset.h>
QT_BEGIN_NAMESPACE
@@ -92,7 +93,8 @@ public:
bool busy;
QVariant initialItem;
QQuickItem *currentItem;
- QList<QQuickStackElement*> removals;
+ QSet<QQuickStackElement*> removing;
+ QList<QQuickStackElement*> removed;
QStack<QQuickStackElement *> elements;
QQuickItemViewTransitioner *transitioner;
};