aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickmultipointtoucharea.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Make sure we don't modify the incoming event objects when localizingVolker Hilsheimer2020-11-191-1/+3
| | | | | | | | | | | Restore the position of the single event point after event delivery. Where possible, don't make a localized copy which explicitly shares its data with the original anyway. Instead, access the original directly. Change-Id: I5efa44c336eddeef1a1ab00dc91e2d0f223ed31d Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Use QMutable*Event classes to copy and synthesize eventsVolker Hilsheimer2020-11-181-7/+7
| | | | | | | | | | QMutableTouch/SinglePointEvent can be publicly copy constructed from their non-mutable counterparts, make use of that. Change-Id: I7f56a9f9649bb7726cca1eaddccfdc3f21d47554 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Get rid of QMutableEventPoint::stationaryWithModifiedPropertyShawn Rutledge2020-09-241-2/+2
| | | | | | | | | | | | Omitting stationary points from touch events is such a marginal optimization that this code probably isn't worth maintaining. It wasn't implemented correctly this time either, according to the tst_QQuickMultiPointTouchArea::stationaryTouchWithChangingPressure() test. Task-number: QTBUG-77142 Change-Id: I1ccc8ffe0451d6417add2b03c063ac1aebe36e8e Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Rename PointingDeviceUniqueId QML type to lowercaseUlf Hermann2020-09-191-1/+1
| | | | | | | | | Value types should be lowercase and this one is not a QObject. It's also undocumented. Therefore we should be able to rename it without much drama. Change-Id: I7ae75aca5e592c9bee2a33ec3c36ed2ffa1edecd Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Remove QQuickPointerEvent etc.; deliver QPointerEvents directlyShawn Rutledge2020-09-181-14/+19
| | | | | | | | | | | | | | | | | | | | | | | QEventPoint does not have an accessor to get the QPointerEvent that it came from, because that's inconsistent with the idea that QPointerEvent instances are temporary, stack-allocated and movable (the pointer would often be wrong or null, therefore could not be relied upon). So most functions that worked directly with QQuickEventPoint before (which fortunately are still private API) now need to receive the QPointerEvent too, which we choose to pass by pointer. QEventPoint is always passed by reference (const where possible) to be consistent with functions in QPointerEvent that take QEventPoint by reference. QEventPoint::velocity() should be always in scene coordinates now, which saves us the trouble of transforming it to each item's coordinate system during delivery, but means that it will need to be done in handlers or applications sometimes. If we were going to transform it, it would be important to also store the sceneVelocity separately in QEventPoint so that the transformation could be done repeatedly for different items. Task-number: QTBUG-72173 Change-Id: I7ee164d2e6893c4e407fb7d579c75aa32843933a Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Begin handling the QEvent refactoringShawn Rutledge2020-07-151-23/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | This is an intermediate step to get Qt Quick working again after qtbase 4e400369c08db251cd489fec1229398c224d02b4. - QQuickEventPoint::id() is no longer unique across devices, because now eventPoint.event.device tells which specific device the event comes from. (In Qt 5, we could not yet add the device pointer to QInputEvent.) - However, MultiPointTouchArea's docs say that each pointId is unique, and so do the HandlerPoint docs (for similar use cases with PointHandler). So we still need the same hack using a Qt-specific short device ID to unique-ify the QEventPoint::id(). Now we use the device index in QInputDevice::devices() as the short ID. - Otherwise, we trust QInputDevice::systemId() and QEventPoint::id() more than before. - Use QMutable* classes from qevent_p.h to continue using setters that were in QTouchEvent before, etc. But setTouchPoints() is not there, so we have to make new event instances in a couple of cases. - QGuiApplicationPrivate::setMouseEventCapsAndVelocity() and setMouseEventSource() are gone. - Use (compiler-written) event copy constructors when possible. Task-number: QTBUG-72173 Change-Id: I3915dc535ae4c5a81cbf333aba9355f01c420c15 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Replace QTouchEvent::TouchPoint with QEventPointShawn Rutledge2020-07-151-19/+19
| | | | | | | | | | | | It's a cosmetic change at this time, because we have declared using TouchPoint = QEventPoint; Also replace Qt::TouchPointState enum with QEventPoint::State. Task-number: QTBUG-72173 Change-Id: Ife017aa98801c28abc6cccd106f47a95421549de Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Use QList instead of QVectorJarek Kobus2020-06-251-1/+1
| | | | | | Task-number: QTBUG-84469 Change-Id: I4c3353c00a566023503fbc178ba8454391dc334c Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Remove QQuickPointerDevice in favor of QPointingDeviceShawn Rutledge2020-06-231-1/+1
| | | | | | | | | | | | | | ...and generally deal with changes immediately required after adding QInputDevice and QPointingDevice. Also fixed a few usages of deprecated accessors that weren't taken care of in 212c2bffbb041aee0e3c9a7f0551ef151ed2d3ad. Task-number: QTBUG-46412 Task-number: QTBUG-69433 Task-number: QTBUG-72167 Change-Id: I93a2643162878afa216556f10808fd92e0b20071 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* MultiPointTouchArea: don't emit canceled() during ordinary touch releaseShawn Rutledge2020-06-221-2/+3
| | | | | | | | | | | Amends 0012f8bd152a36a67abc696465f27d612625b5d9. For some reason tst_QQuickMultiPointTouchArea::inFlickableWithPressDelay()'s check QCOMPARE(flickable->property("cancelCount").toInt(), 0); passed on Qt 5, but we get a canceled() signal in Qt 6. Task-number: QTBUG-78818 Change-Id: Ib77bc4fc5774bd697247351c274bb5deb8cc4009 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Replace calls to deprecated QEvent accessor functionsShawn Rutledge2020-06-111-24/+24
| | | | | | | | | | | | | | | | | | | | Several event accessors were deprecated in qtbase/24e52c10deedbaef833c0e2c3ee7bee03eacc4f5. Replacements were generated by clazy using the new qevent-accessors check: $ export CLAZY_CHECKS=qevent-accessors $ export CLAZY_EXPORT_FIXES=1 $ ../qt6/configure -platform linux-clang -developer-build -debug -no-optimize-debug -opensource -confirm-license -no-pch QMAKE_CXX=clazy $ make $ cd ../../qt6/qtdeclarative $ find . -name "*.clazy.yaml" $ clang-apply-replacements . Task-number: QTBUG-20885 Task-number: QTBUG-84775 Change-Id: I1be5819506fd5039e86b4494223acbe193e6b0c9 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Avoid deprecated TouchPoint rect accessors in MPTA and QQWinPrivShawn Rutledge2020-04-071-1/+3
| | | | | | | Followup to 0124f73dfb779924e46eb8b319358dbbd5af2577 Change-Id: I8fa2e2fc8eae7a789a9d5e846f34c767c688b0e1 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Remove hard-coded notes for 'Corresponding handler' for QML signalsTopi Reinio2020-03-101-12/+0
| | | | | | | | QDoc will generate these notes automatically. Task-number: QTBUG-37355 Change-Id: I8ed058ecbbcc630ad0351f6ce167c3fa61936f6f Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* MultiPointTouchArea: update the TouchPoint.x and y properties togetherShawn Rutledge2020-02-151-16/+12
| | | | | | | | | Letting them change sequentially is inconvenient when they are used to drive some sort of smooth stroke (drawing or motion). Fixes: QTBUG-81944 Change-Id: I46c5948dbec927682244daf00a0df3453a0d92a6 Reviewed-by: Michael Brasser <michael.brasser@live.com>
* MultiPointTouchArea: stop ignoring Qt-synthesized mouse eventsShawn Rutledge2019-11-261-20/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | We ignored them because we assume that if a touch event is sent first, the MultiPointTouchArea will handle it; and then if a synth-mouse event is sent afterwards for some reason, it's irrelevant to MPTA. However: 1) A synth-mouse event should not actually be sent, because MPTA accepts the touch event. 2) If Flickable is used with pressDelay set, Flickable will send the delayed press in the form of a mouse event (it does not know how to replay a touch event at all). So if MPTA is used in a ListView delegate for example, it's necessary for MPTA to react to a synth-mouse event during replay. In both the press delay replay and QTabletEvent scenarios, the mouse event has source() set to MouseEventSynthesizedByQt, so MPTA needs to handle those events. After a synth-mouse event during replay, MPTA can still receive an actual touch release, which thoroughly confuses its pre-existing logic. In that case it helps to check whether the touchpoint ID is the same as QQuickWindowPrivate::touchMouseId, handle the release of that point, and also release the internal synthetic _mouseQpaTouchPoint which was remembered from the mouse press. Fixes: QTBUG-75750 Fixes: QTBUG-78818 Change-Id: I8149f8b05f00677eb07a2f09b725b1db5f95b122 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Handle "interesting" stationary touchpoints as if they movedShawn Rutledge2019-09-241-1/+3
| | | | | | | | | | | | | | | | | | | | Qt Quick will not receive "uninteresting" stationary touchpoints, but only those in which some property has changed. So MultiPointTouchArea should react to stationary touchpoints in the same way as if they moved, so that UIs can react to changes in touchpoint velocity, pressure etc. And QQuickWindow has to be willing to delivery stationary touchpoints to make this possible. However when a QTouchEvent is customized for delivery to a specific Item, by including only the touchpoints that are inside the Item, then if those touchpoints are all stationary, the event only needs to be delivered if at least one of them is an "interesting" stationary touchpoint. So we need to depend on a new per-touchpoint flag that QGuiApplication will set when it discovers that some property of the touchpoint has changed. That is QTouchEventTouchPointPrivate::stationaryWithModifiedProperty. Fixes: QTBUG-77142 Change-Id: I763d56ff55c048b258dca40d88283ed016447c35 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Doc: Fix documentation warnings for qtdeclarativeTopi Reinio2019-08-291-1/+1
| | | | | | | | | | | | | | | After recent changes to QDoc, it now correctly warns about missing documentation for QML method parameters - fix all of these and also do some minor language editing. Remove duplicated entries for - \qmlmodule Qt.labs.qmlmodels - \group qtjavascript as they were causing issues. Change-Id: I55cd670cc8a0cc6427cdb7945dbd7c28ea94f796 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* MultiPointTouchArea: capture the mouse position on pressShawn Rutledge2018-08-301-0/+3
| | | | | | | | | | | | | | | | | | | | | QTouchEvent::TouchPoint already remembers the start position from where the touch point was pressed. But when MPTA handles mouse events, it populates a synthetic touchpoint (the _mouseQpaTouchPoint variable). So to be fully consistent, it needs to store the mouse press position there too. Since this was not done, gestureStarted was emitted for almost any mouse movement (while pressed) because the stored startPos was 0,0, so MPTA would nearly always think the drag threshold had already been exceeded. In a QML onGestureStarted callback gesture.touchPoints[0].startX and startY were always zero too. Amends fe2de633f9b9454ec8a9c2a5874ad85f49d8d54d Fixes: QTBUG-70258 Change-Id: I5bc0abbe0cb52c1aa02d60a76c52ec26bb0683e6 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Doc: Add missing dots (qtdeclarative)Paul Wicking2018-06-191-3/+3
| | | | | | Task-number: QTBUG-68933 Change-Id: Ibb5aa227e82825085e7214e17dcffcb17fd44157 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* use nullptr consistently (clang-tidy)Shawn Rutledge2018-02-261-9/+9
| | | | | | | | | | | | | 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-01-091-0/+37
|\ | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/qml/memory/qv4mm.cpp src/qml/qml/qqmlbinding.cpp Change-Id: I98e51ef5af12691196da5772a07d3d53d213efcc
| * Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2018-01-041-0/+37
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/memory/qv4mm.cpp src/qml/memory/qv4mmdefs_p.h src/quick/items/qquickwindow.cpp src/quick/items/qquickwindow_p.h tests/auto/qml/debugger/qqmlprofilerservice/qqmlprofilerservice.pro tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp Change-Id: I7021fa1edf076627a67048f41f7b201220262b09
| | * Document QQuickGrabGestureEventShawn Rutledge2017-11-171-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Documentation has been missing since the beginning. Making it an uncreatable type provides the opportunity to associate the C++ type with the QML type so that the latter can be used in the QML documentation, as opposed to simply registering the C++ type with no QML name as was done before. Task-number: QTBUG-47290 Task-number: QTBUG-63143 Change-Id: Ib82cc7b27c9591eaf2c7997d2781a2b4246cfbff Reviewed-by: Michael Brasser <michael.brasser@live.com>
* | | Replace Q_NULLPTR with nullptrKevin Funk2017-09-271-2/+2
|/ / | | | | | | | | Change-Id: I0c01862dbb475494c84e39c695cb563df8cbcfa8 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Merge remote-tracking branch 'origin/dev' into wip/pointerhandlerShawn Rutledge2017-05-081-2/+2
|\| | | | | | | Change-Id: Ia06843de255547174efa556b1ab76be4b4be4287
| * Run includemocs in qtdeclarativeThiago Macieira2017-04-261-0/+2
| | | | | | | | | | Change-Id: I84e363d735b443cb9beefffd14b8c023a37aa489 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * Doc: remove reference to no longer existing propertiesNico Vertriest2017-04-211-2/+0
| | | | | | | | | | | | | | | | qquickmultipointtoucharea.cpp:170: warning: Can't link to 'horizontalDiameter' qquickmultipointtoucharea.cpp:170: warning: Can't link to 'verticalDiameter' Change-Id: Ib1cf7c634457f1557631d0e6ffdc942917746e04 Reviewed-by: Martin Smith <martin.smith@qt.io>
* | Add QQuickItem acceptTouchEvents/setAcceptTouchEvents; require for touchShawn Rutledge2017-04-141-0/+1
|/ | | | | | | | | | | | | | | | | | | | | | 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>
* MultiPointTouchArea.TouchPoint: add rotation, uniqueId and ellipseDiametersShawn Rutledge2017-01-041-2/+71
| | | | | | | | | So far uniqueId and rotation are mainly applicable to TUIO. Deprecate the area property in favor of ellipseDiameters. Also improve the mpta-crosshairs manual test to show this information. Change-Id: I16ea6618ae21ce66dac45638d6e2bb3c0a3b1818 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Fix mouse and touch grabbing issuesFrederik Gladhorn2016-10-041-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | We keep track of the touch device and point ID, but didn't use them when queried for the mouse grabber. When setting the grabber, also take touch into account. Qt Location's touch/mouse handling, when it called the grab functions was not working correctly, because in QQuickWindow, we'd check for the old grabber and due to not checking the device/id, we'd get the wrong item, which would then result in the ungrab function not being called. When some item steals the grab for a touch point that was previously accepted as a synthetic mouse point, there was a high chance we would fail to deliver a mouse ungrab event. Make sure to ungrab the mouse as soon as we find any point with the corresponding ID. In addition, the multi point touch area tried to grab ids which were invalid (-1), avoid that. Task-number: QTBUG-55229 Task-number: QTBUG-56213 Change-Id: I73e4587bf4f94a65d88c5b60d93bc07743512e56 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* Rename parameter i to receiver in ↵Frederik Gladhorn2016-10-041-3/+3
| | | | | | | QQuickMultiPointTouchArea::childMouseEventFilter Change-Id: I7b936bd13d9e797ea4ed76a72ae1ff87b0d5b640 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Quick: replace 'foreach' with 'range for'Anton Kudryavtsev2016-08-181-10/+10
| | | | | Change-Id: I3493b16a184fc811289db9e98eff37bb987113a3 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Quick: use const (and const APIs) moreAnton Kudryavtsev2016-08-121-2/+2
| | | | | | | | For CoW types, prefer const methods to avoid needless detach()ing. Change-Id: I270cdc6eb8c5946f5c20b379bbb7c60f0ba518eb Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Reduce duplicated code in MultiPointTouchAreaFrederik Gladhorn2016-08-021-22/+9
| | | | | Change-Id: I807a8bab270813ea62bd5028eae45910aeb65bbb Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Add cross-backend simple rect, texture, and ninepatch nodesLaszlo Agocs2016-06-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | QSGSimpleRectNode is deprecated -> use QSGRectangleNode via QQuickWindow::createRectangleNode() instead. QSGSimpleTextureNode is deprecated -> use QSGImageNode via QQuickWindow::createImageNode() instead. The OpenGL version of the simple rectangle node is switched over to the vertex color material instead of flat, to allow for better batching. Use the same concept for nine patch nodes. The "style" node from Quick Controls 1 is now QSGNinePatchNode in order to provide a proper cross-backend solution which is already necessary due to the software backend, but now generalize it to apply to the accelerated backends with proper materials as well. QC can now simply call createNinePatchNode() without further ado. Also fixes a bug with the D3D12 texture material not enabling blending when needed. When it comes to the internal class names, QSGRectangleNode and QSGImageNode get the Internal prefix in the adaptation layer in order to differentiate from the public API. This involves quite a lot of renaming, but results in a nice and clean public API. Change-Id: Iddf9f9412377843ea6d652bcf25e68d1d74659ea Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* 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>
* Quick: fix expensive iteration over QHash::keys() and QMap::keys()Anton Kudryavtsev2016-01-181-1/+5
| | | | | Change-Id: I21c48214bfddde01f71710705fe01418818a6581 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* MultiPointTouchArea: Fixed released() duplication on mouse release.Alexandr Akulich2015-12-021-6/+2
| | | | | | | | | | | | | | | | | | | | MousePress and MouseRelease event handlers now better integrated into generic touch processing methods. We used to manually add a touch point for mouse press event and prevent updateTouchData() from pressed() emission, but mouseRelease handler used to cause the signal emission in updateTouchData() and then emit the signal on its own. The code reworked to always emit pressed() and released() signals from the single place in updateTouchData(). [ChangeLog][QtQuick][MultiPointTouchArea] Fixed released() signal duplication on mouseReleaseEvent. Task-number: QTBUG-44370 Change-Id: I2d88931ba56d6edf778213c61e9467c2b6abf0e7 Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
* Handle TouchCancel events in MultiPointTouchArea.Andrew den Exter2015-09-151-0/+6
| | | | | | | | Ensure canceled has been emitted and the touch point press states have been reset after a touch cancel event. Change-Id: I421e8e4bdc6793b5ddc4b905ffecef91cf61ed9d Reviewed-by: Martin Jones <martin.jones@qinetic.com.au>
* Fix invocations of static methods of QGuiApplication/QCoreApplication.Friedemann Kleint2015-03-051-1/+1
| | | | | Change-Id: I7bcc209b0c6e77cf6d974af85a19487345a48975 Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
* Cleanup math function includes and usageAllan Sandfeld Jensen2015-02-191-1/+0
| | | | | | | | Use std::math on floats and doubles, and qMath on qreals, and only include the math headers actually needed. Change-Id: I1d511d7b1bac0050eaa947c7baee760b736858bf Reviewed-by: Sean Harmer <sean.harmer@kdab.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>
* 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>
* MultiPointTouchArea: Guard _mouseTouchPoint with a QPointer.Robin Burchell2014-08-081-1/+0
| | | | | | | | | | | | The touch point can be deleted (for instance, on ungrab()) without _mouseTouchPoint being reset occurs. This caused a crash on tst_qquickmultipointtoucharea::inFlickable with MallocScribble=1 enabled on OS X (use-after-free). Change-Id: Ife9f59d75827285b18bb1772ddbee30d79a3f0b5 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Fix potential null pointer dereferencingFrederik Gladhorn2014-05-301-1/+1
| | | | | | | | | These were found by http://www.viva64.com/en/b/025 most issues are rather cosmetic. Change-Id: I7cc12610aae6a43d26bedb9b480863c0695ddfa3 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Doc: Document signals (not handlers) under \qmlsignalSze Howe Koh2014-03-181-18/+30
| | | | | | | | Append the handler names to the end of the corresponding signal doc. Task-number: QTBUG-35846 Change-Id: I3d627ba7ed5be94e5c402ab092b4d582536499e8 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* MultiPointTouchArea: handles mouse too, unless mouseEnabled is falseShawn Rutledge2014-03-101-10/+146
| | | | | | | | | | | | | | | | | | | A new boolean property mouseEnabled is introduced (true by default). If set to true, then it will handle any non-synthetic mouse event as if it were a touch point. If set to false, the area becomes transparent for real mouse events so that a MultiPointTouchArea can be stacked on top of a MouseArea in order to separate handling of touch and mouse. In either case it continues to absorb and ignore synthesized mouse events (including touch-to-mouse synthesis in QQuickWindow). [ChangeLog][QtQuick][MultiPointTouchArea]handles mouse as a touchpoint; added mouseEnabled property to permit transparent pass-through to mouse-sensitive items Change-Id: I4af94d838f0060154494589c0f15c6858ee89ddb Task-number: QTBUG-31047 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Merge remote-tracking branch 'origin/stable' into devSimon Hausmann2014-01-241-18/+20
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: src/imports/dialogs/qquickmessagedialog.cpp src/imports/dialogs/qquickmessagedialog_p.h src/qml/debugger/qqmlprofilerservice_p.h src/qml/jsruntime/qv4regexpobject.cpp tests/auto/qml/debugger/qqmlprofilerservice/qqmlprofilerservice.pro Change-Id: Ic8a43366b44d6970966acbf03b206d0dee00c28d
| * Improve Mac OS X touch event enabling.Morten Johan Sørvig2014-01-171-18/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, the Qt Quick touch interaction items would enable touch events on window change. On app startup this would typically happen before the platform window was created, and the call to registerTouchWindow would then create the platform window. registerTouchWindow in QtBase has now been changed to not create the platform window since this has unwanted side effects. Calling it at window change time will then have no effect for the initial window change. Enable and disable touch events on hoverEnter/Leave instead. This is similar to what QtWidgets does and has an additional benefit: touch events can now be enabled when the mouse cursor is hovering over a touch item, reducing the chances of it interfering with scroll events for other items. Task-number: QTBUG-32988 Change-Id: Ic48dbec910f52299d5068f5ca7508be73cdc6f36 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | Ignore mouse events synthesized by the OS in Quick2Laszlo Agocs2013-10-141-0/+5
|/ | | | | | | | | | | Make QQuickWindow ignore mouse events generated by the system from touch events (e.g. on Windows). This will allow us to remove the mousefromtouch parameter for the windows plugin and restore accepting all mouse events in the platform plugin as the default behavior. Change-Id: I82ff5fa97b02ebc69b61735e2366176e0a6a406c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>