aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickflickable.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Default QQuickItem::acceptTouchEvents to true until Qt 6Shawn Rutledge2017-05-101-0/+1
| | | | | | | | 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>
* Merge remote-tracking branch 'origin/dev' into wip/pointerhandlerShawn Rutledge2017-05-081-12/+2
|\ | | | | | | Change-Id: Ia06843de255547174efa556b1ab76be4b4be4287
| * Merge remote-tracking branch 'origin/5.9' into devLars Knoll2017-05-021-0/+2
| |\ | | | | | | | | | Change-Id: I71275a2076c3d32ee2896571be882067320a2e9e
| | * Run includemocs in qtdeclarativeThiago Macieira2017-04-261-0/+2
| | | | | | | | | | | | | | | Change-Id: I84e363d735b443cb9beefffd14b8c023a37aa489 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * | QQuickFlickable: Remove an obviously stale commentRobin Burchell2017-04-171-12/+0
| | | | | | | | | | | | | | | | | | | | | These properties all have proper documentation now Change-Id: Ie65221de468cac18b916506432097843e7921fed Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Merge remote-tracking branch 'origin/dev' into wip/pointerhandlerShawn Rutledge2017-04-131-22/+101
|\| | | | | | | | | | | Change-Id: Ie2894830470a69827d4ace3d8af9bee971e3fbd4
| * | Allow custom bounds behaviors for FlickableJ-P Nurmi2017-04-101-17/+93
| |/ | | | | | | | | | | | | | | | | | | | | [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>
| * Flickable: don't steal grab from item with keepTouchGrab setShawn Rutledge2017-03-271-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | Sometimes filterMouseEvent can be given a mouse event which was synthesized from a touch point which was already grabbed. In such cases, if the grabber has keepTouchGrab set, respect it. This makes it possible again for a QQControls 2 slider to be draggable inside a Flickable which is also draggable in the same direction. Task-number: QTBUG-59416 Change-Id: I93b7fd9cb846b1e574615154f9a54316b60c0477 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
| * Flickable: fix doc statement about content anchoringNikita Krupenko2017-03-161-2/+4
| | | | | | | | | | | | Task-number: QTBUG-54101 Change-Id: I3b0a0225efb77003c1c80c1d5b94ab572f3cc785 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | Merge remote-tracking branch 'origin/dev' into wip/pointerhandlerShawn Rutledge2017-03-021-1/+4
|\| | | | | | | Change-Id: I7e43a0a47d49de38617f6afc7548f9a9e212a851
| * Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-02-241-1/+4
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | build a vector of child-filtering parents before delivery of pointer eventShawn Rutledge2017-01-271-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Formerly during normal mouse or touch event delivery, sending it to the Item needed to be done via QQuickWindow::sendEvent, which would then call sendFilteredMouseEvent, which is a recursive function to visit all the item's parents, check whether filtersChildMouseEvents() returns true, if so then return early if childMouseEventFilter() returns true. This is the mechanism by which Flickable (for example) can monitor the movements of an eventpoint even while one of its children has an exclusive grab, and can steal the grab away. Now, we do this by building a vector of such parents first, then visiting them in order. It might be more efficient, it eliminates the recursion, and should eliminate the need for a QSet to ensure that we don't visit the same parent more than once. We can't change the behavior of QQuickWindow::sendEvent() because it's public API, but now we don't use it as much internally. Change-Id: I686fc5612c66eac09ec05c381a648ec65dec3923 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* | | Merge remote-tracking branch 'origin/dev' into wip/pointerhandlerShawn Rutledge2017-01-261-2/+78
|\| | | | | | | | | | | Change-Id: I7962fd2282792c43af69784c8e98fb050fd928a7
| * | Flickable: add horizontal/verticalOvershoot propertiesJ-P Nurmi2016-12-291-2/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [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>
* | | Don't assume that target is the parent itemJan Arve Saether2016-12-291-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To summarize: A pointer handler always gets its pointer events from its parent item. It applies its effect (drag, pinch, ...) on the item referenced to by the target property. By default, target refers to the parent, but that is not always the case. In addition to this we also have to handle the case when the target is null Change-Id: If62108abf0aeb713906bf88472ad9a32a74efff6 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Merge branch remote-tracking branch 'origin/dev' into wip/pointerhandlerShawn Rutledge2016-12-201-1/+1
|\| | | | | | | | | | | Change-Id: I9ed2e696108f11c9153012fcf092541fd0e0d7c8
| * | Merge remote-tracking branch 'origin/5.8' into devLiang Qi2016-12-141-1/+1
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/qmltooling/qmldbg_debugger/qv4debugjob.cpp src/plugins/qmltooling/qmldbg_inspector/globalinspector.cpp src/plugins/qmltooling/qmldbg_nativedebugger/qqmlnativedebugservice.cpp src/qml/qml/qqmlimport.cpp src/quick/items/context2d/qquickcontext2dtexture_p.h tools/qmleasing/splineeditor.h Change-Id: I8f6630fcac243824350986c8e9f4bd6483bf20b5
| | * 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 branch remote-tracking branch 'origin/dev' into wip/pointerhandlerShawn Rutledge2016-11-171-9/+10
|\| | | | | | | | | | | | | | | | | We no longer have any hope of getting this into 5.8. Change-Id: I2decfa47e589ba7ae2d6b951c6517a2c311d0192
| * | Merge remote-tracking branch 'origin/5.8' into devLiang Qi2016-10-181-16/+23
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/jsruntime/qv4variantobject.cpp src/qml/types/qquickworkerscript.cpp src/quick/scenegraph/util/qsgdefaultpainternode_p.h tools/qmljs/qmljs.cpp Change-Id: I876242714ec8c046238d8fd673a5ace2455b2b59
| | * Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-10-101-4/+5
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-09-301-2/+2
| | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/quick/qquicktext/tst_qquicktext.cpp Change-Id: I241cd418bb7e7b95e0a0a2ee4c465d48be2a5582
| | | | * Flickable: do not emit movementEnded until it really doesShawn Rutledge2016-09-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | | | * Flickable: don't activate velocityTimeline if scroll phase availableShawn Rutledge2016-09-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The velocity timeline does not need to drive the movement if we can be sure that there are enough wheel events coming from the OS to move the flickable smoothly. And when the velocityTimeline is not active, the movementEndingTimer will emit the movementEnded signal, as it should. Task-number: QTBUG-55871 Change-Id: I5569be3aa6335d43ba162967ee03d08de3ba8096 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
| | | * | Fix Flickable state being reset when it replays a delayed press.Andrew den Exter2016-09-231-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | Quick: mark some methods as constAnton Kudryavtsev2016-10-121-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These methods do not modify objects. Change-Id: Ibb2622cad6fbcec31c785f5d032304c648372350 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * | | | Mark some methods as constAnton Kudryavtsev2016-10-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These methods do not modify objects. Change-Id: I4909f382cc19c5ce6f07e0421fef68a63cfe518f Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | | | | Merge remote-tracking branch 'origin/5.8' into wip/pointerhandlerShawn Rutledge2016-10-071-12/+18
|\ \ \ \ \ | | |/ / / | |/| | | | | | | | Change-Id: I22cb14c061dc1738fd711756a6bcabd4a25be915
| * | | | Flickable: respect keepMouseGrab againFrederik Gladhorn2016-10-021-12/+18
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The keep grab property works in a "cooperative" way, items need to respect it. Since we don't pre-grab any more, flickable would check the wrong item for the property. It should simply take the receiver item into account, which has to have the grab if anyone has it. If the receiver didn't have the grab, it wouldn't be the receiver in the first place. Task-number: QTBUG-55229 Change-Id: If7d8b0c99bf912c0e09427cd20e89be1798ace5d Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | | Merge branch remote-tracking branch '5.8' into wip/pointerhandlerShawn Rutledge2016-08-231-12/+33
|\| | | | | | | | | | | | | | | Change-Id: I1750ed28c5fda878a0a8f2b7bfe4c580c0b7ffe3
| * | | Flickable: Fixed rounding errors with contentX/YRiku Palomäki2016-08-181-9/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 devLiang Qi2016-08-171-3/+7
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/compiler/qqmltypecompiler.cpp src/qml/compiler/qv4isel_moth.cpp src/qml/compiler/qv4ssa_p.h src/qml/qml/qqmlobjectcreator.cpp Change-Id: I8bb7fe773d657f908f20ee5e72c2b9bd643f6260
| | * | Doc: mention when Flickable.AutoFlickIfNeeded was addedJ-P Nurmi2016-08-151-1/+1
| | | | | | | | | | | | | | | | | | | | Change-Id: Icf72c05c9573715771353bd03735f64eadd808f2 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| | * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-131-2/+6
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | Introduce QQuickPointerHandler: base class for nested event handlersShawn Rutledge2016-08-151-0/+3
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | They will be Tech Preview in 5.8, so they shouldn't be available unless you explicitly import them. Task-number: QTBUG-54824 Change-Id: I290854a4e2b76e2cdfef5c216c7fdeb47fbcd390 Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
* | | Merge remote-tracking branch 'origin/5.7' into devEdward Welbourne2016-08-021-2/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-2/+2
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | QML: Pass the kind of geometry change aroundErik Verbruggen2016-07-111-3/+3
|/ / | | | | | | | | | | | | | | | | | | | | | | | | This prevents re-calculation of what actually changed, and removes the now unused parameter newGeometry. Other than this change calculation, the only place where oldGeometry was used is QQuickListViewPrivate::itemGeometryChanged. To get rid of oldGeometry too, QQuickListViewPrivate now stores the current (i.e. last known) geometry, and updates it in itemGeometryChanged. Change-Id: I8a5286d08a04132c9a4c81de7ce221f5676946e6 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io> Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-06-101-0/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Part of 0e053528 was reverted in the merge, about lastTimestamp. It will be applied later in separate commit. qmltest::shadersource-dynamic-sourceobject::test_endresult() was blacklisted on linux. Conflicts: .qmake.conf tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp tests/auto/qmltest/BLACKLIST tests/auto/qmltest/qmltest.pro Task-number: QTBUG-53590 Task-number: QTBUG-53971 Change-Id: I48af90b49a3c7b29de16f4178a04807f8bc05130
| * Flickable: MovementEndingTimerInterval is used only on OS XShawn Rutledge2016-05-251-0/+2
| | | | | | | | | | | | | | After 9b8d0bff, some compilers complain that it's an unused variable. Change-Id: I4a89ce7a7d73cfc039a2e2d1ad48ec7d073cf7cc Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-05-191-4/+4
|\| | | | | | | | | | | | | | | | | Conflicts: src/plugins/qmltooling/qmldbg_profiler/qqmlprofilerservice.cpp src/qml/jsruntime/qv4engine.cpp src/qml/jsruntime/qv4engine_p.h Change-Id: I89ffccd699bee675732758d039e22224b275d60d
| * Flickable: start movementEndingTimer consistently only on OSXShawn Rutledge2016-05-111-4/+4
| | | | | | | | | | | | | | | | | | | | Amends 1929fee8e17e9ca66e7fe08faa9ed9fa7fdbb127 to prevent extra bounce at the ends. Task-number: QTBUG-47697 Task-number: QTBUG-53177 Change-Id: I23e63d8e0555e1503ff028ad2f0767b05ef39432 Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
* | Flickable: add AutoFlickIfNeeded as an option for flickableDirectionShawn Rutledge2016-05-131-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If you want to disable all movement when the user tries to flick or drag, you previously had to set interactive: false. Maybe you need to bind that to some calculation to determine whether the content fits completely inside the Flickable or not. This way is easier. BTW the AutoFlickIfNeeded can be ORed with HorizontalFlick or VerticalFlick, but we don't document it because AutoFlickDirection=0, so it's not useful to OR that with anything. Task-number: QTBUG-31121 Change-Id: Ib03b0f223cb40f0338510c318aa37e70ce71514d Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7J-P Nurmi2016-03-011-0/+1
|\| | | | | | | | | | | | | Conflicts: src/plugins/qmltooling/qmldbg_native/qmldbg_native.pro Change-Id: I3ca8f0422828191b7e19539c25f31f2d048e9f18
| * Flickable: handle wheel NoScrollPhase the same as ScrollUpdateShawn Rutledge2016-03-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before change f253f4c in qtbase, when an ordinary mouse wheel is rotated the phase would be ScrollUpdate continuously, without going through the other phases; whereas on a gesture-interpreting trackpad there would be a ScrollBegin first. Now, an ordinary wheel mouse uses NoScrollPhase continuously, which makes it easier to tell the two cases apart. But we're required to handle the new phase explicitly. To avoid change in existing behavior, we handle it the same as ScrollUpdate phase was handled before. Change-Id: I2d51a89a965704cf843303d523463805b4fe6ff8 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2016-02-121-2/+34
|\| | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I356ec83cf687bd2833f9a7c5e820d56b1efa8979
| * Flickable: ensure movementEnded after wheel/trackpad flickShawn Rutledge2016-02-021-2/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In qtdeclarative/tests/manual/touch/flicktext.qml it was already clear that the moving/movingVertically/Horizontally properties did not revert to false after a trackpad flick on OS X. It turns out that the failure to emit the movementEnded signal also caused a scrolling bug in ListView. QQuickFlickable::wheelEvent() looks at event->phase(), but ScrollEnd is not absolute: on OS X with a bluetooth trackpad, it happens once when the user's fingers are lifted, then the "momentum" events occur with ScrollUpdate, and then ScrollEnd happens again at the end of the momentum phase. But if the user's fingers come to rest before being lifted, to stop the momentum, then the ScrollEnd phase happens only once, and that's actually the end of scrolling, flicking and movement, all at once. The events don't seem to provide enough information to disambiguate these two cases; but if ScrollEnd phase occurs, and then we don't receive any more events within some short time interval, we can be pretty sure the scrolling really ended. So, use a timer to check whether any more events have been received, a little later after the ScrollEnd phase. The movementEnded signal can now be emitted for several reasons: the regular timeline ended movement, the velocityTimeline ended movement, or the movementEndingTimer sent an event. Also, when flicking with a physical mouse wheel, flickStarted was emitted multiple times; now it will be emitted only once. Task-number: QTBUG-47151 Change-Id: I534e99befbd9bf6af24c4ebdca73dd21964f1063 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>