aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Modernize event handling in PinchAreaShawn Rutledge2020-10-303-69/+69
| | | | | | | | | | | | | | | Worrying about the window's touchmouse is really not a relevant concern for a touch-only item; and grabs are done by grabbing the specific points that the pincharea chooses to handle, not by grabbing the touchmouse. We simply didn't have suitable API in Qt 5. Also some drive-by fixes: better packing and initialization in QQuickPinchAreaPrivate; and the stealMouse variable has only been set, not checked, for a long time, so we can remove it. Remove unimplemented handlePress() and handleRelease(). Change-Id: Ia76dc9b9974f663b13c4bb9dac32efe8ed7815c5 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Revert "qquickloader: Free memory of loaded components after source change"Maximilian Goldstein2020-10-301-13/+0
| | | | | | | | | | This reverts commit c5085eb8905f1a3c070f866746110980e84be271. It can cause crashes and only fixes an edge case that can't be encountered during normal usage. Pick-to: 5.15 5.15.2 5.12 Change-Id: Ia265f0d6716b59a0f483e5a114b3f3b1a76fe898 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Remove unnecessary casts in QQWinPrivate::sendFilteredPointerEventImpl()Shawn Rutledge2020-10-301-8/+6
| | | | | Change-Id: Ie3c996b6e0635bb28b0c9686a4d9207837906e1f Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix tst_QQuickMultiPointTouchArea::inMouseAreaShawn Rutledge2020-10-292-3/+1
| | | | | | Task-number: QTBUG-86729 Change-Id: I4cf59a1afacd56be114393e70f132d25a8f084eb Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix qmltest::event testsShawn Rutledge2020-10-293-15/+9
| | | | | | | | | | | | | | | - Stationary points are delivered like updated points after 05dc0a387ae324f2d6f3d7e633a0a49473f6957a - QQuickItemPrivate::localizedTouchEvent() seems to need to detach QEventPoint instances with Released state, to avoid losing the localization during delivery - calling stationary() or release() without position causes the event to occur at the middle of the item, not at the last-known position as the test was expecting Task-number: QTBUG-86729 Change-Id: I6bdcebc04a11d93d1d006f8269c1df2e9206a393 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@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-292-20/+21
| | | | | | | | | | | | | 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>
* Update dependencies on 'dev' in qt/qtdeclarativeQt Submodule Update Bot2020-10-291-2/+2
| | | | | Change-Id: Ib37d22c9730523065355521d46a168ebb4be86c1 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* 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>
* Accept a mouse event's point if event is accepted after visiting itemShawn Rutledge2020-10-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | When event handling code explicitly calls QPointerEvent->setAccepted(), all points get accepted, because that function is virtual now and makes it so. But the event is pre-accepted before delivery, because by tradition, the item must ignore the event if it doesn't handle it, but is not required to accept if it does handle it. Then in deliverPressOrReleaseEvent() (and other places) we check allPointsAccepted(), in case the event is a touch event and some item chooses to handle only a subset of the points. So it was not OK to remove this line that keeps them in sync after tradtional mouse delivery, which was added in 47ee54455beb1a063515041f85b4c216132491b3. The result was that delivery "kept going" past items that would neither accept() nor ignore() the mouse event, such that items further down could steal the grab, etc. In this case it was the ComboBox itself that received the press event, stole the grab from the TextField, and so the TextField did not get the mouse move and release that would select a range of text. Amends e783ef04fbbaa9a53121a6f575414b48043a10d2. Fixes: QTBUG-87947 Change-Id: Ib856d58a59c798c7bbfc5a222e2462a839fc2bdd Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QML migration guide: Add initial contentFabian Kosmale2020-10-291-1/+29
| | | | | | | | | Add information about the variant/var unification. Remove place-holder sentence. Change-Id: I79bb230820eab71fea72929a24fb8c1b0479b256 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QML: Make date parsing more lenientFabian Kosmale2020-10-293-0/+15
| | | | | | | | | | | This fixes a regression from Qt 5 to Qt 6, because QDateTime is now apparently more strict in its parsing of RFC2822Date. The string in the test-case is not valid according to that spec, but JS engines like V8 still accept it, and so did we in Qt 5. Fixes: QTBUG-87610 Change-Id: I2c6eb2087e4845b04fa0dc4f7aa9a229b3428a43 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Update dependencies on 'dev' in qt/qtdeclarativeQt Submodule Update Bot2020-10-291-2/+2
| | | | | Change-Id: Ic3ebb0d689d0a213ace07f5d4bc5ab32b5c04577 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Change terminology to "look and feel"Jerome Pasion2020-10-291-2/+2
| | | | | | | | -should be "look and feel" Task-number: QTBUG-88010 Change-Id: I5eef099eec362144651dd95d74023a571c4ac08c Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Improve tst_TouchMouse::pinchOnFlickableShawn Rutledge2020-10-281-40/+23
| | | | | | | | | | | - use for loops instead of tedious repetition - compare instead of verify to check negative bools - QTRY_COMPARE instead of qWait - move touchpoints by drag threshold to ensure repeatability: both flickable and pincharea wait for the threshold to start reacting Change-Id: I071fc05280e2156223af57d97079516987a744ab Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Make touchmouse pinch test qml manually testable and visually sensibleShawn Rutledge2020-10-282-14/+21
| | | | | | | | | | | - There was no reason to import Qt.test - Make colors less garish - Explain what the rectangle is for (it's not the only place for pinching, and the appearance is a bit misleading) - Show click feedback at the position instead of toggling colors Change-Id: Id75a52e46a5e8611a57eb69a037cced9a9f7d54f Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Standardize QJsonArray iterationDavid Skoland2020-10-2810-34/+35
| | | | | | | | | When using refs as loop variables, the clang compiler complains (with default settings). This prevents that. Note that QJsonValueRef is used "behind the scenes", which makes this iteration method correct. Change-Id: I5a5f58ca8ad3887bce2009231cbae5a57c107697 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Formalize declaration of varargs in builtins.qmltypesUlf Hermann2020-10-281-43/+19
| | | | | | | varargs are a special non-exported type. Change-Id: I2cd00d197ee5b4976e683cfe91dc0561a7186541 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QmlCompiler: Allow retrieval of C++ names for builtinsUlf Hermann2020-10-282-0/+7
| | | | | | | | Access to non-exported types is necessary in order to implement an alternative QML runtime environment. Change-Id: Ia6fd7bbfbf0ec9d6fa06f3741891395a78e468ea Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QQuickTextEdit: ensure we update after changing paddingRichard Moe Gustavsen2020-10-281-0/+4
| | | | | | | | | | | | | | As it stood we would never updated the paint node upon changes to padding. The result was that if you changed padding after start-up, you would not see any visual changes. This patch will ensure that we update the paint node when we change padding. Pick-to: 5.15 Change-Id: I2e9ed4406e8f01c26d1fa2ef09fe35a50f28411c Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* QML: Drop thisObject from writeToConsoleUlf Hermann2020-10-281-11/+11
| | | | | | | It's unused. Change-Id: I629bfb4ae9775f3f7c97be7789c84a15205cc29e Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Run builtins.qmltypes through qmlformatUlf Hermann2020-10-281-261/+1042
| | | | | Change-Id: I3ee4904cd3d492f71edee5f3b2bc9507df9810d4 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Inline components: Fix custom parser supportFabian Kosmale2020-10-283-0/+30
| | | | | | | | | Fixes: QTBUG-85713 Fixes: QTBUG-87464 Pick-to: 5.15 5.15.2 Change-Id: I5c190ad2d02190de90260042cc06e51c1da01c63 Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Mark basic types as value types in builtins.qmltypesUlf Hermann2020-10-281-0/+5
| | | | | Change-Id: Ibb8c40a3d8af405926769b776807c9e2d47f061e Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* builtins.qmltypes: Change real's internal name to "double"Ulf Hermann2020-10-281-79/+84
| | | | | | | | | It's called "double" everywhere else. We also have a "float" type in some places. Add that one. "double" still has an export called "real" as that is what you write in QML files. Change-Id: I4107e28c3441b9f829aca9abcbcbb8c5e3f8d327 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Fix tst_PointerHandlers::touchReleaseOutsideShawn Rutledge2020-10-272-3/+3
| | | | | | | | | In Qt 6, setAcceptTouchEvents(true) must be done explicitly for an item to receive touch events. Task-number: QTBUG-86729 Change-Id: Ib18db22b6a7213dfcfdf091d554ef60fbede6111 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix tst_PointerHandlers::mouseEventDeliveryShawn Rutledge2020-10-272-9/+17
| | | | | | | | PointerHandlers see more events now. Task-number: QTBUG-86729 Change-Id: I4dbddc8b54292450cf5ffb77489178a8a824b90d Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Remove duplicate property assignment from builtins.qmltypesUlf Hermann2020-10-271-1/+1
| | | | | | Change-Id: I0b96cc346ebf6580399f5379882f674073a89c21 Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Fix tst_PointerHandlers::touchEventDeliveryShawn Rutledge2020-10-273-22/+36
| | | | | | Task-number: QTBUG-86729 Change-Id: I47a0a4aad7cff956b2ebd450870d625f817690d4 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Fix tst_MouseAreaInterop::dragHandlerInSiblingStealing…ViaTouch()Shawn Rutledge2020-10-272-7/+8
| | | | | | | | | | | Check the actual touchpoint's grabbers instead of the synth-mouse. Anyway it looked odd to press touchPoint ID 1 and then look for the persistent point with ID 0 on the primary pointing device, which isn't always a mouse. Task-number: QTBUG-86729 Change-Id: I0a27fdd931059b30b0b5a54328bbef6254d26e04 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* qmllint: Check identifiers before giving up in case of previous errorsUlf Hermann2020-10-271-4/+2
| | | | | | | | The identifier check might yet yield more information. Change-Id: I96f700acf257736fea7e9c2023b9e8797f702f7c Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io>
* qqmlmetatypemodule: Fix maximumMinorVersion() returning bad valuesMaximilian Goldstein2020-10-272-2/+5
| | | | | | | | maximumMinorVersion() needs to ignore unspecified values as they are not versions in themselves. Change-Id: I7c91cf4b8320fd6636eb1be10b069cf885797ee1 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QmlCompiler: Add JS scopes for script bindingsUlf Hermann2020-10-273-4/+22
| | | | | | | | This is necessary to identify the available QML and JS scopes for the binding, and to add any identifiers found there. Change-Id: Ic966e7817ccd1fdc064dd433d16fa6c42c9110cc Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QmlCompiler: Introduce grouped scopesUlf Hermann2020-10-276-8/+85
| | | | | | | | This way we can analyze the left hand part of things like "anchors.fill: parent" in qmllint. Change-Id: I0f58312566c3d5062e0fb301c2bad908ab8b8cbb Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QmlCompiler: Log the name of the binding being compiledUlf Hermann2020-10-271-2/+4
| | | | | | | The binding code alone is not very helpful. Change-Id: I74e8884b2345c8b60447375e38a18db65ac22cb4 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Don't AOT-compile boring bindingsUlf Hermann2020-10-271-0/+11
| | | | | | | Plain literals don't benefit from AOT compilation. Change-Id: I8f20991b3e330f688f977d57acbffef36818a76c Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Update dependencies on 'dev' in qt/qtdeclarativeQt Submodule Update Bot2020-10-271-2/+2
| | | | | Change-Id: I3bdd096719a2b3406ec3d8ed5f2277d0084e797d Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Deal with QEvent::setAccepted() calling QEventPoint::setAccepted()Shawn Rutledge2020-10-272-13/+9
| | | | | | | | | | | | | | | | Traditionally, a QQuickItem subclass could override touchEvent(); if the event is still accepted when it returns, that meant the item handled all the points, so completely that the item should get an implicit grab of those points, and they should not be delivered further to any other items underneath. But it's often not so simple in multi-touch UIs, which is why each QEventPoint has its own accept flag. QPointerEvent::setAccepted() now iterates the points and calls QEventPoint::setAccepted() on each; so QQuickWindow doesn't need to do anything to make that happen anymore. Change-Id: Idbe7abf278411ee2fea598c1a1939f4bdb214aa0 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Blacklist qmltestrunner::touch::test_secondWindow and othersShawn Rutledge2020-10-264-0/+16
| | | | | | Task-number: QTBUG-86729 Change-Id: Ia4db0a98a4977cb89799c5749983a370d35317a7 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* CMake: Regenerate examples to set the WIN32_EXECUTABLE propertyAlexandru Croitor2020-10-2679-0/+340
| | | | | | | | | As well as the MACOSX_BUNDLE properties as necessary. Task-number: QTBUG-87664 Task-number: QTBUG-86827 Change-Id: I46769fb543acb2cbeba122470b5e44ad478fbe4e Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* QmlCompiler: Make sure that properties are writable by defaultUlf Hermann2020-10-261-0/+1
| | | | | | | Amends commit 7feab1fb95317b924fe39c49dd9907ca3df61a40. Change-Id: I32e22b51501d9c98af74ac00506619cfe33f6b7c Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Fix some compiler warnings in testsVolker Hilsheimer2020-10-262-17/+9
| | | | | | | | | | | Use char16_t instead of quint16 for arrays of 16bit strings. Use QKeyCombination API. As a drive-by, remove superfluous 0 from characters specified in hexadecimal. Change-Id: Ic52b1fdceaf3348a9b81c40814031e9c2e557dd9 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* QmlCompiler: Allow AOT compiled function to specify includesUlf Hermann2020-10-262-2/+15
| | | | | | | | This is necessary for include directives specific to the types being used. Change-Id: I34e0e5907d795714797fbb99a75b863cc41e9ad3 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QmlCompiler: Add method to retrieve addressable scope from visitorUlf Hermann2020-10-261-0/+1
| | | | | | | Adressable scopes are the ones with an id. Change-Id: I4975248aa920f0d567b5b5ccc8ba18a2fdd91e13 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* qml: Move more types into builtins.qmltypesMaximilian Goldstein2020-10-265-10/+39
| | | | | Change-Id: Id2795f16af99870f32266f81228890a9d12c86a7 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Replace deprecated DataLocation with AppDataLocationShawn Rutledge2020-10-251-1/+1
| | | | | | Task-number: QTBUG-87037 Change-Id: I1cb6cd15fbb5fe08a0280ed83d01fc1b49249524 Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* Remove usage of deprecated QStandardPaths::DataLocationKarsten Heimrich2020-10-233-4/+3
| | | | | | Task-number: QTBUG-87037 Change-Id: I1969dba3b6edfaf202a316576674efed481bb1e4 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>
* QQmlEngine: Add method to explicitly capture a propertyUlf Hermann2020-10-234-29/+55
| | | | | | | | | | Also, use that method to capture the uiLanguage notify signal. Previously the wrong signal was captured. The test still happened to pass because we manually re-evaluated all bindings when the uiLanguage property changed. Add a test which avoid that. Change-Id: I3961b60b365a8705930936f20881421bd4ceffe5 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>