aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquickmousearea/tst_qquickmousearea.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/quick/qquickmousearea/tst_qquickmousearea.cpp')
-rw-r--r--tests/auto/quick/qquickmousearea/tst_qquickmousearea.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/auto/quick/qquickmousearea/tst_qquickmousearea.cpp b/tests/auto/quick/qquickmousearea/tst_qquickmousearea.cpp
index ffe7b51537..37ce0fd394 100644
--- a/tests/auto/quick/qquickmousearea/tst_qquickmousearea.cpp
+++ b/tests/auto/quick/qquickmousearea/tst_qquickmousearea.cpp
@@ -88,6 +88,7 @@ private slots:
#ifndef QT_NO_CURSOR
void cursorShape();
#endif
+ void moveAndReleaseWithoutPress();
private:
void acceptedButton_data();
@@ -1402,6 +1403,29 @@ void tst_QQuickMouseArea::cursorShape()
}
#endif
+void tst_QQuickMouseArea::moveAndReleaseWithoutPress()
+{
+ QQuickView *window = createView();
+
+ window->setSource(testFileUrl("moveAndReleaseWithoutPress.qml"));
+ window->show();
+ window->requestActivate();
+ QVERIFY(QTest::qWaitForWindowExposed(window));
+
+ QObject *root = window->rootObject();
+ QVERIFY(root);
+
+ QTest::mousePress(window, Qt::LeftButton, 0, QPoint(100,100));
+
+ QTest::mouseMove(window, QPoint(110,110), 50);
+ QTRY_COMPARE(root->property("hadMove").toBool(), false);
+
+ QTest::mouseRelease(window, Qt::LeftButton, 0, QPoint(110,110));
+ QTRY_COMPARE(root->property("hadRelease").toBool(), false);
+
+ delete window;
+}
+
QTEST_MAIN(tst_QQuickMouseArea)
#include "tst_qquickmousearea.moc"