diff options
author | J-P Nurmi <jpnurmi@digia.com> | 2014-06-12 20:23:10 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@theqtcompany.com> | 2015-01-21 00:31:45 +0100 |
commit | 7ee429dd7a12dc38a4e4af8888325d111883a2ff (patch) | |
tree | fa3beeda8b1f342fdf05199dc4580a43c073ddef /tests/auto/quick/qquickflickable | |
parent | fdec43a1ff7d8ff8a9cd014e7282e95d262fe5ed (diff) |
Introduce Flickable.OvershootBounds behavior
Related to QTBUG-38515. It is not always desired to allow dragging over
bounds even if flicking overshoots. This makes it possible to implement
collision effects for flicks, while a drag over bounds would still do
nothing.
[ChangeLog][QtQuick][Flickable] Introduced Flickable.OvershootBounds
behavior that allows content overshooting the boundary when flicked,
but does not allow dragging content beyond the boundary of Flickable.
[ChangeLog][QtQuick][Important Behavior Changes]
Flickable.DragAndOvershootBounds value changed from 2 to 3. This will
only affect you if you've worked around enum type checking and have
the integer value explicitly in your code.
Change-Id: I63c3540ab293a9c7c801d81220f74909d3fa1e17
Reviewed-by: Martin Jones <martin.jones@qinetic.com.au>
Diffstat (limited to 'tests/auto/quick/qquickflickable')
-rw-r--r-- | tests/auto/quick/qquickflickable/tst_qquickflickable.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp b/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp index a3d902a054..7675957bc5 100644 --- a/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp +++ b/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp @@ -231,6 +231,12 @@ void tst_qquickflickable::boundsBehavior() flickable->setBoundsBehavior(QQuickFlickable::StopAtBounds); QCOMPARE(spy.count(),3); + flickable->setBoundsBehavior(QQuickFlickable::OvershootBounds); + QVERIFY(flickable->boundsBehavior() == QQuickFlickable::OvershootBounds); + QCOMPARE(spy.count(),4); + flickable->setBoundsBehavior(QQuickFlickable::OvershootBounds); + QCOMPARE(spy.count(),4); + delete flickable; } |