diff options
author | Mitch Curtis <mitch.curtis@qt.io> | 2020-05-27 10:22:37 +0200 |
---|---|---|
committer | Mitch Curtis <mitch.curtis@qt.io> | 2020-05-29 14:07:13 +0200 |
commit | b67cc148693de06370633cddf82a31664004e65c (patch) | |
tree | f73eba7b4318bdbd9180202949a0b3c1964e8c74 /src/quicktemplates2/qquickstackview_p.cpp | |
parent | 7640c9988f37e49e12f56be7a30ea97170922b9f (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.cpp')
-rw-r--r-- | src/quicktemplates2/qquickstackview_p.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/quicktemplates2/qquickstackview_p.cpp b/src/quicktemplates2/qquickstackview_p.cpp index 1655ff36..ce81a929 100644 --- a/src/quicktemplates2/qquickstackview_p.cpp +++ b/src/quicktemplates2/qquickstackview_p.cpp @@ -56,6 +56,12 @@ void QQuickStackViewPrivate::warn(const QString &error) qmlWarning(q) << operation << ": " << error; } +void QQuickStackViewPrivate::warnOfInterruption(const QString &attemptedOperation) +{ + Q_Q(QQuickStackView); + qmlWarning(q) << "cannot " << attemptedOperation << " while already in the process of completing a " << operation; +} + void QQuickStackViewPrivate::setCurrentItem(QQuickStackElement *element) { Q_Q(QQuickStackView); |