diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2013-03-14 09:30:12 +0100 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2013-03-14 09:30:12 +0100 |
commit | 11484c7f64b5942994a1d1a07f4e7f4d86e94e83 (patch) | |
tree | f0c901d1d15d0bcb8ce572a04b094e510cd86ddd /tests/auto/quick/qquickflickable | |
parent | a1a7679028eda395d74cd1247a8c3ed46ac3bef1 (diff) | |
parent | b58953fae3dc80c52e846d2d87856dd20b8986ab (diff) |
Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
tests/auto/qml/debugger/qv8profilerservice/qv8profilerservice.pro
Change-Id: I2fd99ed8bd03302b9bbf31e6f21990f6455c4f1c
Diffstat (limited to 'tests/auto/quick/qquickflickable')
-rw-r--r-- | tests/auto/quick/qquickflickable/data/flickable03.qml | 14 | ||||
-rw-r--r-- | tests/auto/quick/qquickflickable/tst_qquickflickable.cpp | 8 |
2 files changed, 22 insertions, 0 deletions
diff --git a/tests/auto/quick/qquickflickable/data/flickable03.qml b/tests/auto/quick/qquickflickable/data/flickable03.qml index a3e9d6fd59..1549034576 100644 --- a/tests/auto/quick/qquickflickable/data/flickable03.qml +++ b/tests/auto/quick/qquickflickable/data/flickable03.qml @@ -1,9 +1,23 @@ import QtQuick 2.0 Flickable { + property bool movingInContentX: true + property bool movingInContentY: true + property bool draggingInContentX: true + property bool draggingInContentY: true + width: 100; height: 400 contentWidth: column.width; contentHeight: column.height + onContentXChanged: { + movingInContentX = movingInContentX && movingHorizontally + draggingInContentX = draggingInContentX && draggingHorizontally + } + onContentYChanged: { + movingInContentY = movingInContentY && movingVertically + draggingInContentY = draggingInContentY && draggingVertically + } + Column { id: column Repeater { diff --git a/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp b/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp index d643f91366..3575dfa012 100644 --- a/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp +++ b/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp @@ -640,6 +640,9 @@ void tst_qquickflickable::movingAndFlicking() QVERIFY(flickable->isFlicking()); QCOMPARE(flickable->isFlickingHorizontally(), horizontalEnabled); QCOMPARE(flickable->isFlickingVertically(), verticalEnabled); + // contentX/contentY are either unchanged, or moving is true when the value changed. + QCOMPARE(flickable->property("movingInContentX").value<bool>(), true); + QCOMPARE(flickable->property("movingInContentY").value<bool>(), true); QCOMPARE(moveSpy.count(), 1); QCOMPARE(vMoveSpy.count(), verticalEnabled ? 1 : 0); @@ -800,6 +803,11 @@ void tst_qquickflickable::movingAndDragging() QVERIFY(flickable->isDragging()); QCOMPARE(flickable->isDraggingHorizontally(), horizontalEnabled); QCOMPARE(flickable->isDraggingVertically(), verticalEnabled); + // contentX/contentY are either unchanged, or moving and dragging are true when the value changes. + QCOMPARE(flickable->property("movingInContentX").value<bool>(), true); + QCOMPARE(flickable->property("movingInContentY").value<bool>(), true); + QCOMPARE(flickable->property("draggingInContentX").value<bool>(), true); + QCOMPARE(flickable->property("draggingInContentY").value<bool>(), true); QCOMPARE(moveSpy.count(), 1); QCOMPARE(vMoveSpy.count(), verticalEnabled ? 1 : 0); |