diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2013-02-18 16:07:54 +0100 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2013-02-18 16:07:55 +0100 |
commit | 4d99e5bb809bffbbfd3fb5e6bad34afd991beb1e (patch) | |
tree | 8d3ac63676dc90361bf561ce1eb052fd7229dc26 /tests | |
parent | 4d3a64c5e65a781acb4acf4ba641456da28bd1e4 (diff) | |
parent | 7726da293c4e54aedb1ef69138f168d59692c1e8 (diff) |
Merge remote-tracking branch 'origin/stable' into dev
Change-Id: I33db683ebf12248b2ed14eeaf65c4bcade14bfbf
Diffstat (limited to 'tests')
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" |