aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickwindow.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
| * Doc: Fix capitalization in section titlesTopi Reinio2017-08-291-1/+1
| | | | | | | | | | | | | | | | ...and fix some section titles to be less confusing. Change-Id: If83c3faffead9e2e9be7fc0fb360f1c5b8b1bb51 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Nico Vertriest <nico.vertriest@qt.io>
| * Fix crash in mouseGrabberItemSune Vuorela2017-08-231-2/+1
| | | | | | | | | | | | | | | | | | | | Under certain circumstances, point can be null. All users of mouseGrabberItem does check for nullpointers, so it should be safe. Task-number: QTBUG-62055 Change-Id: I1d53b7980efa4fe149714a65f35d05fa306efb06 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | Merge dev into 5.10Frederik Gladhorn2017-09-021-2/+3
|\ \ | | | | | | | | | Change-Id: I4376b711fbf02ea978f5d347d34a4a6a0c95dab2
| * | optimization: get acceptedButtons before checking it twiceShawn Rutledge2017-08-251-2/+3
| | | | | | | | | | | | | | | | | | | | | It also makes debugging easier to be able to see this value. Change-Id: I4d68e7561cbc533a6cd3296a3b193732eb7f8d3e Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* | | failsafe: never allow touch or mouse grab to persist after releaseShawn Rutledge2017-08-291-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a PointerHandler acquires a passive grab and we fail to remove it, then next time the mouse moves, a filtering parent Flickable will have a chance to see the mouse hover movement in the course of delivery to that handler, and will grab. Thus you are stuck in flicking state even though no mouse button is held. Passive grabs must therefore always be cleared on release. Change-Id: Ibaf46de32d7855e7b5f377c2d4fdae1312601c4f Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* | | Fix some qdoc warnings for 5.10Friedemann Kleint2017-08-281-1/+1
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qtdeclarative/src/imports/shapes/qquickshape.cpp:577: warning: Command '\li' outside of '\list' and '\table' qtdeclarative/src/imports/shapes/qquickshape.cpp:585: warning: Command '\li' outside of '\list' and '\table' qtdeclarative/src/imports/shapes/qquickshape.cpp:592: warning: Command '\li' outside of '\list' and '\table' qtdeclarative/src/imports/shapes/qquickshape.cpp:596: warning: Command '\li' outside of '\list' and '\table' qtdeclarative/src/imports/shapes/qquickshape.cpp:602: warning: Command '\li' outside of '\list' and '\table' qtdeclarative/src/imports/shapes/qquickshape.cpp:608: warning: Unexpected '\endlist' qtdeclarative/src/quick/handlers/qquickpinchhandler.cpp:138: warning: Missing property type for QQuickPinchHandler::minimumX qtdeclarative/src/quick/handlers/qquickpinchhandler.cpp:151: warning: Missing property type for QQuickPinchHandler::maximumX qtdeclarative/src/quick/handlers/qquickpinchhandler.cpp:164: warning: Missing property type for QQuickPinchHandler::minimumY qtdeclarative/src/quick/handlers/qquickpinchhandler.cpp:177: warning: Missing property type for QQuickPinchHandler::maximumY qtdeclarative/src/quick/items/qquickitem.cpp:7241: warning: No such parameter 'enabled' in QQuickItem::setAcceptTouchEvents() qtdeclarative/src/quick/items/qquickitem.cpp:7241: warning: Undocumented parameter 'accept' in QQuickItem::setAcceptTouchEvents() qtdeclarative/src/quick/items/qquickwindow.cpp:4829: warning: No such parameter 'backend' in QQuickWindow::sceneGraphBackend() Change-Id: Iec2ced892e068317c60517cedacc27e8c82b26b3 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | Restore filtering behaviorShawn Rutledge2017-08-241-11/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We cannot cull pairs from filteringParentItems ahead of time on the basis of not visiting the same parent twice, because we don't know which child will get the press event. Skipping parents which have already seen the event once MUST be done during event delivery, as it was done before 9b5fc80af28580e9672792dd511d876a93947882 But another behavior difference is that the same parent can filter twice, if it's filtering the same event on behalf of a different item. For example: ListView delegate: Rectangle MouseArea Text If you click on the text, the MouseArea can filter for the Text, then ListView filters for the Text. Nobody accepts. So we try to deliver to the MouseArea; and then ListView filters again, this time for the MouseArea. So we need to go back to interleaving regular delivery and parent-filtering to get back to the behavior we had in 5.9. It's not the same if we try to do all the parent-filtering first, and then all the regular delivery afterwards. Revises and reverts parts of 1b0c9b46ce13b0f9c533f18fb420ff10ad56e4f6 Done-with: Jan Arve Sæther Task-number: QTBUG-62412 Task-number: QTBUG-62549 Task-number: QTBUG-62628 Task-number: QTBUG-62631 Change-Id: Id0bf64cb54668cc0eecfba01746a00ed7ea0359f Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* | improve cat. logging during event delivery to child-filtering itemsShawn Rutledge2017-08-231-8/+8
| | | | | | | | | | | | | | | | It's useful to see target items and parents which need to filter events for them, together. Change-Id: I2d072a91ccb382077caf71b7413a9a10b34cb121 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* | Add a way to set the default render type of text-like elementsGiuseppe D'Angelo2017-08-231-0/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | f3446071da8357620d0c8593a04e3b4fbba88f21 introduced a build-time way to select the default render type of text-like elements. This patch adds also a way to select it at runtime, via a setter on QQuickWindow. (QQuickWindow has been chosen as convenience, rather than adding another namespace/class to just have this setter.) Given that QT_QUICK_DEFAULT_TEXT_RENDER_TYPE was never documented, I've taken the liberty of changing the accepted values for it (to match the new enumerator names in QQuickWindow, rather than the ones in QQuickText/QQuickTextEdit/etc.). [ChangeLog][QtQuick][QQuickWindow] It is now possible to set the default render type of text-like elements globally via the QQuickWindow::setTextRenderType() function. If you were using the (undocumented) QT_QUICK_DEFAULT_TEXT_RENDER_TYPE macro when building Qt Quick for the same purpose, note that the macro value needs now to be set to the "NativeTextRendering" value, instead of "NativeRendering". Change-Id: Id4b2dc3ec823971486e445ca4173b8be848fb4e3 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | Fix some bugs related to child mouse filteringwip/pointerhandlerJan Arve Saether2017-08-081-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Only abort event delivery early if event that got filtered was accepted (previously we aborted as soon as the event got filtered, even if the event was filtered, but explicitly *not* accepted) - If the event that got filtered was *not* accepted, we do not abort event delivery, but we need to remove the item from the list of target items that we will deliver to later - If childMouseEventFilter returns true it should not automatically mean that the event was accepted. Change-Id: I2f2415379061131af1d5102e03d01f010e1a8168 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* | Merge remote-tracking branch 'origin/dev' into wip/pointerhandlerShawn Rutledge2017-08-081-3/+3
|\ \ | | | | | | | | | Change-Id: I0af7b0c3e0a21aae68c82ec11c5ca579c1661ce9
| * | Merge remote-tracking branch 'origin/5.9' into devSimon Hausmann2017-07-281-0/+2
| |\| | | | | | | | | | Change-Id: I7d092cce33cb009d63e7b0df7c71183089dea53f
| | * Doc: link to Qt::WindowFlags in Window's flag docMitch Curtis2017-07-131-0/+2
| | | | | | | | | | | | | | | Change-Id: I0d5f03bcdcf9154431ed38eac2b41b622ad0c3d6 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
| * | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-07-041-3/+1
| |\| | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/quick/doc/src/qmltypereference.qdoc Change-Id: Ia58f1c5a98309c32ef8d8e5c893faf261215f19f
| | * Fix typo in QQuickWindow::setRenderTarget warningGunnar Sletta2017-06-221-1/+1
| | | | | | | | | | | | | | | Change-Id: Idc4521e142603ee37a71acdae63ec750fa970d71 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| | * Delay the deletion of QSGTextures until all windows are synchronizedDominik Holland2017-06-161-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the 'basic' and the 'windows' render loop the scene graph context is shared. Because of this we cannot start deleting textures after the first window is synchronized as it may contain textures needed by the another window, which is not yet synchronized. QWindowPrivate::syncSceneGraph() is not calling endSync() anymore as it doesn't know whether it is the last window or not. Instead the renderloop is now responsible for calling endSync() once this is safe to do. Change-Id: Icb50ebfb447c928e38b41df7e26f3bfafdb4a811 Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com> Reviewed-by: Gunnar Sletta <gunnar@crimson.no>
* | | Merge remote-tracking branch 'origin/dev' into wip/pointerhandlerJan Arve Saether2017-07-111-17/+54
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/quick/shared/LauncherList.qml src/quick/items/qquickevents.cpp src/quick/items/qquickevents_p_p.h src/quick/items/qquickwindow.cpp tests/auto/quick/touchmouse/tst_touchmouse.cpp Change-Id: Id692d291455093fc72db61f1b854f3fc9190267b
| * | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-06-071-5/+3
| |\| | | | | | | | | | Change-Id: I61ab3d0bd8cc02f640c60c037226eace09ec09ba
| | * QQuickWindow/View: set a QObject-parent on the root itemJ-P Nurmi2017-06-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | People are often confused why eg. the objects from: window->contentItem()->findChildren() are not included in window->findChildren(). This change connects the item tree to the window's object tree to make findChild() and findChildren() produce expected results. The same technique is already used for QQuickFlickable's contentItem. [ChangeLog][QtQuick][QQuickWindow] Set the window as the QObject-parent of the contentItem to ensure consistent behavior for calling findChildren() on QQuickWindow and QQuickWindow::contentItem. [ChangeLog][QtQuick][QQuickView] Set the window's contentItem as the QObject-parent of the rootObject to ensure consistent behavior for calling findChildren() on QQuickWindow::contentItem and QQuickView::rootObject. Change-Id: Idb7834eb5e560088ca849e6ce90e6fa3b3ae3e91 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| | * Revert "QQuickWindow::createTextureFromImage(): return nullptr for null images"Mitch Curtis2017-06-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit e6acf80136db9f667d0d4664f6c68065355d6811. This breaks behavioral compatibility. Task-number: QTBUG-61083 Change-Id: I0161d536502bab31aaf4ebc38f91e6c8842f72b0 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| | * Merge remote-tracking branch 'origin/5.9.0' into 5.9Liang Qi2017-05-311-4/+1
| | |\ | | | | | | | | | | | | Change-Id: I3f77593ca944114534fff5df26bbb09150ee4400
| | | * Revert "Temporarily restore QQuickPointerDevice::pointerEvent() accessor"v5.9.0-rc2v5.9.0-rc1v5.9.0Shawn Rutledge2017-05-201-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit ee6b07b3ce8ba80632868181d45d96253acb1064. This is to be integrated after the qtlocation change to remove the dependency on this private function. Task-number: QTBUG-57253 Change-Id: I756681fb2595d1326b7e5206bac57ccc318c0a46 Reviewed-by: Liang Qi <liang.qi@qt.io>
| * | | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-06-061-18/+57
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/qml/jsruntime/qv4argumentsobject.cpp src/qml/jsruntime/qv4arraydata.cpp src/qml/jsruntime/qv4context.cpp src/qml/jsruntime/qv4context_p.h src/qml/jsruntime/qv4errorobject.cpp src/qml/jsruntime/qv4functionobject.cpp src/qml/jsruntime/qv4internalclass.cpp src/qml/jsruntime/qv4lookup.cpp src/qml/jsruntime/qv4managed.cpp src/qml/jsruntime/qv4managed_p.h src/qml/jsruntime/qv4object.cpp src/qml/jsruntime/qv4object_p.h src/qml/jsruntime/qv4qmlcontext.cpp src/qml/jsruntime/qv4runtime.cpp src/qml/jsruntime/qv4vme_moth.cpp src/qml/memory/qv4heap_p.h src/qml/memory/qv4mm.cpp src/qml/memory/qv4mm_p.h src/qml/memory/qv4mmdefs_p.h src/quick/scenegraph/util/qsgdistancefieldutil.cpp src/quick/scenegraph/util/qsgdistancefieldutil_p.h tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp Change-Id: I7ed925d4f5d308f872a58ddf51fdce0c8494ec9c
| | * | Merge remote-tracking branch 'origin/5.9.0' into 5.9Liang Qi2017-05-191-1/+4
| | |\| | | | | | | | | | | | | Change-Id: I52c591fff08a0cbf426aa53354850fb4b5f130c1
| | | * Temporarily restore QQuickPointerDevice::pointerEvent() accessorShawn Rutledge2017-05-121-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This can be reverted as soon as the relevant qtlocation change is integrated. Task-number: QTBUG-57253 Change-Id: I72b71f61ba8fe421ac57c963801176098fe9f11c Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
| | * | QQuickWindow::createTextureFromImage(): return nullptr for null imagesMitch Curtis2017-05-151-1/+1
| | |/ | | | | | | | | | | | | Change-Id: Idf3315be104e058315d82893443e1c27d1d79f2e Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| | * Move pointerEvent instance to QQuickWindowJan Arve Saether2017-05-101-11/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With two or more windows, if events are being delivered to each, the grabbers can be different in each. We need unique instances of the QQuickPointerEvent objects for each window to avoid losing the grab state in the parent window while delivering a synthesized event to a subwindow, for example. Change-Id: I51da1212d573853969e32ad78f5b219d979a8a5c Task-number: QTBUG-57253 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| | * Fix hover delivery in case of touch release eventsFrederik Gladhorn2017-05-101-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes tst_TouchMouse::hoverEnabled. It turns out that the problem is that QQuickWindowPrivate::flushFrameSynchronousEvents would deliver artificial hover events which (due to the nature of the function) would arrive without being synchronized with the test. This should not be a problem as such, but there was one bug: the hover event would also be sent in case of a touch release event. The definition of when to "pretend hover" is a bit shaky, but we should definitely not send hover events after touch releases. By clearing lastMousePosition instead of setting it to where the touch point is released we no longer receive bogus events. Task-number: QTBUG-55350 Change-Id: I4dea54740e37182f66c4a729d7b06a1c770c34a9 Reviewed-by: Robin Burchell <robin.burchell@crimson.no> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | * Fix remaining QQWindow qCDebugs to show eventpoint IDs in hexShawn Rutledge2017-05-041-2/+2
| | | | | | | | | | | | | | | Change-Id: I04122218499733856136f5a49b72707a0e8885e5 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
| | * Doc: fix 'adpatation' -> 'adaptation'Jüri Valdmann2017-05-031-2/+2
| | | | | | | | | | | | | | | Change-Id: Ia852d86d9b9585a1d3d9b07eb8b48361d61c5671 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* | | Fix some problems with MouseDblClick handlingJan Arve Saether2017-05-261-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The sequence of events delivered from a double click is: [Press,Release,Press,DblClick,Release] The problem was that a DblClick was delivered just like a press event, so it would clear the passive grabber that was established because of the former Press event. When the Release event then got processed, there was therefore a risk that the Release event was not delivered to the passive grabber. The fix is to not deliver DblClick events at all to handlers, and to not deliver DblClick to items if the former Press event was accepted by a handler. Change-Id: I49c0e32ef4e33f7b6014d35dc065da2527b94779 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* | | Start over with event delivery when touchpoint releases occurShawn Rutledge2017-05-221-14/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new rule is that when the number of touchpoints changes, we start over with event delivery as if the touch had just begun, to give more opportunities to hand off processing from one item or handler to another. And MultiPointTouchArea can now handle the handoff: for example in tests/manual/pointer/pinchDragFlingMPTA.qml when the user is pressing three fingers, the PinchHandler is active; when the user then lifts one finger, the MPTA can resume handling the two remaining touchpoints as if they were just pressed. The change in QQuickMultiPointerHandler::wantsPointerEvent is both a behavior change and an optimization: released points aren't eligible; but if some points are released, then pressed, updated and stationary points are all eligible. And, figure this out without looping over the points twice. Change-Id: I26b7593de8e72b471adfec4a4482dd87a8288442 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* | | Default QQuickItem::acceptTouchEvents to true until Qt 6Shawn Rutledge2017-05-101-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Only send filtered events to the parent of the receiverJan Arve Saether2017-05-081-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | If receiver is nullptr, all filteringParentItems are candidates for filtering. Change-Id: I9c388a9a2e83c1f5815c99c059f0e507e0bc1040 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Merge remote-tracking branch 'origin/dev' into wip/pointerhandlerShawn Rutledge2017-05-081-1/+20
|\| | | | | | | | | | | Change-Id: Ia06843de255547174efa556b1ab76be4b4be4287
| * | Merge remote-tracking branch 'origin/5.9' into devLars Knoll2017-05-021-1/+16
| |\| | | | | | | | | | Change-Id: I71275a2076c3d32ee2896571be882067320a2e9e
| | * Add a method to query the scene graph backendMichael Brüning2017-04-271-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since 5.8, it has been possible to set the scene graph backend using QQuickWindow::setSceneGraphBackend instead of using the environment variables. This caused some trouble with modules that need to know which backend is used and relied on the environment variables or command line options for getting this information. One example of such a module is Qt WebEngine, which crashed because it ended up trying to use OpenGL resources with the Qt Quick scenegraph software backend. Task-number: QTBUG-60232 Change-Id: Ia7c4860b16a9ce6fe9af73dfe5a5d2d19ebf5bfd Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| | * Run includemocs in qtdeclarativeThiago Macieira2017-04-261-0/+1
| | | | | | | | | | | | | | | Change-Id: I84e363d735b443cb9beefffd14b8c023a37aa489 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | * Doc: correct \sa statementNico Vertriest2017-04-261-1/+1
| | | | | | | | | | | | | | | | | | | | | qquickwindow.cpp:4198: warning: Can't link to 'Qt.application' Change-Id: I159ce3e432c8d88280dfd0b9de5831f33216ccad Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
| * | QQuickWindow: Actually mark sendEvent as deprecatedRobin Burchell2017-04-171-0/+4
| | | | | | | | | | | | | | | | | | | | | ... not just in the documentation. Change-Id: I524841e253b16364b404053290db246729d72e48 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Start over with event delivery when touchpoint presses occurShawn Rutledge2017-04-271-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It was part of the intended design for pointer handlers; omitting this feature has until now prevented some opportunities for handoff from one handler to another. Now if PinchHandler has grabbed, pressing one more point will let something else have a chance again, for example. But this is incomplete in that if we release a point, we should do the same thing, actually. Change-Id: I10f567e7e4388bf0caab54c261178f19db20b14a Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* | | Fix remaining QQWindow qCDebugs to show eventpoint IDs in hexShawn Rutledge2017-04-201-2/+2
| | | | | | | | | | | | | | | Change-Id: I04122218499733856136f5a49b72707a0e8885e5 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Make tst_qquickflickable::nestedSliderUsingTouch passShawn Rutledge2017-04-141-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Revisions to 9b5fc80af28580e9672792dd511d876a93947882 and 781f76176239bfbfe6041f2676e2f2804337d312 are necessary to allow Flickable to steal synth-mouse events from children which accept only touch events. Change-Id: Id779368d7a44c1561da99a9f2c37e8d32278773e Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Add QQuickItem acceptTouchEvents/setAcceptTouchEvents; require for touchShawn Rutledge2017-04-141-11/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Merge remote-tracking branch 'origin/dev' into wip/pointerhandlerShawn Rutledge2017-04-131-6/+30
|\| | | | | | | | | | | Change-Id: Ie2894830470a69827d4ace3d8af9bee971e3fbd4
| * | Merge remote-tracking branch 'origin/5.9' into devSimon Hausmann2017-04-111-0/+1
| |\| | | | | | | | | | Change-Id: I95914046889022e0ef9bdc17338dc5895c5223fe
| | * Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-04-111-0/+1
| | |\ | | | | | | | | | | | | Change-Id: Ib3d81ad33a6ba28d891da91271a64d5fcc4874e6
| | | * Fix hidpi support for opengl window grabbingFilipe Azevedo2017-04-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now set the QImage devicePixelRatio so the content is correct on all screens. Task-number: QTBUG-53795 Change-Id: If94edf901da1285afe9bb847b8973d568a2b7082 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| * | | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-03-301-5/+21
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/jit/qv4assembler.cpp src/qml/jit/qv4assembler_p.h Change-Id: Ibfe69610ccd1f275f181b2bd87feece4ba221e50
| | * | in childMouseEventFilter, touchpoint grabber is also the mouse grabberShawn Rutledge2017-03-271-5/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When an item (such as Flickable) filters its children's mouse events, sometimes the mouse event may be one that is synthesized from a touch point. If that touch point is already grabbed, then in the context of childMouseEventFilter QQuickWindow::mouseGrabberItem() should return the item which has grabbed the touchpoint from which the mouse event was synthesized. Otherwise, there was a regression in which an item which can be dragged via touch (such as Slider in QQ Controls 2) could have its grab stolen by a filtering parent, such as Flickable, or the gesture recognizer in QtLocation. mouseGrabberItem() was returning null because touchMouseId and touchMouseDevice were not set, and the actual mouse was not grabbed. If a touch event is used to synthesize a mouse event, and during delivery an Item steals the grab of the synthetic mouse event, the original grabber needs to be notified that it has lost the grab. Task-number: QTBUG-59416 Change-Id: Ib121b06121df7593c0d549a6df42397b8ead1c45 Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>