aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Do not synthesize a double click event if the event point moved too farJan Arve Sæther2019-05-151-0/+56
| | | | | | | | We need to respect QPlatformTheme::TouchDoubleTapDistance Fixes: QTBUG-75770 Change-Id: I2adc7097bb29cb93beb2609a8a806a666856a0c8 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Fix some memory leaksSimon Hausmann2019-03-211-9/+9
| | | | | | | | Use QScopedPointer where appropriate to avoid reporting false memory leaks with ASAN's leak checker. Change-Id: Ia3dfeafc66c2ad2ac8454861acce82b99678e517 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Try to stabilize tst_qquickwindow::defaultSurfaceFormatUlf Hermann2019-02-061-2/+4
| | | | | | | | Apparently the OpenGL context is not guaranteed to be available right after showing the window. Wait for it to appear. Change-Id: Ie3acdb857d4e3a8c6c148c57916a49a58c93a835 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Tests: Un-crash image comparison testsFriedemann Kleint2018-12-201-39/+3
| | | | | | | | | | | | When (naively) running the tests with High-DPI scaling active, the test would assert on mismatching image sizes caused by the scaling. Add an error message parameter to QQuickVisualTestUtil::compareImages() for use with QVERIFY2, return false instead of asserting on format/size mismatches and adapt the usages. Remove duplicate code in tst_qquickwindow. Change-Id: I76564f4125798fa1e065a0202b686bc7f5ec5680 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QQuickWindow: obey AA_SynthesizeMouseForUnhandledTouchEventsShawn Rutledge2018-08-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Until now, AA_SynthesizeMouseForUnhandledTouchEvents has only affected behavior of QGuiApplicationPrivate::processTouchEvent, but had no effect in Qt Quick. QQuickWindow also accepts the touch event just to make sure that QGuiApplication will not synthesize mouse from touch, because it would be redundant: QQuickWindow does that for itself. Now we make it have an effect in Qt Quick too: skip mouse synthesis if it is set to false. This provides a way to simplify the event delivery. If you set it false, then you cannot manipulate old mouse-only items like MouseArea and Flickable on a touchscreen. (You can of course use event handlers for that.) [ChangeLog][QtQuick][QQuickWindow] You can now disable touch->mouse event synthesis in QtQuick by calling qGuiApp.setAttribute(Qt::AA_SynthesizeMouseForUnhandledTouchEvents, false); This will simplify and speed up event delivery, and it will also prevent any and all interaction with mouse-only items like MouseArea and Flickable on a touchscreen. Task-number: QTBUG-52748 Change-Id: I71f1731b5abaeabd9dbce1112cd23bc97d24c12a Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* tst_qquickwindow::constantUpdatesOnWindow: Verify that window was exposedTor Arne Vestbø2018-07-201-1/+1
| | | | | | Change-Id: I3b621254eb8b18e01b023363809c101ce3132f9d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Quick tests: remember positions of stationary pointsShawn Rutledge2018-07-031-22/+23
| | | | | | | | | | | | | | | | We need Items to receive accurate positions for stationary touch points: that is, the last-known position from the previous touch event. (And we hope that all actual touch-capable platforms also send proper QPA events with correct positions for stationary points. We assert that it's a bug if they don't.) As explained in qtbase 7cef4b6463fdb73ff602ade64b222333dd23e46c, it's OK to retain a copy of a QTest::QTouchEventSequence for this purpose, so that the QMap<int, QTouchEvent::TouchPoint> previousPoints will not be discarded between events. Change-Id: I12a04323b0d82dc325348c0fa3e067a4b63f57e9 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Attempt to stabilize tst_qquickwindow::openglContextCreatedSignalSimon Hausmann2018-06-191-1/+1
| | | | | | | | | | | | | | | | | | | The test creates a QQuickWindow, calls show() on it and then waits with qWaitForWindowExposed() to return true. The expectation of the test is that when that call returns, an expose event was also successfully delivered to the window and the scene graph's render loop has attempted rendering the window contents - using *RenderLoop*::renderWindow(), which would - in the case of the gui thread loop - create the GL context. This expectation is expressed using a QVERIFY on a signal spy that observes the emission of the GL context created signal of QQuickWindow. There is no guarantee that by the time qWaitForWindowExposed returned true, an expose event was delivered to the window. Therefore let's use QTRY_VERIFY. Change-Id: I604cbf40dfb7980448f406e26b77678a65faf359 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Fix bug where Ungrab event was not sentJan Arve Sæther2018-05-111-0/+41
| | | | | | | | | | | | clearGrabbers() will also clear QQuickWindow::mouseGrabberItem(), so we have to retrieve a copy of the mouse grabber item in advance of calling clearGrabbers(). This could happen when a filtering parent actually called grabMouse() on mouse release(!) event. Change-Id: I287214dbdff802707be625d73c38dd9c5d723aef Task-number: QTBUG-68030 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* use nullptr consistently (clang-tidy)Shawn Rutledge2018-02-261-33/+33
| | | | | | | | | | | | | 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-17/+17
| | | | | | | | | | | 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>
* Merge remote-tracking branch 'origin/5.10' into 5.11Liang Qi2018-02-121-6/+108
|\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/imports/shapes/qquickshape.cpp src/imports/shapes/qquickshape_p_p.h src/qml/compiler/qqmlpropertycachecreator_p.h src/qml/jsruntime/qv4value_p.h src/quick/items/qquickloader_p.h tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp tools/qmlprofiler/qmlprofilerapplication.cpp Change-Id: Iafc66ae84bf78630ed72a986acb678e9d19e3a69
| * Merge remote-tracking branch 'origin/5.9' into 5.105.10Liang Qi2018-02-071-6/+3
| |\ | | | | | | | | | Change-Id: I3b250545e334f50dcef1a75acdef51820d34079a
| | * touchEvent_propagation: remove some QWaitsShawn Rutledge2018-02-051-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | I doubt it will make the test any less flaky, but may be an improvement. Task-number: QTBUG-53916 Change-Id: I3901ab26107abfd1420947392232243ad8c40ead Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2018-02-051-0/+105
| |\| | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/quickwidgets/qquickwidget/tst_qquickwidget.cpp Change-Id: I64f7c1d776fab3cad4530f291b93afd2a8fb8533
| | * Add QQuickWindow synthMouseFromTouch testShawn Rutledge2018-02-031-0/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | | Similar to the one for QQuickWidget, it tests the effect of AA_SynthesizeMouseForUnhandledTouchEvents and verifies the source() of the synthesized mouse event. Change-Id: Ib706b5cc7b9a374850f3197ca6ce2c3aed4d1ba2 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* | | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-12-201-1/+41
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/quick/pointerhandlers/flickableinterop/data/FlashAnimation.qml tests/auto/quick/pointerhandlers/flickableinterop/data/Slider.qml tests/auto/quick/pointerhandlers/flickableinterop/data/TapHandlerButton.qml tests/auto/quick/pointerhandlers/flickableinterop/data/flickableWithHandlers.qml tests/auto/quick/pointerhandlers/multipointtoucharea_interop/data/pinchDragMPTA.qml tests/auto/quick/pointerhandlers/qquickdraghandler/data/DragAnywhereSlider.qml tests/auto/quick/pointerhandlers/qquickdraghandler/data/FlashAnimation.qml tests/auto/quick/pointerhandlers/qquickdraghandler/data/Slider.qml tests/auto/quick/pointerhandlers/qquickdraghandler/data/draggables.qml tests/auto/quick/pointerhandlers/qquickdraghandler/data/multipleSliders.qml tests/auto/quick/pointerhandlers/qquicktaphandler/data/Button.qml tests/auto/quick/pointerhandlers/qquicktaphandler/data/FlashAnimation.qml tests/auto/quick/pointerhandlers/qquicktaphandler/data/buttons.qml tests/manual/pointer/content/FakeFlickable.qml tests/manual/pointer/content/FlashAnimation.qml tests/manual/pointer/content/MomentumAnimation.qml tests/manual/pointer/content/MouseAreaButton.qml tests/manual/pointer/content/MouseAreaSlider.qml tests/manual/pointer/content/MptaButton.qml tests/manual/pointer/content/MultiButton.qml tests/manual/pointer/content/ScrollBar.qml tests/manual/pointer/content/Slider.qml tests/manual/pointer/content/TapHandlerButton.qml tests/manual/pointer/fakeFlickable.qml tests/manual/pointer/flickableWithHandlers.qml tests/manual/pointer/flingAnimation.qml tests/manual/pointer/joystick.qml tests/manual/pointer/main.cpp tests/manual/pointer/main.qml tests/manual/pointer/map.qml tests/manual/pointer/map2.qml tests/manual/pointer/mixer.qml tests/manual/pointer/multibuttons.qml tests/manual/pointer/photosurface.qml tests/manual/pointer/pinchDragFlingMPTA.qml tests/manual/pointer/pinchHandler.qml tests/manual/pointer/singlePointHandlerProperties.qml tests/manual/pointer/tapHandler.qml tests/manual/pointer/tapWithModifiers.qml tests/manual/shapestest/main.cpp Change-Id: I4f233a521305fab1ebfecbac801da192434ed524
| * | Fix bug preventing ungrabMouse() on TouchCancelDaniel d'Andrada2017-11-031-1/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The order matters. There won't be a mouseGrabberItem() after the cancelExclusiveGrabImpl() call. So ungrab the mouse before calling it, not after. Task-number: QTBUG-63680 Change-Id: I81e03e079362c865e13792feb8c3af8cb3abedc8 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-11-061-4/+25
|\| | | | | | | | | | | Change-Id: I1ed923d72566af663555898c3ec708191eef8ae9
| * | Merge remote-tracking branch 'origin/5.9' into 5.10v5.10.0-beta3Liang Qi2017-10-251-4/+9
| |\| | | | | | | | | | Change-Id: Ie5d0b2d9bece98553262f8af1ce66459f03a73e1
| | * skip part of tst_qquickwindow::testWindowVisibilityOrder on UnityShawn Rutledge2017-10-231-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's flaky: on the CI machines, the first three windows are shown stacked on top of each other, and none of them has focus, because the terminal which is running the tests continues to have focus. If this happened to a user, he would just click in whichever window he wants to have focus. (Good thing it's visible, at least.) So this looks like broken window manager behavior. Ubuntu will switch to Gnome soon anyway; then maybe the behavior will be different. Task-number: QTBUG-62604 Change-Id: Id0db8a61e8335e7f591a38e07c488c055b236239 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
| * | Add test for verifying that event is pre-accepted for event filteringJan Arve Sæther2017-10-051-0/+16
| | | | | | | | | | | | | | | | | | Change-Id: I718bbc8dd617b52e0150a3c29cf34323383c620b Task-number: QTBUG-62631 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Replace Q_DECL_OVERRIDE with overrideKevin Funk2017-09-251-3/+3
| | | | | | | | | | | | | | | Change-Id: I176f91a8c51e81a2df3fe91733118261491223ee Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-09-221-4/+1
|\| | | | | | | | | | | Change-Id: I3878bbf2ac7b62651215938c98ead7171be49c74
| * | don't re-deliver events to an item which already filteredShawn Rutledge2017-09-111-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | That is, if the filtering parent intercepts an event (returns true from childMouseEventFilter), it does not also need direct delivery of the same event. Change-Id: I24003f72875b309fa10b2d316916c5f86702cb57 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* | | Enable tests for boot2qtSami Nurmenniemi2017-09-211-0/+7
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | Some tests needed fixing - Disabled tests too heavy for qemu - Skipped tests requiring OpenGL without support from the platform - Skipped tests requiring functionality on broken offscreen platform - Skipped tests that take too long on qemu + software renderer - Blacklisted tests for created bugs QTBUG-63049, QTBUG-63053 QTBUG-63055 and QTBUG-63057 Task-number: QTBUG-60268 Change-Id: I0346b0e436cf286d7d9cbc140acf324a4087cfb9 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Add test for mouse event propagation and filteringJan Arve Sæther2017-09-081-0/+349
| | | | | | | | | | Change-Id: I190936abda0900822e758a19be5308a5e1da586f Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* | rename QQuickEventPoint pos properties to positionShawn Rutledge2017-09-051-1/+1
| | | | | | | | | | | | | | | | For consistency we always spell it out, although it does make some of these properties inconveniently verbose. Change-Id: I64a08c3aa261c0ab89e09472dd47510abafbf7ca Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* | Remove isValid from QQuickPointerEventFrederik Gladhorn2017-08-301-2/+0
| | | | | | | | | | | | | | | | | | | | | | We don't seem to have any use for invalid points, so let's remove the concept. The debug code first checks the valid property, but then unconditionally accesses the event, showing that we never had any invalid event in there in the first place. Change-Id: I5f8aac16c519f06a151198902cc98097eafacaa8 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devSimon Hausmann2017-08-181-40/+62
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/compiler/qqmltypecompiler.cpp src/qml/jsruntime/qv4qmlcontext.cpp src/qml/jsruntime/qv4qobjectwrapper.cpp src/qml/qml/qqmlcustomparser.cpp src/qml/qml/qqmlimport.cpp src/qml/qml/qqmlimport_p.h src/qml/qml/qqmlmetatype.cpp src/qml/qml/qqmlmetatype_p.h src/qml/qml/qqmltypenamecache.cpp src/qml/qml/qqmltypenamecache_p.h src/qml/qml/qqmltypewrapper.cpp src/qml/qml/qqmltypewrapper_p.h src/qml/qml/qqmlvmemetaobject.cpp src/qml/util/qqmladaptormodel.cpp Change-Id: Ic959d03e6f9c328fb02710d9abbb0f27cddde131
| * Fix flaky failure in attachedProperty() autotestJan Arve Saether2017-08-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | QVERIFY(QTest::qWaitForWindowActive(&view)) sometimes failed. This was because at that point, "view" already had been active, then turned inactive again due to that the "extraWindow" had become active. The fix is to not show the "extraWindow" immediately from the QML file, but to postpone displaying the "extraWindow" to after we have verified that the "view" has become active. Change-Id: Ic008a332a736a3b7ab29ad9b2bfeb1eef0d7c19d Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * tst_qquickwindow: Make touch tests pass with High DPI scalingFriedemann Kleint2017-08-021-40/+61
| | | | | | | | | | | | | | | | | | | | | | Rewrite the tests to use QTouchEvent::TouchPoint instead of QWindowSystemInterface::TouchPoint and use the convenience functions QWindowSystemInterfacePrivate to scale them. Use the new API consisting of position and ellipsis instead of the QRect based API. Change-Id: I26f672ef77fe12ef5e9609b61567397bc0808b5e Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | Fix some bugs related to child mouse filteringwip/pointerhandlerJan Arve Saether2017-08-081-0/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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/pointerhandlerJan Arve Saether2017-07-111-0/+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
| * | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-06-071-6/+19
| |\| | | | | | | | | | Change-Id: I61ab3d0bd8cc02f640c60c037226eace09ec09ba
| | * QQuickWindow/View: set a QObject-parent on the root itemJ-P Nurmi2017-06-021-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-11/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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' into devLiang Qi2017-06-061-0/+11
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| | * QQuickWindow::createTextureFromImage(): return nullptr for null imagesMitch Curtis2017-05-151-0/+11
| | | | | | | | | | | | | | | Change-Id: Idf3315be104e058315d82893443e1c27d1d79f2e Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | | Merge remote-tracking branch 'origin/dev' into wip/pointerhandlerShawn Rutledge2017-04-131-0/+258
|\| | | | | | | | | | | Change-Id: Ie2894830470a69827d4ace3d8af9bee971e3fbd4
| * | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-03-141-0/+258
| |\| | | | | | | | | | Change-Id: I0ec164ce6e8099e6e4d6b40a3c7340737473ef4b
| | * Fix copied QDragMoveEvent drop action to propagate to original eventAlexandru Croitor2017-03-071-0/+258
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Trying to set the drop action and the accepted state in a overridden dragMoveEvent handler, does not get propagated to the original QDragMoveEvent, because the event passed to the handler is a copy. This does not allow canceling the drop action in the move handler, or change the proposed action to a different one. Changing these values in the move handler is important to allow modifying the cursor when moving / hovering above a possible drop item, depending on user conditions. Fix consists in copying the drop action and accepted values to the original event, as well as removing the hard-coded setAccepted (true) call. Task-number: QTBUG-58260 Change-Id: I7a4bd4e68ee1023a36a63d3e835c282077e4187c Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Merge remote-tracking branch 'origin/dev' into wip/pointerhandlerShawn Rutledge2017-03-021-6/+0
|\| | | | | | | | | | | Change-Id: I7e43a0a47d49de38617f6afc7548f9a9e212a851
| * | Re-enable tst_qquickwindow::headlessLaszlo Agocs2017-02-101-6/+0
| |/ | | | | | | | | | | | | | | With the ANGLE update in 5.7 the root cause may have been fixed. Task-number: QTBUG-42967 Change-Id: Iec2faf5b7f5ed2c5f116a9c10ce35ed704c46d31 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | Merge remote-tracking branch 'origin/dev' into wip/pointerhandlerShawn Rutledge2017-01-261-0/+19
|\| | | | | | | Change-Id: I7962fd2282792c43af69784c8e98fb050fd928a7
| * Make it possible to call grabToImage() on Window.contentItemOleg Yadrov2017-01-021-0/+19
| | | | | | | | | | | | | | | | | | | | Window.contentItem was not associated with any QQmlContext and QQmlEngine. A valid pointer to QQmlEngine is needed for callback function execution. Task-number: QTBUG-57175 Change-Id: Iab7730bfc8860521ff2e8c1631a11d0e1fe0cf94 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | tst_qquickwindow::mouseFiltering: verify that siblings don't filterShawn Rutledge2017-01-041-19/+69
|/ | | | | | | | | | | | | | | | | | | | | A grandchild's parent's sibling (uncle) can be underneath the child in such a way that it will see the event during normal delivery, if neither the child nor its parent accepts the event, and yet this uncle will not get the opportunity to filter because it's not a parent. Also verify that after an item accepts a press event, subsequent mouse moves are filtered by the same parent and grandparent, even if the move has placed the cursor outside their bounds. Also rename mousePressId to mousePressCount, because the name was misleading: it's just a counter. Remove the comment about whether it's a bug that touch events are filtered: we are constrained by bincompat to use the same virtual function to filter both kinds of events, for now. Change-Id: If0fd62730883f3e4e29675580d975395c631e694 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Merge remote-tracking branch 'origin/5.8' into devLiang Qi2016-12-141-11/+11
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/qmltooling/qmldbg_debugger/qv4debugjob.cpp src/plugins/qmltooling/qmldbg_inspector/globalinspector.cpp src/plugins/qmltooling/qmldbg_nativedebugger/qqmlnativedebugservice.cpp src/qml/qml/qqmlimport.cpp src/quick/items/context2d/qquickcontext2dtexture_p.h tools/qmleasing/splineeditor.h Change-Id: I8f6630fcac243824350986c8e9f4bd6483bf20b5
| * Get rid of most QT_NO_FOO usagesLars Knoll2016-11-291-11/+11
| | | | | | | | | | | | | | | | Instead use QT_CONFIG(foo). This change actually detected a few mis-spelled macros and invalid usages. Change-Id: I06ac327098dd1a458e6bc379d637b8e2dac52f85 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Enable making window-screen associations from QMLLaszlo Agocs2016-10-101-0/+19
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | Qt Quick provides a Screen attached property to query information about the screen an item's window belongs to. This is a good start, but has two problems: it lacks some virtual desktop related info (e.g. the position in the virtual desktop) and it cannot be used in combination with the Window element in order to achieve a QML equivalent of QWindow::setScreen(). Therefore add the missing virtualX and virtualY properties and introduce Qt.application.screens. The latter is an equivalent to QGuiApplication::screens() and is a JS array the elements of which can be set as the value of the new Window.targetScreen property. This means that a call like window->setScreen(QGuiApplication::screens()[0]) translates to Window { targetScreen: Qt.application.screens[0]; ... } when using the Window type from QML. Screen addition or removal can be acted upon via onScreensChanged. QQuickScreenAttached has been split into two in order to allow reusing the QScreen wrapping queries for other purposes as well. Task-number: QTBUG-56115 Change-Id: I4b2fbd873315b40d0afe878da2fc50966c00e2e0 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>