aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickflickable_p_p.h
Commit message (Collapse)AuthorAgeFilesLines
* Kill Flickable's wheel momentum if angleDeltas not multiples of 120Shawn Rutledge2020-12-071-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Wheel momentum is great on old "clicky" mouse wheels: they feel really clunky without this feature. But it's also terrible on most laptop touchpads. We still aren't generating QWheelEvents with pixel deltas and ScrollPhase on most platforms (still only on macOS); but eventually we should. However, those laptop touchpads tend to generate angleDeltas that are not multiples of 120. Added logging categories qt.quick.flickable qt.quick.flickable.wheel and qt.quick.flickable.velocity. [ChangeLog][QtQuick][Flickable] Flickable now tries to detect whether you're using a "clicky" wheel on a desktop mouse. A laptop trackpad can generate QWheelEvent::angleDelta values that are not multiples of 120; in that case, smooth scrolling with momentum is disabled, to avoid losing control of scrolling. Set the environment variable QT_QUICK_FLICKABLE_WHEEL_MOMENTUM_ENABLED=0 to opt out of the old behavior entirely, or set it to 1 to opt in unconditionally. Pick-to: 6.0 Task-number: QTBUG-38570 Task-number: QTBUG-56075 Task-number: QTBUG-80720 Task-number: QTBUG-82565 Change-Id: I0da2d31259fa1c79ab217a3fa9e888893fc7b235 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Teach flickable to handle and replay touch as it does mouseShawn Rutledge2020-11-111-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | QQuickWindowPrivate::cloneMouseEvent() renamed to clonePointerEvent() and generalized to be able to clone any of the kinds of QPointerEvent that we're interested in replaying. Now it is used only in QQuickFlickablePrivate::captureDelayedPress(). Reverts f278bb7c66bb00c9f81b7a3aceeb94cb9b3a1b66 and 012a4528a515af8d7ec7dbc05a38d8fd0d6d4d1b (don't skip tst_TouchMouse::buttonOnDelayedPressFlickable). Some test changes from f128b5dee8a2a03ebc55ed0cd1e749a6599282c3 also get reverted. QEventPoint should always have valid velocity now, so Flickable no longer has to calculate it for itself. Removing that became necessary to fix the movingAndFlicking test. Adds logging categories qt.quick.flickable.filter and .replay. Fixes: QTBUG-85607 Task-number: QTBUG-83437 Task-number: QTBUG-78818 Task-number: QTBUG-61144 Task-number: QTBUG-88038 Task-number: QTBUG-88138 Change-Id: I0ed6802dff5e5d1595adddc389642925f1f2c93d Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QQmlListProperty: Use qsizetype rather than int for sizesUlf Hermann2020-11-091-2/+2
| | | | | | | | | | [ChangeLog][QtQml] The QQmlListProperty callback functions use qsizetype now as type for the size of a list. This is in line with the containers that you might use to back the list. Fixes: QTBUG-88269 Change-Id: Ia38403cb32f241e6c70e1a580dbeff1d6d694331 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Amend QQFlickablePrivate::wantsPointerEvent() to take QPointerEventShawn Rutledge2020-10-081-2/+1
| | | | | | | | | | ...now that we're done with the cherry-pick to 5.15. Amends 6857ad3e686a5e2b45d28a7f47dca3210608da50. Task-number: QTBUG-74046 Task-number: QTBUG-85302 Change-Id: I3c2ec091976bcfc170ff58d8fcd226dcdf4c90d2 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* QQuickListView: prevent mouse delivery in floating header or footerShawn Rutledge2020-10-071-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | Earlier we reimplemented the contains() method of ListView to prevent dragging in an Overlay or Pullback header or footer. But in QQuickWindow (QQuickWindowPrivate::pointerTargets()), an early check prevents delivery of pointer events to an item that is clipped and for which contains() returns false, and also to its children. In that case, the header or footer no longer responds to a mouse event even if you put a MouseArea in it. Reverts 6ad3445f1e159d9beea936b66d267dcaacdc5d6c; reimplemented using similar logic in a new QQuickListViewPrivate::wantsPointerEvent() method, overriding QQuickFlickablePrivate::wantsPointerEvent(), which is now checked in event-handling code in addition to checking the interactive flag. Done-with: Wang Chuan <ouchuanm@outlook.com> Pick-to: 5.15 Task-number: QTBUG-74046 Fixes: QTBUG-85302 Change-Id: I9474f035d26b74ee36c0ac19e45a77de2e694bf1 Reviewed-by: Wang Chuan <ouchuanm@outlook.com> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Add major version to all Q_REVISIONsUlf Hermann2020-02-191-0/+1
| | | | | Change-Id: Id72fbe10c16de61bd847773d0055d83cfe03f63c Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Privately export QQuickFlickablePrivate and QQuickTableViewPrivateMitch Curtis2020-02-061-1/+1
| | | | | | | | | We need this to implement header views (for TableView) in qtquickcontrols2. Task-number: QTPM-1300 Change-Id: I03068828cdf6dd79ec6a91c75f68eaf7c224d4a2 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Specify parameters of type registration in class declarationsUlf Hermann2019-09-261-0/+1
| | | | | | | | | | | | | | | | | | | | | Using this technique we can automatically register all necessary revisions and minor versions of a type, using the metaobject system. This greatly reduces the potential for mistakes and resulting incompatibilities between versions of imports. We assume that for each type we need to register all revisions of its super types and its attached type, and that the revisions match. That is, if you import version X of type A, you will also get version X of its attached type and of any super types. As we previously didn't take these dependencies into account when manually registering the types, a number of extra revisions are now registered for some types. Potentially, we can now generate the qmltypes files at compile time, using moc. Change-Id: I7abb8a5c39f5e63ad1a0cb41a783f2c91909491b Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Add handlers declared as Flickable children to its contentItemShawn Rutledge2019-01-221-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | QQuickItemPrivate::data_append() was not invoked when any kind of Pointer Handler was directly declared in a Flickable (or subclass) because QQuickFlickable redefines the default property to be its own flickableData property. So we need to repeat the special handling in QQuickFlickablePrivate::data_append() too. The handler must be added to the private->extra->pointerHandlers vector, so that QQuickItemPrivate::handlePointerEvent() will attempt to deliver events to those handlers. TapHandler seems OK (especially with its default gesturePolicy so that it does not do an exclusive grab). PointHandler seems OK. DragHandler competes with Flickable for the exclusive grab. pressDelay can help; or set acceptedDevices: PointerDevice.Mouse to allow the mouse to drag but not flick, and the touchscreen to flick but not drag. Fixes: QTBUG-71918 Fixes: QTBUG-73035 Change-Id: Icb97ed5230abe0cb6ec0230b5b5759a0528df7e8 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Flickable: handle the new ScrollMomentum phase in QWheelEventShawn Rutledge2018-08-221-1/+0
| | | | | | | | | | | | | | Now we can tell when macOS is sending wheel events that represent simulated momentum, and Qt::ScrollEnd is guaranteed to mean that scrolling actually ended. So the timer to check whether it really ended is no longer necessary. This reverts commit 87a4d4babe0a3d6b8a57048205eccc7105931474. Task-number: QTBUG-63026 Task-number: QTBUG-65160 Change-Id: I0988e934b43989a3501b89d0a77eee616328ece2 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Add Flickable.synchronousDrag propertyShawn Rutledge2018-07-121-0/+1
| | | | | | | | | | | | | | | 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-2/+2
| | | | | | | | | | | | | 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.10' into devLiang Qi2018-02-021-1/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/qmltooling/qmldbg_profiler/qqmlprofilerservice.cpp src/qml/compiler/qqmlirbuilder.cpp src/qml/compiler/qqmlirbuilder_p.h src/qml/compiler/qqmltypecompiler.cpp src/qml/compiler/qv4codegen.cpp src/qml/compiler/qv4codegen_p.h src/qml/compiler/qv4compileddata_p.h src/qml/compiler/qv4compiler.cpp src/qml/compiler/qv4compilercontext_p.h src/qml/compiler/qv4isel_moth.cpp src/qml/compiler/qv4jsir.cpp src/qml/compiler/qv4jsir_p.h src/qml/jit/qv4isel_masm.cpp src/qml/jsruntime/qv4engine.cpp src/qml/jsruntime/qv4functionobject.cpp src/qml/jsruntime/qv4runtimecodegen.cpp src/qml/jsruntime/qv4script.cpp src/qml/jsruntime/qv4script_p.h src/qml/qml/qqmltypeloader.cpp src/quick/items/qquickanimatedimage.cpp src/quick/items/qquickanimatedimage_p_p.h src/quick/scenegraph/compressedtexture/qsgpkmhandler.cpp tests/auto/qml/qmlplugindump/qmlplugindump.pro tests/auto/qml/qmlplugindump/tst_qmlplugindump.cpp tools/qmlcachegen/qmlcachegen.cpp tools/qmljs/qmljs.cpp Done-with: Shawn Rutledge <shawn.rutledge@qt.io> Done-with: Lars Knoll <lars.knoll@qt.io> Done-with: Ulf Hermann <ulf.hermann@qt.io> Change-Id: I010e6525440a85f3b9a10bb9083f8e4352751b1d
| * Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2018-01-241-1/+3
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/qml/compiler/qv4codegen.cpp src/qml/compiler/qv4compileddata_p.h src/qml/debugger/qqmlprofiler_p.h src/qml/jsruntime/qv4engine.cpp src/qml/memory/qv4mm.cpp src/qml/qml/qqmlcomponent.cpp src/qml/qml/qqmlobjectcreator.cpp src/qml/qml/qqmlobjectcreator_p.h src/qml/types/qqmldelegatemodel.cpp src/quick/items/qquickitem_p.h src/quick/items/qquickwindow.cpp tests/auto/quick/touchmouse/BLACKLIST tests/benchmarks/qml/holistic/tst_holistic.cpp Change-Id: I520f349ab4b048dd337d9647113564fc257865c2
| | * Fix valgrind warning about uninitialized variableLars Knoll2017-12-111-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | The flaky qmltest autotest triggered these warnings quite a bit, so maybe this helps stabilize that autotest. Change-Id: Ib03a9fbbbde376296e7bea4cbd4ba2422907fe44 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Replace Q_DECL_OVERRIDE with overrideKevin Funk2017-09-251-2/+2
|/ / | | | | | | | | Change-Id: I176f91a8c51e81a2df3fe91733118261491223ee Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* / Allow custom bounds behaviors for FlickableJ-P Nurmi2017-04-101-0/+1
|/ | | | | | | | | | | [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: add horizontal/verticalOvershoot propertiesJ-P Nurmi2016-12-291-1/+2
| | | | | | | | | | [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>
* 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>
* QML: Pass the kind of geometry change aroundErik Verbruggen2016-07-111-1/+1
| | | | | | | | | | | | | 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.7' into devLiang Qi2016-06-211-0/+1
| | | | | | | | | Conflicts: src/quick/items/qquickflickable_p_p.h src/quick/items/qquickpathview_p_p.h tests/auto/qml/qqmltypeloader/tst_qqmltypeloader.cpp Change-Id: I77664a095d8a203e07a021c9d5953e02b8b99a1e
* Merge remote-tracking branch 'origin/5.6' into devLiang Qi2016-02-121-0/+1
|\ | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I356ec83cf687bd2833f9a7c5e820d56b1efa8979
| * Flickable: ensure movementEnded after wheel/trackpad flickShawn Rutledge2016-02-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Updated license headersJani Heikkinen2016-01-191-14/+20
|/ | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: Ic36f1a0a1436fe6ac6eeca8c2375a79857e9cb12 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-1/+0
| | | | | | | | | | | | | 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: drag-over-bounds is not velocity-sensitiveShawn Rutledge2015-07-091-1/+2
| | | | | | | | | | | The inspiration for velocity sensitivity was to make it feel more like native trackpad flicking on OS X. But on touchscreens it doesn't make as much sense, and it became too difficult to intentionally overshoot in applications that depend on pull-to-refresh functionality. Task-number: QTBUG-46108 Change-Id: I3fea5324aaac1f003ead200e14b0c76bd8c0ece6 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Flickable: use wheel event pixel deltas when availableShawn Rutledge2015-02-161-1/+10
| | | | | | | | | | | | | | | | | | | Flickable can now handle wheel events which come from touchpads, providing pixel deltas instead of angle deltas. It will interpret them as distance to flick, rather than using an average-velocity physics model as it does when handling events from a physical mouse wheel. This enables much finer control and limits the tendency to "zing" way out of bounds accidentally. It is achieved by refactoring the direct-drag code which is needed for mouse dragging and for touchpad gesture dragging (and eventually touchscreen dragging) into a new internal drag() method. [ChangeLog][QtQuick][Flickable] Flickable handles pixel deltas from trackpad gestures as drags, for a more native feel Task-number: QTBUG-22407 Change-Id: Ia613ddb25f46d452603f7cb567b74e80c95a346c Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
* 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>
* Merge remote-tracking branch 'origin/5.4' into devOswald Buddenhagen2014-09-111-19/+11
|\ | | | | | | | | | | | | | | | | Conflicts: src/quick/items/qquickpainteditem.h src/quick/items/qquickshadereffectsource.cpp src/quick/items/qquickshadereffectsource_p.h Change-Id: If98096443afe85fc4370cef971eace050006a61b
| * Update license headers and add new licensesJani Heikkinen2014-08-251-19/+11
| | | | | | | | | | | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 & LICENSE.GPLv2 - Removed LICENSE.GPL Change-Id: I84a565e2e0caa3b76bf291a7d188a57a4b00e1b0 Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
* | Add Q_DECL_OVERRIDEAlbert Astals Cid2014-08-141-2/+2
|/ | | | | Change-Id: I2e64950aef710f943c3bc50bc9bf8a1f7fb58d28 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Flickable: Cancel interaction on interactive changesAlbert Astals Cid2014-07-281-0/+2
| | | | | | | | | | | Otherwise if you have a listview with a flickable inside with a mouseare inside the pressed is never set to false if you make the interactive property of the outer list depend on the moving of the inner flickable. This makes that when later you change currentIndex of the list and you have StrictlyEnforceRange set, the list won't move because it still thinks it is pressed Change-Id: I2c2021f486fc0a31840c3f2199bc7cb76dc01e3e Reviewed-by: Martin Jones <martin.jones@jollamobile.com>
* Initialize velocityAlbert Astals Cid2014-06-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes valgrind warning ==21054== Conditional jump or move depends on uninitialised value(s) ==21054== at 0x5DAE6D4: QQuickListView::viewportMoved(QFlags<Qt::Orientation>) (qquicklistview.cpp:2789) ==21054== by 0x5D9ED76: QQuickFlickablePrivate::itemGeometryChanged(QQuickItem*, QRectF const&, QRectF const&) (qquickflickable.cpp:296) ==21054== by 0x5DFC438: QQuickItemViewPrivate::itemGeometryChanged(QQuickItem*, QRectF const&, QRectF const&) (qquickitemview.cpp:1158) ==21054== by 0x5DAC6A2: QQuickListViewPrivate::itemGeometryChanged(QQuickItem*, QRectF const&, QRectF const&) (qquicklistview.cpp:1369) ==21054== by 0x5D0D5F2: QQuickItem::geometryChanged(QRectF const&, QRectF const&) (qquickitem.cpp:3365) ==21054== by 0x5D11822: QQuickItem::setY(double) (qquickitem.cpp:5858) ==21054== by 0x5C84FED: QQuickTimeLinePrivate::advance(int) (qquicktimeline.cpp:826) ==21054== by 0x5C85155: QQuickTimeLine::updateCurrentTime(int) (qquicktimeline.cpp:702) ==21054== by 0x58576FA: QAbstractAnimationJob::setCurrentTime(int) (qabstractanimationjob.cpp:497) ==21054== by 0x5857BDD: QQmlAnimationTimer::updateAnimationsTime(long long) (qabstractanimationjob.cpp:119) ==21054== by 0x640C7EC: QUnifiedTimer::updateAnimationTimers(long long) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0) ==21054== by 0x58570C8: QQmlAnimationTimer::startAnimations() (qabstractanimationjob.cpp:152) ==21054== by 0x66895B5: QObject::event(QEvent*) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0) ==21054== by 0x6659CDC: QCoreApplication::notify(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0) ==21054== by 0x66599D4: QCoreApplication::notifyInternal(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0) ==21054== by 0x665B826: QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0) ==21054== by 0x66B1242: ??? (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0) ==21054== by 0x8EE2E43: g_main_context_dispatch (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4100.0) ==21054== by 0x8EE3087: g_main_context_iterate.isra.24 (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4100.0) ==21054== by 0x8EE312B: g_main_context_iteration (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4100.0) ==21054== by 0x66B06BB: QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0) ==21054== by 0x66578EA: QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0) ==21054== by 0x665EF45: QCoreApplication::exec() (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0) Change-Id: I72e101140b8bee0b6867cf92902e70660c8d21ab Reviewed-by: Martin Jones <martin.jones@jollamobile.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Fix license headers of QtQuick sources.Gunnar Sletta2013-09-301-1/+1
| | | | | Change-Id: I3750c47640bf21c3567c5fa1c4667e3e2552942e Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Allow QtQuick private headers to be used with QT_NO_KEYWORDS.Jocelyn Turcotte2013-09-121-1/+1
| | | | | | | | | | | This is necessary for the QtWebEngine module. This also adds an empty nokeywords test using the same mechanism as qtbase/tests/auto/tools/moc/no-keywords.h to find conflicts at compile time. Change-Id: I9df541720797dd61f078178c2af68ead18ff8bfe Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Initialize lastPosAlbert Astals Cid2013-04-261-1/+1
| | | | | | | | | I was valgrinding a scene with a flickable and i come to see that in some ocassions we use lastPos before initializing it in QQuickFlickablePrivate::viewportAxisMoved Change-Id: Ibfeeefc00f62493163d5d44f676bec79a4c004c2 Reviewed-by: Matthew Vogt <matthew.vogt@qinetic.com.au>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-101-1/+1
| | | | | | Change-Id: I6c3bd7bebe3d62d1cfd0fa6334544c9db8398c76 Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Fix mouse event distribution for Flickable with pressDelayMatt Vogt2012-11-291-3/+4
| | | | | | | | | | | | | | | | If an item responds to mouse events but does not accept them, it can prevent the events from being processed by the correct item further up the parent chain. For example, a text item inside a mouse area can wrongly consume a press event, so that the following release event does not yield a click when processed by the mouse area. Rather than speculatively assigning the mouse grab to items during event filter processing, change Flickable to retain the grab for the duration of the pressDelay and to release it during replay of the press event. Change-Id: Ied12b9643838a984c7026978047465c2830e55e4 Reviewed-by: Martin Jones <martin.jones@jollamobile.com>
* Fix conditional jump based on an uninitialized value.Jędrzej Nowacki2012-11-021-1/+1
| | | | | | | | QElapsedTimer is POD and it is not initialized by default. Change-Id: Ie6997e1c4225b9ba584de52cc0c9647f26e45438 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Fix emitting originYChanged signals even when originY wouldn't changeGabriel de Dietrich2012-10-031-0/+2
| | | | | | | | | | | Same for originXChanged. Conflicts: src/quick/items/qquickflickable.cpp src/quick/items/qquickflickable_p_p.h Change-Id: I1a316f326b924da4722b692cf27db48312fc9236 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-231-24/+24
| | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: Ie7f5d49ed8235d7a7845ab68f99ad1c220e64d5c Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Update Flickable velocity/overbound for each axis independentlyMartin Jones2012-06-131-3/+7
| | | | | | | | | We were attempting to update velocities/overbound correction for both axes even if only one of them had changed, leading to inaccurate values for one of the axes. Also removes a bunch of code duplication. Change-Id: I6a50b908992c976889373f541bdd1abad462e247 Reviewed-by: Bea Lam <bea.lam@nokia.com>
* rebound property for FlickableBea Lam2012-06-081-1/+25
| | | | | | | | This property specifies the transition to be used when the flickable snaps back to its bounds. Change-Id: I2bb9680dad219a4c7c911f0e4dda37ae739349c6 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Don't emit moving and flicking signals unnecessarilyBea Lam2012-06-061-3/+4
| | | | | | | | | | | | | | | | The moving and flicking signals should only be emitted once when the view has been moved/flicked both vertically and horizontally. (This was already done correctly for the dragging signals.) Also changes QQuickFlickable::flick() to return bool instead of void. Subclasses no longer emit the flicking signals but call flickingStarted() instead. Also splits the tst_qquickflickable::movingAndDragging() test up into several tests. Change-Id: Ie527568a9702049dd0bcda18c2eb3e43d8938a18 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Rename QDeclarative symbols to QQuick and QQmlMatthew Vogt2012-02-241-14/+14
| | | | | | | | | | | | | Symbols beginning with QDeclarative are already exported by the quick1 module. Users can apply the bin/rename-qtdeclarative-symbols.sh script to modify client code using the previous names of the renamed symbols. Task-number: QTBUG-23737 Change-Id: Ifaa482663767634931e8711a8e9bf6e404859e66 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Remove commit headersAaron Kennedy2012-02-201-1/+0
| | | | | | | | These were used when we were porting from QtQuick 1 to QtQuick 2 but are no longer necessary. Change-Id: I0eeb7e13b4affdd6ab6c6dddea760afcdf38ee4f Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Multiple fast flicks with large content moves fasterMartin Jones2012-02-021-1/+4
| | | | | | | | | Repeatedly flicking quickly in a large view moves faster than the velocity of the touch. Task-number: QTBUG-18600 Change-Id: Ie6747e0d945022e0c0c5f6c5f95bc35403a14d56 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-301-1/+1
| | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: If39bd256b0fa85eba17ea30f8ab87ea27d758908 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update obsolete contact address.Jason McDonald2012-01-231-1/+1
| | | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I6a730abc0c396fb545a48b2d6938abedac2e3f1c Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com> Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Update copyright year in license headers.Jason McDonald2012-01-051-1/+1
| | | | | Change-Id: I0a8d99909cac867dce72da70b1bbcb649989a51b Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>