aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2013-02-19 14:33:13 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-02-19 14:33:13 +0100
commit97724fb418a507eea6b7c88857c1b300fd0d3515 (patch)
tree60ab953c4d361d1795682a00c7fb7d483f734f8d /tests/auto
parentb7a1d6e041d98e9fb296fb7618c5a82f5b86a442 (diff)
parent4d99e5bb809bffbbfd3fb5e6bad34afd991beb1e (diff)
Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/bic/data/QtQml.5.0.0.linux-gcc-ia32.txt5
-rw-r--r--tests/auto/quick/qquickmousearea/data/moveAndReleaseWithoutPress.qml14
-rw-r--r--tests/auto/quick/qquickmousearea/tst_qquickmousearea.cpp24
3 files changed, 38 insertions, 5 deletions
diff --git a/tests/auto/bic/data/QtQml.5.0.0.linux-gcc-ia32.txt b/tests/auto/bic/data/QtQml.5.0.0.linux-gcc-ia32.txt
index d14e0a21ff..a4af2ac5b2 100644
--- a/tests/auto/bic/data/QtQml.5.0.0.linux-gcc-ia32.txt
+++ b/tests/auto/bic/data/QtQml.5.0.0.linux-gcc-ia32.txt
@@ -2407,11 +2407,6 @@ QObjectCleanupHandler (0xb4410384) 0
QObject (0xb43870a8) 0
primary-for QObjectCleanupHandler (0xb4410384)
-Class QPointerBase
- size=8 align=4
- base size=8 base align=4
-QPointerBase (0xb43875e8) 0
-
Class QSharedMemory::QPrivateSignal
size=1 align=1
base size=0 base align=1
diff --git a/tests/auto/quick/qquickmousearea/data/moveAndReleaseWithoutPress.qml b/tests/auto/quick/qquickmousearea/data/moveAndReleaseWithoutPress.qml
new file mode 100644
index 0000000000..6c68f0c7c8
--- /dev/null
+++ b/tests/auto/quick/qquickmousearea/data/moveAndReleaseWithoutPress.qml
@@ -0,0 +1,14 @@
+import QtQuick 2.0
+
+MouseArea {
+ width: 200
+ height: 200
+
+ property bool hadMove: false
+ property bool hadRelease: false
+
+ onPressed: mouse.accepted = false
+ onPositionChanged: hadMove = true
+ onReleased: hadRelease = true
+}
+
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"