diff options
author | Mitch Curtis <mitch.curtis@qt.io> | 2020-05-27 10:22:37 +0200 |
---|---|---|
committer | Mitch Curtis <mitch.curtis@qt.io> | 2020-06-03 10:44:56 +0200 |
commit | 9dc5996de04420710cda81f91c1b4ff34ee064f2 (patch) | |
tree | e2b24fd4fddbc66927c44766ff3fc5a5101887f8 /src/quicktemplates2/qquickstackview_p_p.h | |
parent | 851fe98a0e76364d09275d0e2f391cea789ace54 (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
Change-Id: Id8bbbded39d8e58bcf0e8eedeb2dde794952333f
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
(cherry picked from commit b67cc148693de06370633cddf82a31664004e65c)
Diffstat (limited to 'src/quicktemplates2/qquickstackview_p_p.h')
-rw-r--r-- | src/quicktemplates2/qquickstackview_p_p.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/quicktemplates2/qquickstackview_p_p.h b/src/quicktemplates2/qquickstackview_p_p.h index b687561c..91f74edc 100644 --- a/src/quicktemplates2/qquickstackview_p_p.h +++ b/src/quicktemplates2/qquickstackview_p_p.h @@ -72,6 +72,7 @@ public: } void warn(const QString &error); + void warnOfInterruption(const QString &attemptedOperation); void setCurrentItem(QQuickStackElement *element); @@ -93,7 +94,7 @@ public: void depthChange(int newDepth, int oldDepth); bool busy = false; - bool removingElements = false; + bool modifyingElements = false; QString operation; QJSValue initialItem; QQuickItem *currentItem = nullptr; |