aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquickitem
Commit message (Collapse)AuthorAgeFilesLines
* Don't discard return values from no-discard functionsVolker Hilsheimer2021-03-181-2/+2
| | | | | | | | | | The tests are very likely to fail if window exposure fails, so verify that it doesn't. Change-Id: I484d10e6bf8fdf5199bef070198f5405ab8f249b Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> (cherry picked from commit 80ee53c07c425f3d469dab5824572031fde6405e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Blacklist tst_qquickitem::hoverEvent on boot2qtShawn Rutledge2021-03-041-0/+3
| | | | | | | | | Suddenly we get 3 hover moves when there were only 2 mouse move events. The reason is not yet clear. Task-number: QTBUG-91548 Change-Id: Ib65194639aa059ae6ee0324b3faf2cfb7d234e1e Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Move event delivery from QQWindow to QQuickDeliveryAgentShawn Rutledge2021-02-251-0/+8
| | | | | | | | | | | | | | | | | | | | | | QQuickWindow owns QQuickRootItem which owns QQuickDeliveryAgent, so for every window there's an object responsible for event delivery, while the window itself is mainly responsible for rendering (separation of concerns). However, QQuickRootItem and QQuickDeliveryAgent can now be used in cases where the scene doesn't directly belong to a window, such as when a Qt Quick sub-scene is mapped somewhere into a Qt Quick 3D scene. In that case, we must remember which delivery agent was in use at the time when a QEventPoint is grabbed and deliver subsequent updates via the same DA. There's also a QQuickDeliveryAgent::Transform abstraction which subscene-management code (such as QQuick3DViewport) can implement, to provide a formula to map the window's scene coordinates to subscene coordinates; if defined, it will be used during delivery of subsequent updates to existing grabbers. Task-number: QTBUG-84870 Change-Id: I70b433f7ebb05d2e60214ff3192e05da0aa84a42 Reviewed-by: Andy Nichols <andy.nichols@qt.io> (cherry picked from commit 68c103225f4e8bd6c1b18ef547108fd60f398c0f) Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Replace QScopedPointer with std::unique_ptrVolker Hilsheimer2021-02-121-3/+3
| | | | | | | | | Fix compiler warning, QScopedPointer::take was deprecated in Qt 6.1. Change-Id: I67045bce97efb082b1b7467a6c24d5dbf996fdc1 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 070072e7cabd6f4f26f4938b1616e56254ad25d9) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Update hovered on disabled QQuickItemsAllan Sandfeld Jensen2021-01-181-1/+1
| | | | | | | | | | | | | | | | Changes handling of hovered so that the property is still updated on disabled items, so that other items can bind to it. This is in particular useful for tooltips. [ChangeLog][Behavior Changes] QQuickItem::hovered will now update even when the item is disabled. Fixes: QTBUG-30801 Pick-to: 6.0 Change-Id: Id17298f657d7631b0e5019138ba33a7d5f863475 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Remove the qmake project filesFabian Kosmale2021-01-151-18/+0
| | | | | | | | | Remove all qmake project files, except for examples which are used to test that qmake continues to work. Change-Id: Ic4abb72dc2dcd75df7a797c56056b6b3c5fe62ac Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Stop ungrabbing due to FocusAboutToChangeShawn Rutledge2020-11-181-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The goal is to un-blacklist the test for QTBUG-60123. To that end: revert 7b2e2117162594a2d0234bb02408f5b5a446488b and its followup 6933b7e8e6dc279a8eb34e1f4c60bc109dfb7d26. There is no detailed bug report explaining exactly why those were done, just the comment on code review: "This fixes the desktop components' combo box on linux re-opening at random times", probably referring to a combobox popup window in Controls 1. But when using QWidget::createWindowContainer() in two different windows and clicking MouseAreas in each of them, it turns out that this change of focus is causing the mouse grab to be canceled. The grab should be naturally given up after mouse release; canceling prematurely doesn't make sense. The Qt 5 fix for this bug was e0c30279ec1fad88346ed3fb483bc3c672fdd01b which tracked the grab on a per-window basis. It would be difficult to do that again now (change QPointingDevicePrivate::setExclusiveGrabber() to store a separate grabber for each window in which a grab occurred? what could go wrong...) It seems odd to have the same QEventPoint grabbed in two different windows at the same time, but popups need event forwarding so maybe that was why (if a MouseArea triggers the popup, should it stay pressed and keep its grab? the subsequent mouse moves and the release need to be forwarded to the popup, so maybe something inside the popup needs a grab, simultaneously or not). Anyway we don't have actual popup windows in Controls 2 right now; and we know that event forwarding for popups needs work in QtGui so that it will be easier when we try again to have them in Qt Quick (QTBUG-68080). So perhaps the original workaround has outlived its usefulness: popup event forwarding needs to be handled at the lower layer, not in Qt Quick. Task-number: QTBUG-57253 Task-number: QTBUG-60123 Task-number: QTBUG-86729 Change-Id: I56dbc3bb94f66a7f26f79a97bcb2f2bbc0b7aa92 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Fix tst_qquickitem::touchEventAcceptIgnoreShawn Rutledge2020-10-292-70/+24
| | | | | | | | | | | | | | This test (like many) is older than the setAcceptTouchEvents() function added in 1457df74f4c1d770e1e820de8cd082be1bd2489e. Now there are 3 cases: if we don't setAcceptTouchEvents(true), the item doesn't get any touch events; but if it does, it can accept or reject the individual events. For some reason the touch events were tediously created and sent before, but using QTest::touchEvent() simplifies it a lot. Task-number: QTBUG-86729 Change-Id: I2dd12af8c356c5455bd37d691fc24f3e1d9c107b Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Don't send an item a mouse release with a button that it doesn't acceptShawn Rutledge2020-10-291-2/+0
| | | | | | | | | | | | | In tst_qquickitem::ignoreButtonPressNotInAcceptedMouseButtons(), when the right mouse button release occurs, the item has a grab, but it's not interested in the right button, only the left. But of course we still want to deliver mouse drags, so if the button is NoButton and the item is the grabber, it gets the event. Task-number: QTBUG-31861 Task-number: QTBUG-86729 Change-Id: I952acc721a5f80a7fc5619c5fea640dae805e9c8 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix and improve parts of tst_qquickitemShawn Rutledge2020-10-292-80/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The reusable TestItem: - initialize variables where declared - don't accept touch events by default; the only test that uses touch is touchEventAcceptIgnore(), so it can do that for itself mouseGrab(): - don't skip it on Windows - construct items with explicit parents; we don't need QScopedPointer because the window is stack-allocated, and children get deleted - check grabber with QPointingDevicePrivate::firstPointExclusiveGrabber() rather than QQuickWindow::mouseGrabberItem() - remove qWait()s, use QTRY_COMPARE - QTRY_COMPARE hopefully shows enough info so we don't need to use QVERIFY2 with a custom message to compare equality - changing the grabber at a time when no event is being delivered is no longer supported (this was the part that needed blacklisting) - add a new stanza to test that mouse events don't propagate from the top item to the one underneath, if it neither accepts nor ignores it explicitly (analogous to mousePropagationToParent() but checking a sibling underneath, rather than a parent) hoverEvent(): - not sure why the comment from ede31210aafbfb961059a6e0934d6e6a79e06447 says QTest::mouseMove() didn't work, but nowadays it does Task-number: QTBUG-87947 Task-number: QTBUG-86729 Change-Id: I2627555e8bc0e4c3782239cb8ebde75395fea908 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Add tst_qquickitem::mousePropagationToParent() testShawn Rutledge2020-10-291-5/+59
| | | | | | | | | Verify that events are pre-accepted, and that when an item doesn't touch the accepted state at all, it doesn't propagate to a parent item. Task-number: QTBUG-87947 Change-Id: I162cc860424aa736cc3650fd0daa2e7bc705fc70 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Fix compiler warning: mark overrides as such, remove virtualVolker Hilsheimer2020-10-231-6/+6
| | | | | | Pick-to: 5.15 Change-Id: I77bd88eb0f277c139fd296c1dafa8b09517a3064 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* CMake: Regenerate projects to use new qt_internal_ APIAlexandru Croitor2020-10-061-4/+4
| | | | | | | | Modify special case locations to use the new API as well. Task-number: QTBUG-86815 Change-Id: I3b964e3baf0cc7040830156dac30358ea1152801 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* Blacklist tests due to QPointerEvent changesShawn Rutledge2020-09-181-0/+8
| | | | | | | | | | | | | | | | qtbase/2692237bb1b0c0f50b7cc5d920eb8ab065063d47 and the associated Qt Quick change to do direct delivery of QPointerEvents seem to have broken a number of tests as they are currently written. It looks bad; however I spent a lot of time already on some older "basic" tests like tst_qquickwindow, touchmouse, tst_qquickflickable etc. and found a lot of things to fix while doing that; so at least those aren't broken now. Troubleshooting each test takes time. Hopefully it will turn out that many of these failures are related (there seems to be something in common about handlers and items stealing touch grabs from each other). Task-number: QTBUG-86729 Change-Id: I14acf57fc83fa961a25f91108dcd4aea42b54435 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Begin handling the QEvent refactoringShawn Rutledge2020-07-151-20/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | 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-12/+12
| | | | | | | | | | | | 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>
* Remove QQuickPointerDevice in favor of QPointingDeviceShawn Rutledge2020-06-231-6/+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>
* Remove QtQuick.Window pluginUlf Hermann2020-06-151-2/+1
| | | | | | | | | | | | | | | | | We move all the types into QtQuick itself and retain QtQuick.Window only as alias to QtQuick. This requires support for qmldirs that consist of only an import statement. [ChangeLog][QtQuick][Important Behavior Changes] The contents of the QtQuick.Window QML module have been moved into the QtQuick module. QtQuick.Window is merely and alias for QtQuick now. An explicit import of QtQuick will override this alias. Therefore, if you import QtQuick with a different version than QtQuick.Window, you will get the QtQuick.Window types of the version given in the QtQuick import now. Task-number: QTBUG-84639 Change-Id: Ia82afab0ac2faba70cfdaf53dc8dfe4261e1113f Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Replace calls to deprecated QEvent accessor functionsShawn Rutledge2020-06-111-3/+3
| | | | | | | | | | | | | | | | | | | | 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>
* Improve polish loop detection and diagnosticsJan Arve Sæther2020-05-141-0/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The existing warning was pretty much useless since it would only warn after having looped INT_MAX times. In addition, it didn't actually detect if polish() was called from within updatePolish(). Instead, the counting is changed to be strictly more correct: The counter is now only increased when polish() is called within the updatePolish(). It will reset back to 1 if that does not occur. Effectively, the counter will reflect how many consecutive polish loops we have processed. This patch will show diagnostics after having reached 1000 consecutive polish loops. It will only warn for the next 5 items in order to not be too verbose...(most likely they will be the same 5 items). If the counter reaches 100,000, we break out of the loop: This might be important for e.g. CI runs so that the process can actually terminate in order to get some useful diagnostics. Note that the item that calls polish() within updatePolish() doesn't have to be the same item as updatePolish() was called on. We also want to track these since there might be several items working in tandem to create the loop. With this change it will now give the following output: main.qml:10:5: QML Row: possible QQuickItem::polish() loop main.qml:10:5: QML Row: Row called polish() inside updatePolish() of Row (This is when Row called polish() from within its own updatePolish()) Fixes: QTBUG-40220 Task-number: QTBUG-83856 Pick-to: 5.12 Pick-to: 5.15 Change-Id: Ib8a7242908082c70d8cf71efbbe1fa148dbfada0 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* CMake: Update Apple platform defines after rename in qtbaseTor Arne Vestbø2020-03-171-2/+2
| | | | | Change-Id: Ia0a075e3199eab735f9b289873beeb8730ebc47e Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Merge remote-tracking branch 'origin/dev' into wip/cmakeAlexandru Croitor2020-03-122-0/+38
|\ | | | | | | | | | | | | | | Conflicts: dependencies.yaml src/qml/qml/qqmlengine.cpp Change-Id: I6a73fd1064286f4a2232de85c2ce7f80452d4641
| * Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-03-092-0/+35
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/compiler/qqmlirbuilder_p.h src/qml/qml/qqmlpropertycachecreator_p.h src/qmltyperegistrar/qmltypesclassdescription.cpp src/qmltyperegistrar/qmltypesclassdescription.h src/qmltyperegistrar/qmltypescreator.cpp src/quick/items/qquicktext_p.h src/quick/util/qquickvaluetypes_p.h Change-Id: Ic209741592e7b85820bf3845722023a190ebc1c5
| | * Propagate the LanguageChange events from the QQuickWindow to the itemsAndy Shaw2020-02-252-0/+35
| | | | | | | | | | | | | | | | | | | | | Fixes: QTBUG-78141 Task-number: QTBUG-82020 Change-Id: Id47f8efe77cd3f6bfd330c8759059e19de5a86d2 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * | Quick: Don't qualify OpenGL includes (part two)Johan Klokkhammer Helsing2020-02-181-0/+3
| |/ | | | | | | | | | | | | | | | | | | | | | | 406f15ce0e only removed the "QtGui" prefix from some includes, but we are trying to move (almost) everything OpenGL related from QtGui. This removes prefixes for additional QOpenGL includes (QOpenGLShaderProgram, versioned opengl functions etc.). Task-number: QTBUG-74409 Change-Id: I91e1feac0676859f11de9b75301a0a4e81db50d9 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Regenerate qtdeclarativeAlexandru Croitor2020-02-121-5/+2
| | | | | | | | | | | | | | Change-Id: I48d7fd306f3d1b161a8e73029282ee591b1ef612 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Liang Qi <liang.qi@qt.io>
* | Merge remote-tracking branch 'origin/dev' into wip/cmakeLeander Beernaert2019-11-252-0/+20
|\| | | | | | | Change-Id: I48b9c2e4f3a75c18470c55f73f2089dc1401de54
| * Merge remote-tracking branch 'origin/5.13' into 5.14Qt Forward Merge Bot2019-10-312-0/+20
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/qml/common/qv4compileddata_p.h src/qml/types/qqmlbind.cpp tests/auto/qml/qqmlproperty/tst_qqmlproperty.cpp Change-Id: I6a137907e63445f17a3d6181b832a6bd76135bb2
| | * QQuickItem::setParentItem: add child earlierFabian Kosmale2019-10-292-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Calling (de)refWindow can trigger QQuickItem::windowChanged, which in turn can call a user defined windowChanged handler. If that signal handler were to call setParentItem, we would encounter an inconsistent state: The item already has its parent set, but that parent would lack the item in its children list (as we would only call refWindow at a later point). Fixes: QTBUG-79573 Fixes: QTBUG-73439 Change-Id: I46adaa54a0521b5cd7f37810b3dd1a206e6a09c6 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Regenerate all projects with new CMake API versionAlexandru Croitor2019-11-151-4/+4
| | | | | | | | | | | | | | | | | | Change-Id: Ie0db35f674137c229eaf049616f38f8e818f7092 Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Regenerate testsAlexandru Croitor2019-11-141-11/+2
| | | | | | | | | | | | | | | | | | Change-Id: I67a6c8f1659e7b471a4fcb92a2699292cf4eea81 Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Merge remote-tracking branch 'origin/wip/qt6' into wip/cmakeAlexandru Croitor2019-10-111-3/+4
|\| | | | | | | | | | | Change-Id: I4a91928610f79c8e21a05781953ffa41508c828a
| * | Remove usages of deprecated APIs of QWheelEventSona Kurazyan2019-08-231-3/+4
| |/ | | | | | | | | | | Task-number: QTBUG-76491 Change-Id: I69b0c4ec7c03f9421b18828516e064eff2b45518 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* / Add QtDeclarative Test CoverageLeander Beernaert2019-08-141-0/+63
|/ | | | | | | | | | | | | | | | | | | | | | All tests compile and run on a developer build. These tests are failing: tst_qqmlsqldatabase Fails due to missing sql driver tst_qqmlsqldatabase Fails in wip/qt6 tst_ququicklayouts Fails in wip/qt6 tst_flickableinterop Fails in wip/qt6 tst_qquickpinchandler Fails in wip/qt6 tst_qquickflickable Fails in wip/qt6 tst_qquickgridview Fails in wip/qt6 tst_qquickimage Fails due to missing jpeg plugin tst_qquicklistview Fails in wip/qt6 tst_qquicktext Fails in wip/qt6 tst_qquickcanvasitem Fails in wip/qt6 tst_scenegraph Fails due to missing jpeg plugin tst_TestFiltering Fails in wip/qt6 Change-Id: I4b9d69c118e23c095cb72ad5a67653fc30943bb1 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix tst_qquickitem::qtBug60123Sami Nurmenniemi2018-07-052-9/+8
| | | | | | | | | | | Fixes: - Call to waitForWindowExposed() is needed after change c9b46a130ec7f874a564bff1c9a70083705fc25b landed to qtbase. - Simplify geometry Task-number: QTBUG-66866 Change-Id: Id504fdf372292eb6cc76e387ae421096875863fd Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* tests: blacklist tst_qquickitem::qtBug60123Gatis Paeglis2018-05-081-0/+3
| | | | | | | | Its unreliable and we don't know why yet. Task-number: QTBUG-66866 Change-Id: I963a0070e5819b20d0e811f749cf623113eb9d26 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* tests: un-blacklist tst_qquickitem::ignoreButtonPressNotInAcceptedMouseButtons()Gatis Paeglis2018-03-201-2/+0
| | | | | | | | | | This change reverts 8740f35e69 and 8ef46910fc. The qtestlib limitation was fixed by b3e91b66b9175c1c3ff5f73f3ac231f74f9bf932 Task-number: QTBUG-63957 Change-Id: I2e12b1eff25c5ea8005db0893477a9732f24d211 Reviewed-by: Liang Qi <liang.qi@qt.io>
* use nullptr consistently (clang-tidy)Shawn Rutledge2018-02-261-55/+55
| | | | | | | | | | | | | 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>
* tests: Wrap qWaitForWindow{Active,Exposed} in QVERIFYv5.11.0-beta1Kari Oikarinen2018-02-231-25/+25
| | | | | | | | | | | The functions are marked Q_REQUIRED_RESULT, so they give compilation warnings when not handling the bool return value. Failing the test early at an unexpected event is also better behavior anyway. Task-number: QTBUG-66559 Change-Id: I6c4db29379ec01528208c3e4ee54346b4230616c Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Add test for detecting invalid mouse button cancel eventSami Nurmenniemi2018-02-193-0/+116
| | | | | | | | | Commit e0c30279ec1fad88346ed3fb483bc3c672fdd01b has already fixed the issue tested by this change. Task-number: QTBUG-60123 Change-Id: I0e378a7b1586f4e6c43246fca9d12719f62b3275 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Blacklist tst_qquickitem::ignoreButtonPressNotInAcceptedMouseButtons()Liang Qi2017-11-061-1/+1
| | | | | | | | | | on all platforms. This amends 8ef46910fc8af6d0a192970cce56aac402b06050. Task-number: QTBUG-63957 Change-Id: I74d7b6a9adea363ae338d8c846015a29508c0119 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* Blacklist tst_qquickitem::ignoreButtonPressNotInAcceptedMouseButtons() on macOSLiang Qi2017-11-051-0/+2
| | | | | | Task-number: QTBUG-63957 Change-Id: If438b1d2960b917fad2f0d74b713a4a3f2d8d456 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Merge remote-tracking branch 'origin/dev' into wip/pointerhandlerJan Arve Saether2017-07-112-34/+24
|\ | | | | | | | | | | | | | | | | | | | | 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
| * Fix licensingJani Heikkinen2017-05-042-34/+24
| | | | | | | | | | | | | | | | | | - Remove unused license files - Switch old LGPLv21 license headers with GPL-EXCEPT one Task-number: QTBUG-57147 Change-Id: Ib59c3e2e39bfe0038db795af85dc75028564efa3 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Default QQuickItem::acceptTouchEvents to true until Qt 6Shawn Rutledge2017-05-101-4/+7
| | | | | | | | | | | | | | | | This is a partial revert of 1457df74f4c1d770e1e820de8cd082be1bd2489e to avoid making a mandatory API change so soon. Change-Id: I05040579fa36d3dc5ef7616861f6d17adf500d2c Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | Add QQuickItem acceptTouchEvents/setAcceptTouchEvents; require for touchShawn Rutledge2017-04-141-4/+6
|/ | | | | | | | | | | | | | | | | | | | | | 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>
* QQuickWindowPrivate::deliverWheelEvent: fix global position of the eventOleg Yadrov2017-02-171-5/+21
| | | | | | | | | | [ChangeLog][QtQuick] QWheelEvent in QQuickItem::wheelEvent now keeps correct global position. Task-number: QTBUG-58845 Change-Id: I7f88d5152927a157e2bd07ee4d5f2208be884eec Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Keys: add shortcutOverride signalMitch Curtis2016-12-182-0/+100
| | | | | | | | | | | | | | | | | | | | | This allows an item to accept the shortcutOverride event, preventing e.g. Shortcut from stealing key events. The original use case that prompted the creation of this patch was using a Popup from Controls 2 to create a keyboard shortcut editor. When the user wanted to cancel the shortcut that they were editing, they could press escape, but Popup would grab the shortcut and close itself. As the test case demonstrates, the same problem occurs with the Shortcut type in Qt Quick. [ChangeLog][QtQuick][Keys] Added shortcutOverride signal to Keys attached object to allow prevention of e.g. Shortcut from stealing key events. Task-number: QTBUG-57098 Change-Id: I594e4ea17ec417d8c7d93c6cf347c1a1a2e62b93 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-10-271-2/+5
|\ | | | | | | | | | | | | | | | | Conflicts: src/quick/items/qquickwindow.cpp tests/auto/quick/qquicktext/BLACKLIST tests/auto/quick/qquicktextedit/BLACKLIST Change-Id: I8bd68b0b5e853b7908791d2cbddd18dd527c76ae
| * QQuickWindow: don't discard timestamps for wheel eventsJ-P Nurmi2016-10-151-2/+5
| | | | | | | | | | | | | | | | | | | | | | Noticed while debugging QTBUG-56075 on XCB. QQuickFlickable did not receive timestamps for wheel events provided by XI2. This alone does not fix the flicking speed issue with high-precision trackpads, but is needed to be able to calculate the appropriate velocity. Task-number: QTBUG-56075 Change-Id: I458e6302aee72863cdc1f8e8f7d99449016905a9 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>