aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates2/qquickstackview_p_p.h
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@qt.io>2020-05-27 10:22:37 +0200
committerMitch Curtis <mitch.curtis@qt.io>2020-05-29 14:07:13 +0200
commitb67cc148693de06370633cddf82a31664004e65c (patch)
treef73eba7b4318bdbd9180202949a0b3c1964e8c74 /src/quicktemplates2/qquickstackview_p_p.h
parent7640c9988f37e49e12f56be7a30ea97170922b9f (diff)
StackView: fix heap-use-after-free when pushing after clear
This patch extends the work done in aaec25a7 to cover all operations. Note also that b94889f4 does a similar thing to this patch and aaec25a7, in that it explicitly ignores operations that are done during the removal of elements. Fixes: QTBUG-84381 Pick-to: 5.15 Change-Id: Id8bbbded39d8e58bcf0e8eedeb2dde794952333f Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Diffstat (limited to 'src/quicktemplates2/qquickstackview_p_p.h')
-rw-r--r--src/quicktemplates2/qquickstackview_p_p.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/quicktemplates2/qquickstackview_p_p.h b/src/quicktemplates2/qquickstackview_p_p.h
index b76a033c71..0c64019db8 100644
--- a/src/quicktemplates2/qquickstackview_p_p.h
+++ b/src/quicktemplates2/qquickstackview_p_p.h
@@ -73,6 +73,7 @@ public:
}
void warn(const QString &error);
+ void warnOfInterruption(const QString &attemptedOperation);
void setCurrentItem(QQuickStackElement *element);
@@ -94,7 +95,7 @@ public:
void depthChange(int newDepth, int oldDepth);
bool busy = false;
- bool removingElements = false;
+ bool modifyingElements = false;
QString operation;
QJSValue initialItem;
QQuickItem *currentItem = nullptr;