aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Stabilize nestedSliderUsingTouch:keepNeither test on UbuntuShawn Rutledge2018-09-131-4/+4
| | | | | | | | | | | | | | | | For whatever reason, it seems we have to be less strict about the exact number of touchpoint movements that the TouchDragArea will see while being dragged 8 times. Counting those is really far from the main point of this test anyway. Also removed blacklisting of macOS 10.10 tests since we don't even support 10.11 anymore. Task-number: QTBUG-36804 Task-number: QTBUG-59840 Fixes: QTBUG-68867 Change-Id: I8f856c5b29de08f55dcd0273cd99dcda77cdf2c3 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Increase fine-grained signals for some properties in FlickableAleix Pol2018-07-311-0/+9
| | | | | | | | | | | | Flickable.at[X/Y][Beginning/End] were being always notified of changes at bulk. This is can be harmful in performance of QML applications that will trigger change requests on the program whenever a property is modified. This introduces separate signals so it's not a problem anymore. Change-Id: I729852df665ec34f532812dd0a45507d053d624c Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* Add Flickable.synchronousDrag propertyShawn Rutledge2018-07-121-0/+66
| | | | | | | | | | | | | | | When it is set true, Flickable begins dragging by making the content jump to the position where it would have been if there was no drag threshold: that is, the content moves exactly in sync with the mouse cursor or finger (as long as it's not hitting the bounds). [ChangeLog][QtQuick][Flickable] Added a synchronousDrag property that makes the content jump to the position it would have had if there was no drag threshold, as soon as dragging begins. Task-number: QTBUG-62902 Change-Id: I5f3b530956363172167896b0f19aec4a41bf82b3 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* use nullptr consistently (clang-tidy)Shawn Rutledge2018-02-261-80/+80
| | | | | | | | | | | | | From now on we prefer nullptr instead of 0 to clarify cases where we are assigning or testing a pointer rather than a numeric zero. Also, replaced cases where 0 was passed as Qt::KeyboardModifiers with Qt::NoModifier (clang-tidy replaced them with nullptr, which waas wrong, so it was just as well to make the tests more readable rather than to revert those lines). Change-Id: I4735d35e4d9f42db5216862ce091429eadc6e65d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Merge remote-tracking branch 'origin/5.9' into 5.11Liang Qi2018-02-181-1/+1
|\ | | | | | | | | | | | | | | Conflicts: .qmake.conf tests/auto/qml/qqmlcontext/tst_qqmlcontext.cpp Change-Id: I7feb9772fc35066f56b7c073482b53ca8c86c70b
| * tst_qquickflickable: fix compiler warningMitch Curtis2018-02-081-1/+1
| | | | | | | | | | | | | | | | | | tst_qquickflickable.cpp:822:47: warning: ignoring return value of ‘bool QTest::qWaitForWindowActive(QWindow*, int)’, declared with attribute warn_unused_result [-Wunused-result] Change-Id: I39be58a1032e36f650ce2e008026faaf368cca3f Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | test: tst_qquickflickable::flickOnRelease() got fixedLiang Qi2018-01-091-6/+0
| | | | | | | | | | | | | | | | Task-number: QTBUG-26094 Task-number: QTBUG-65343 Change-Id: Iee5347227cc943ae6d5d9ba480c0fb8024d258aa Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-12-201-0/+8
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/quick/pointerhandlers/flickableinterop/data/FlashAnimation.qml tests/auto/quick/pointerhandlers/flickableinterop/data/Slider.qml tests/auto/quick/pointerhandlers/flickableinterop/data/TapHandlerButton.qml tests/auto/quick/pointerhandlers/flickableinterop/data/flickableWithHandlers.qml tests/auto/quick/pointerhandlers/multipointtoucharea_interop/data/pinchDragMPTA.qml tests/auto/quick/pointerhandlers/qquickdraghandler/data/DragAnywhereSlider.qml tests/auto/quick/pointerhandlers/qquickdraghandler/data/FlashAnimation.qml tests/auto/quick/pointerhandlers/qquickdraghandler/data/Slider.qml tests/auto/quick/pointerhandlers/qquickdraghandler/data/draggables.qml tests/auto/quick/pointerhandlers/qquickdraghandler/data/multipleSliders.qml tests/auto/quick/pointerhandlers/qquicktaphandler/data/Button.qml tests/auto/quick/pointerhandlers/qquicktaphandler/data/FlashAnimation.qml tests/auto/quick/pointerhandlers/qquicktaphandler/data/buttons.qml tests/manual/pointer/content/FakeFlickable.qml tests/manual/pointer/content/FlashAnimation.qml tests/manual/pointer/content/MomentumAnimation.qml tests/manual/pointer/content/MouseAreaButton.qml tests/manual/pointer/content/MouseAreaSlider.qml tests/manual/pointer/content/MptaButton.qml tests/manual/pointer/content/MultiButton.qml tests/manual/pointer/content/ScrollBar.qml tests/manual/pointer/content/Slider.qml tests/manual/pointer/content/TapHandlerButton.qml tests/manual/pointer/fakeFlickable.qml tests/manual/pointer/flickableWithHandlers.qml tests/manual/pointer/flingAnimation.qml tests/manual/pointer/joystick.qml tests/manual/pointer/main.cpp tests/manual/pointer/main.qml tests/manual/pointer/map.qml tests/manual/pointer/map2.qml tests/manual/pointer/mixer.qml tests/manual/pointer/multibuttons.qml tests/manual/pointer/photosurface.qml tests/manual/pointer/pinchDragFlingMPTA.qml tests/manual/pointer/pinchHandler.qml tests/manual/pointer/singlePointHandlerProperties.qml tests/manual/pointer/tapHandler.qml tests/manual/pointer/tapWithModifiers.qml tests/manual/shapestest/main.cpp Change-Id: I4f233a521305fab1ebfecbac801da192434ed524
| * | Merge remote-tracking branch 'origin/5.9' into 5.10v5.10.0-beta4Liang Qi2017-11-061-0/+8
| |\| | | | | | | | | | Change-Id: I8ede7e36592cd21f3e4a0a9b30dbe26bb40fe69b
| | * QQuickFlickable: Use QQuickItem::setSize() in resizeContent()Alexandr Akulich2017-11-031-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | Sequential call of setWidth() and setHeight() results in outdated height on widthChanged() signal. Use setSize() to set width and height at once. Change-Id: I013f5e1fcfc65a8606f9596ddc196b633873dc98 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | test: skip tst_qquickflickable::flickOnRelease()Liang Qi2017-12-191-1/+2
|/ / | | | | | | | | | | | | | | It will be fixed when new qt5 dev integrated. Task-number: QTBUG-65343 Change-Id: Ic048d7a1480b023dc86d51d1d4de517a63dbedda Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | Default QQuickItem::acceptTouchEvents to true until Qt 6Shawn Rutledge2017-05-101-0/+4
| | | | | | | | | | | | | | | | This is a partial revert of 1457df74f4c1d770e1e820de8cd082be1bd2489e to avoid making a mandatory API change so soon. Change-Id: I05040579fa36d3dc5ef7616861f6d17adf500d2c Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | Add QQuickItem acceptTouchEvents/setAcceptTouchEvents; require for touchShawn Rutledge2017-04-141-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It has been suboptimal to speculatively deliver touch events to Items which are not interested; even worse is when we must deliver to a parent item which is filtering events, when the child Item will not accept the touch event anyway. So now it is required that any QQuickItem subclass which wishes to accept touch events must call setAcceptTouchEvents(true) (typically in its constructor). If it does not do this, it will not get any touch events (and this saves us the trouble of looking for parents which filter touch events, too). It is consistent with needing to call setAcceptHoverEvents() to get hover events, and setAcceptedMouseButtons() to get mouse events. [ChangeLog][QtQuick][QQuickItem] When subclassing QQuickItem, it is now required to call setAcceptTouchEvents(true) if you need the item to receive touch events. Change-Id: Idc76c04f4e7f1d4a613087e756e96dac368f4f23 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | Allow custom bounds behaviors for FlickableJ-P Nurmi2017-04-101-49/+94
|/ | | | | | | | | | | [ChangeLog][QtQuick][Flickable] Added a boundsMovement property that allows disabling the default bounce effect and implementing custom edge effects. Task-number: QTBUG-38515 Change-Id: Id00d30a863e264cdbac00fbad8189406f29484c4 Reviewed-by: Robin Burchell <robin.burchell@crimson.no> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* tst_qquickflickable: remove bogus ItemAcceptsDrops flagShawn Rutledge2017-04-051-3/+1
| | | | | | | | TouchDragArea (only for the nestedSliderUsingTouch test so far) doesn't need this flag. It was a copy-and-paste mistake. Change-Id: I4aba79f940e89c9b5f91f2a347c1b7f458284e24 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Adapt tst_qquickflickable::nestedSliderUsingTouch for slow CIShawn Rutledge2017-04-041-4/+4
| | | | | | | | | QQuickTouchUtils::flush() doesn't actually cause all events to be fully delivered. Task-number: QTBUG-59840 Change-Id: Id5bcd97fa06c0d183e633494eca6aa61908348ae Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Add tst_qquickflickable::nestedSliderUsingTouchShawn Rutledge2017-03-271-0/+161
| | | | | | | | | | | to verify that when a touch-handling component is inside the Flickable, it can control whether the flickable can steal the grab by means of setKeepTouchGrab. Task-number: QTBUG-59416 Task-number: QTBUG-59707 Change-Id: I93cf3abb07a96a69290c3b5b055b688a62fe8fff Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* tst_qquickflickable: clean up touch event handlingShawn Rutledge2017-03-271-17/+9
| | | | | | | | Use QTest::createTouchDevice now that it exists. No need for each test to create a device and pass it in to flickWithTouch Change-Id: I81131a13aaba01cfa0f04b25f334c80263625d12 Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
* Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-02-241-0/+20
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/compiler/qv4ssa.cpp src/quick/accessible/qaccessiblequickview_p.h src/quick/items/qquickmousearea.cpp src/quick/util/qquickanimatorjob.cpp tools/qmlplugindump/main.cpp Change-Id: I84474cf39895b9b757403971d2e9196e8c9d1809
| * Flickable: handle child mouse ungrab when hidden or disabledJ-P Nurmi2017-02-081-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | If Flickable got hidden while a child had mouse grab, it ignored the mouse ungrab event of the child mouse grabber, and got therefore stuck in pressed state. Consequently, item view transitions were not executed since the item view though it was being pressed. Task-number: QTBUG-58453 Change-Id: I76f9f3190c3a95a2fafdce036d69ea1dc8127434 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* | Flickable: add horizontal/verticalOvershoot propertiesJ-P Nurmi2016-12-291-0/+196
|/ | | | | | | | | | [ChangeLog][QtQuick][Flickable] Added horizontalOvershoot and verticalOvershoot properties that can be used for implementing boundary actions and effects. Task-number: QTBUG-38515 Change-Id: I06379348a67d03507b56788d6fc7020bbb2d375f Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* Get rid of most QT_NO_FOO usagesLars Knoll2016-11-291-1/+1
| | | | | | | | Instead use QT_CONFIG(foo). This change actually detected a few mis-spelled macros and invalid usages. Change-Id: I06ac327098dd1a458e6bc379d637b8e2dac52f85 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-10-101-18/+144
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/quick/quickwidgets/quickwidget/main.cpp src/qml/jsruntime/qv4jsonobject.cpp src/qml/jsruntime/qv4qobjectwrapper.cpp src/qml/jsruntime/qv4qobjectwrapper_p.h src/qml/qml/qqmlengine.cpp src/qml/qml/qqmlpropertycache.cpp src/qml/qml/qqmlpropertycache_p.h src/quick/items/qquickanimatedsprite.cpp src/quick/items/qquickitem.cpp src/quick/items/qquickitem.h src/quick/items/qquickitem_p.h src/quick/items/qquickview_p.h src/quick/scenegraph/qsgcontext.cpp src/quick/scenegraph/qsgdefaultrendercontext.cpp Change-Id: I172c6fbff97208f21ed4c8b6db3d1747a889f22b
| * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-10-051-0/+45
| |\ | | | | | | | | | Change-Id: I081d9b15796b4133d2ba6f1a862f15b873a4846d
| | * Flickable: add a trackpad (touchpad) autotestShawn Rutledge2016-10-041-0/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We've had this feature for a long time, to use pixel deltas and scroll phase effectively, but no autotest until now. It's still not very thorough but it's a start. Task-number: QTBUG-55871 Change-Id: Iaf6e7a842ce90828da3253e8673cac9905abd046 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-09-301-1/+19
| |\| | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/quick/qquicktext/tst_qquicktext.cpp Change-Id: I241cd418bb7e7b95e0a0a2ee4c465d48be2a5582
| | * Flickable: do not emit movementEnded until it really doesShawn Rutledge2016-09-291-1/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was occurring when using a physical mouse wheel: movementEnded was emitted, then contentYChanged would still be emitted a few more times. Task-number: QTBUG-55886 Change-Id: Ib5e833d5d84633bb07b8c240ea3ccc9977e443f8 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
| * | Fix Flickable state being reset when it replays a delayed press.Andrew den Exter2016-09-231-17/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | Ignore mouseUngrabEvents() triggered by giving mouse grab to a child item when replaying a delayed press event. Change-Id: I6c8db61167e21bf10d533b17f7cc65e4754bd432 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Martin Jones <martin.jones@qinetic.com.au>
| * | autotests: remove qWait(1) in touch sequencesShawn Rutledge2016-08-131-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After d04982dc84d66bec92b4b3767538676cf925ef17 in qtbase, QTest::touchEvent() and QTouchEventSequence::commit() slow down every sequence of touch events, so we don't need to do it in individual tests. Change-Id: Id8133b100797d4bd2d7282ee874dbb81ed2cab47 Reviewed-by: Liang Qi <liang.qi@qt.io>
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-131-0/+1
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/compiler/qv4isel_moth.cpp src/qml/compiler/qv4ssa_p.h tests/benchmarks/qml/qqmlimage/qqmlimage.pro tests/benchmarks/qml/qqmlimage/tst_qqmlimage.cpp Change-Id: Iad11ce7fdf0c6d200fdebc16a94081bd8069a87a
| | * Flickable: avoid infinite velocity during release after dragShawn Rutledge2016-08-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It sometimes happens on touchscreens that mouse events occur too close together. We cannot calculate velocity based on zero elapsed time, so just ignore the event. Task-number: QTBUG-45527 Change-Id: I120e73cfa60e2fcc594cb1f3b69f530e746abddd Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
* | | Add a test that verifies that keepMouseGrab worksFrederik Gladhorn2016-10-031-0/+48
| | | | | | | | | | | | | | | Change-Id: I17c736994f05a63574b518b1d23facde001eacbf Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Flickable: Fixed rounding errors with contentX/YRiku Palomäki2016-08-181-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | contentX/Y are qreals, but they are rounded using qRound/qFloor/qCeil which will limit the values to 2^31 needlessly. This fix will use (std::)round, std::floor and std::ceil instead to allow bigger values for contentX and contentY. Change-Id: I35ad4bcfa3b8bbc21e90768d348d3002ca400081 Task-number: QTBUG-48018 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Merge remote-tracking branch 'origin/5.7' into devEdward Welbourne2016-08-021-0/+28
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/quick/items/qquickshadereffect.cpp 5.7 had a bug-fix in code dev has replaced wholesale. src/quick/items/qquickwindow.cpp src/quick/items/qquickwindow_p.h One side changed a method's signature; the other side renamed a method declared adjacent to it and changed some code using it, moving some from the public class to its private partner. tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp One side added a blank line before a comment the other re-wrote. Kept the re-write, killed the stray blank. .qmake.conf Ignore 5.7's change to MODULE_VERSION. src/qml/compiler/qqmltypecompiler.cpp src/qml/compiler/qqmlpropertyvalidator.cpp 5.7 changed code in the former that dev moved to the latter. Reflect 5.7's changes there, adapted to dev's form. src/qml/qml/qqmlobjectcreator.cpp One side added new QVariant types; the other changed how it handled each type of QVariant (without git seeing any conflict); adapted the new stanzas to work the same as the transformed ones. tests/manual/v4/test262 dev had a broken sha1 for it; so used 5.7's 9741ac4655808ac46c127e3d1d8ba3d27ada618e Change-Id: I1fbe2255b97d6ef405cdd1d0cea7fab8dc351d6f
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Edward Welbourne2016-07-151-0/+28
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/quick/demos/photoviewer/deployment.pri One side made it redundant; the other removed part of it; remove it all ! src/quick/scenegraph/util/qsgatlastexture.cpp One side changed a preprocessor condition, the other a code condition, on adjacent lines; keep both changes. tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp One side changed a condition, the other the content of its block; keep both. Change-Id: Idb8937f92a7edb28212449dfe0c5cfdb8e6de986
| | * Flickable: fix minXExtent/minYExtent when content is smaller than viewAndrea Bernabei2016-07-011-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At the moment, defining leftMargin (or topMargin) and contentWidth (or contentHeight) so that "leftMargin+contentWidth < flickable.width" (or topMargin+contentHeight < flickable.height) leads to widthRatio (or heightRatio) having value != 1. The value should, however, be 1, as the content is completely visible inside the view, margins included. As a sideeffect, under the assumptions described above, it will now not be possible to scroll the leftMargin (or topMargin) out of screen, something which was possible (and it shouldn't have) before this fix. Task-number: QTBUG-53726 Change-Id: I22426c8038e90a2cfc7445914206eae0e781a3fb Reviewed-by: Robin Burchell <robin.burchell@viroteck.net> Reviewed-by: Albert Astals Cid <albert.astals@canonical.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Fix some test failures with QT_NO_OPENGL buildsAndy Nichols2016-05-061-0/+2
|/ / | | | | | | | | Change-Id: I4154084b4a0e0709ee8cb39a856a37a611e2d537 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* / Updated license headersJani Heikkinen2016-01-201-17/+12
|/ | | | | | | | | | | | From Qt 5.7 -> tools & applications are lisenced under GPL v3 with some exceptions, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new GPL-EXCEPT header instead of LGPL21 one (in those files which will be under GPL 3 with exceptions) Change-Id: I04760a0801837cfc516d1c7c02d4f503f6bb70b6 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Don't send delayed mouse presses to ancestors of the replaying Flickable.Andrew den Exter2015-10-121-0/+43
| | | | | | | | | | | | | If a Flickable delayed a mouse press event and then replayed it later, ancestor items of that Flickable would receive the press twice: once when filtering events of the Flickable, and again when the event was replayed to a descendent of the Flickable. Extend the protection against a Flickable receiving that repeat event to all ancestor items so this doesn't happen. Change-Id: I438c146130c24a7d47e9e8712a1ab08f3d915a06 Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com> Reviewed-by: Martin Jones <martin.jones@qinetic.com.au>
* Flickable: remove spurious emission of content size changesJ-P Nurmi2015-09-291-0/+35
| | | | | | | | | | | | If contentWidth or contentHeight is negative (unspecified), Flickable should not emit contentWidthChanged() or contentHeightChanged() when its own geometry changes. The value of contentWidth or contentHeight does not change. It remains negative (unspecified). Change-Id: Iad478d11e2e4370d2e94abe84cfd62d144e23dd9 Task-number: QTBUG-35038 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net> Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* tests/quick: Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b).Friedemann Kleint2015-07-271-11/+11
| | | | | | | | | | | | - Replace Q[TRY]_VERIFY(pointer == 0) by Q[TRY]_VERIFY(!pointer). - Replace Q[TRY]_VERIFY(smartPointer == 0) by Q[TRY]_VERIFY(smartPointer.isNull()). - Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b) and add casts where necessary. The values will then be logged should a test fail. Change-Id: Ib9f4c2486af23c47990be4b9e004b965de226dcc Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Tests: Replace Q[TRY]_VERIFY(v == true|false) by QVERIFY(v)|QVERIFY(!v).Friedemann Kleint2015-07-271-28/+28
| | | | | | | | Preparing the replacement of Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b) for non-boolean types. Change-Id: I8a4e44a2b4e20a9c8b811799e3932c8ce1a2cbbb Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Emit movement signals for flick().Michael Brasser2015-07-221-0/+20
| | | | | | | | | | | | | | | | | | | | Make flick() more like a real flick and ensure the movement signals and properties are updated. This allows them to be handled from QML. This also fixes issues with flick() and dynamic delegates. Flickable has several checks of the form: !d->pressed && !d->hData.moving && !d->vData.moving That were processed incorrectly for flick(), as the moving variables were not being updated. [ChangeLog][QtQuick][Flickable] The movement related signals and properties are now updated for flicks started via the flick function. Change-Id: I7e96e2e12a4d0a0ee73ddd6f29d95f19c44667b0 Task-number: QTBUG-34507 Reviewed-by: Martin Jones <martin.jones@qinetic.com.au>
* Decouple flickable stopAtBounds test from mouse event timingUlf Hermann2015-06-051-1/+3
| | | | | | | | | We don't really want to know if the flickable is still flicking at the end of the flick() call, but rather if it has been flicking at some point. Change-Id: Ib6c89023042b2a45e66f1825a699bb47dc6e13ee Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Fix flickable autotestUlf Hermann2015-06-051-46/+48
| | | | | | | | | | | | | | | | * Make sure we always wait for window activation, not only exposal. * When clicking or releasing, first move the mouse to the right place. * In returnToBounds() show() the window before we rely on its event loop. * In rebound() reduce the delays as mouse events get delivered earlier now and the movement might stop and restart if we wait for too long between subsequent mouse moves. Most of these problems have been exposed by commit 66050f2ac875d451bec31e0d8ff507795b5b18d6 in qtbase. Change-Id: I5a3bc1e4ba92362d69180c8fde33eca47b4b9375 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Allow for some delay on starting transitions in flickable testUlf Hermann2015-06-051-1/+1
| | | | | Change-Id: I218ea874def6060e147cb05eafeb857a9e66eb44 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Allow Flickable's grab to be stolen if dragging over bounds.Andrew den Exter2015-03-191-13/+38
| | | | | | | | | | This allows a parent item to intercept a drag gesture in one direction when the flickable has reached it's limit in that direction without disabling the drag over bounds for drag gestures in the opposite direction. Change-Id: I6ac60113f150dbb8da42d9b5593325b04be166f5 Reviewed-by: Martin Jones <martin.jones@qinetic.com.au>
* Fix flickable stealing gestures when height >= contentHeight.Andrew den Exter2015-03-111-0/+34
| | | | | | | | | | | | | | | Or width >= contentWidth. If newY is equal to both maxY and minY then the second assignment to rejectY can clobber the first. Changing the second assignment to an |= means rejectY is true if either is true. Secondly maxY became positive when height was greater than contentHeight instead of having a maximum of 0, which ensured rejectY evaluated to false in the case newY <= maxY and the mouse was stolen. Change-Id: I6416d0e23c3ef898887a7b3e3fcdc1dc12853548 Reviewed-by: Martin Jones <martin.jones@qinetic.com.au>
* Update copyright headersJani Heikkinen2015-02-121-7/+7
| | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: I61120571787870c0ed17066afb31779b1e6e30e9 Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com>
* Introduce Flickable.OvershootBounds behaviorJ-P Nurmi2015-01-211-0/+6
| | | | | | | | | | | | | | | | | | | 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>