diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-03-13 01:01:04 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2019-03-13 10:10:09 +0100 |
commit | 76be4abbbcfb2fbb14ce532413e0895198e7f0f1 (patch) | |
tree | 5d6ca9c4425df15a93b6f74dc8e4dbb38db74d91 /tests/auto/quick/pointerhandlers/multipointtoucharea_interop/tst_multipointtoucharea_interop.cpp | |
parent | 587d789fa5929f462b5744ba33a25db6c77b36fc (diff) | |
parent | 70d726e91e4ef27002b2271805de19077e25809c (diff) |
Merge remote-tracking branch 'origin/5.12' into 5.13
Conflicts:
src/qml/compiler/qv4codegen.cpp
src/qml/animations/qsequentialanimationgroupjob.cpp
Change-Id: I8b76e509fd7c8599d4cef25181d790ee28edab54
Diffstat (limited to 'tests/auto/quick/pointerhandlers/multipointtoucharea_interop/tst_multipointtoucharea_interop.cpp')
-rw-r--r-- | tests/auto/quick/pointerhandlers/multipointtoucharea_interop/tst_multipointtoucharea_interop.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/auto/quick/pointerhandlers/multipointtoucharea_interop/tst_multipointtoucharea_interop.cpp b/tests/auto/quick/pointerhandlers/multipointtoucharea_interop/tst_multipointtoucharea_interop.cpp index b994e0fc07..bf582b820b 100644 --- a/tests/auto/quick/pointerhandlers/multipointtoucharea_interop/tst_multipointtoucharea_interop.cpp +++ b/tests/auto/quick/pointerhandlers/multipointtoucharea_interop/tst_multipointtoucharea_interop.cpp @@ -55,6 +55,7 @@ private slots: void touchDrag(); void touchesThenPinch(); + void unloadHandlerWithPassiveGrab(); private: void createView(QScopedPointer<QQuickView> &window, const char *fileName); @@ -282,6 +283,24 @@ void tst_MptaInterop::touchesThenPinch() QTRY_COMPARE(mptaReleasedSpy.count(), 1); } +void tst_MptaInterop::unloadHandlerWithPassiveGrab() +{ + QScopedPointer<QQuickView> windowPtr; + createView(windowPtr, "unloadHandlerOnPress.qml"); + QQuickView * window = windowPtr.data(); + + QPointer<QQuickPointerHandler> handler = window->rootObject()->findChild<QQuickPointerHandler*>(); + QVERIFY(handler); + QQuickMultiPointTouchArea *mpta = window->rootObject()->findChild<QQuickMultiPointTouchArea*>(); + QVERIFY(mpta); + + QPoint point(90, 90); + QTest::mousePress(window, Qt::LeftButton, 0, point); + QCOMPARE(window->mouseGrabberItem(), mpta); + QTRY_VERIFY(handler.isNull()); // it got unloaded + QTest::mouseRelease(window, Qt::LeftButton, 0, point); // QTBUG-73819: don't crash +} + QTEST_MAIN(tst_MptaInterop) #include "tst_multipointtoucharea_interop.moc" |