aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qquickimaginestyle/qquickimaginestyle.pro
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@qt.io>2019-10-01 15:09:01 +0200
committerMitch Curtis <mitch.curtis@qt.io>2019-10-02 17:25:43 +0200
commit788865b805bc91151ac8fe18bf7b92b1212ee07d (patch)
treef9f599863cfcd3e4e0598fb5cd3213e702b22daf /tests/auto/qquickimaginestyle/qquickimaginestyle.pro
parentcc3ef6cd7af09f7410e29f2fe7e403e25a2768bc (diff)
Imagine: fix crash when switching between 9-patch and regular image
Consider the following changes in source: normal.png => press.9.png => normal.png => focus.png If the last two events happen quickly, pixmapChange() can be called twice with no call to updatePaintNode() inbetween. On the first call, resetNode will be true (because ninePatch is not null since it is still in the process of going from a 9-patch image to a regular image), and on the second call, resetNode would be false if we didn't have this check. This results in the oldNode never being deleted, and QQuickImage tries to static_cast a QQuickNinePatchImage to a QSGInternalImageNode. Only change resetNode when it's false; i.e. when no reset is pending. updatePaintNode() will take care of setting it to false if it's true. Change-Id: I614c172c3e24fda2506f081f8fcdb6acd1c65fb8 Fixes: QTBUG-78790 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Diffstat (limited to 'tests/auto/qquickimaginestyle/qquickimaginestyle.pro')
-rw-r--r--tests/auto/qquickimaginestyle/qquickimaginestyle.pro4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/auto/qquickimaginestyle/qquickimaginestyle.pro b/tests/auto/qquickimaginestyle/qquickimaginestyle.pro
index c421f2dc..4b1a309a 100644
--- a/tests/auto/qquickimaginestyle/qquickimaginestyle.pro
+++ b/tests/auto/qquickimaginestyle/qquickimaginestyle.pro
@@ -7,7 +7,9 @@ SOURCES += \
RESOURCES += \
$$PWD/qtquickcontrols2.conf \
- $$PWD/control-assets/button-background.9.png
+ $$PWD/control-assets/button-background.9.png \
+ $$PWD/test-assets/button-background-1.png \
+ $$PWD/test-assets/button-background-2.png
OTHER_FILES += \
$$PWD/data/*.qml