aboutsummaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* QmlCompiler: Drop the metaobject revision from exportsUlf Hermann2020-10-192-2/+6
| | | | | | | | | Instead, output a warning if the revision doesn't match the version. We want to get rid of generic version/revision matching. To this end, add a way to retrieve the version from an export. Change-Id: Ie887103eba910f14e49faa684ac559cc72cab199 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Do grabs out of orderLaszlo Agocs2020-10-191-0/+28
| | | | | | | | | | | | | ...while extending the autotest to cover more complicated cases, such as grabbing again after show-hide and doing show-grab-hide-grab-show-grab. In fact some of these cases have not been working in Qt 5. Now the basic render loop is fixed up to support the all the combinations threaded does. Task-number: QTBUG-87399 Change-Id: Id01995bc3a2660b16cfb2f8bedc84becea0be1bb Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* CMake: Adjust to public API renaming in qtbaseAlexandru Croitor2020-10-181-1/+1
| | | | | | Task-number: QTBUG-86827 Change-Id: Ibeae878cbd7cc43031aeb13b2c480215c849f8bc Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* tests: Port qquickitemlayer and remove direct GL checksLaszlo Agocs2020-10-1625-166/+132
| | | | | Change-Id: I7362ae0dcbc67005c09df5c5c704912d10a74827 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* CMake: Add generated qrc files to the qmlimportscannerCristian Adam2020-10-151-0/+1
| | | | | | | | | | | | The list of generated qrc files is passed to qmlimportscanner via the -qrcFiles parameter. qt_import_qml_plugins(pointer) needs to be explicitly called in CMake unlike qmake which does the equivalent behind the scenes. Task-number: QTBUG-85994 Change-Id: Ia49a5e1fe5df11c0b3b8ff4c1765377767ca2478 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* QQuickShaderEffect: fix crash when hiding parentMitch Curtis2020-10-156-0/+164
| | | | | | | | | | | | It's possible for itemChange to be called during destruction when deleting the QQuickShaderEffectImpl. We nullify m_impl before deleting it via another pointer to it, so we must check that it's not null before trying to use it. Pick-to: 5.15 Fixes: QTBUG-86402 Change-Id: If4955445f7cc0d1f376bc9b86b95e1cca4d88ede Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Speed up tst_qquickflickableShawn Rutledge2020-10-145-3/+51
| | | | | | | Speed up animations that the test spends too much time waiting to complete. Change-Id: I7941660f3c3a89798c5cdd0eee8018a44fb89a0d Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Fix alwaysRunToEnd==true prevented complex Anim from stoppingPiotr Mikolajczyk2020-10-133-0/+163
| | | | | | | | | | AnimatorProxyJob would not forward loopCount to the controlled job causing the sequential or parallel animation to go infinitely after attempt to stop Task-number: QTBUG-82890 Pick-to: 5.15 Change-Id: I6a1ca787f06789064e05407bbe9ae5e5861f24d5 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Fix QProperty property interaction with aliasesFabian Kosmale2020-10-122-0/+44
| | | | | | | | | | | | | | | | With this change, an alias of a bindable property is also bindable, and shares its bindable interface with the target. Moreover, the logic in QQmlTypeCompiler is adjusted so that a change handler of an alias uses the bindable interface if possible, instead of connecting to the alias' change signal. That would never be emitted if the target is a QProperty without a notify signal. Alias properties still have a change signal, but those never get emitted. Change-Id: I857dfdbe51048a2b604ad632982e7f4adac6b907 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Allow optional imports in qmldir filesUlf Hermann2020-10-083-0/+7
| | | | | | | | | | This is useful for modules that select their imports at runtime using qmlRegisterModuleImport(). We can list all possible variants as optional imports so that tools can see what types might be available. Task-number: QTBUG-87130 Change-Id: I8a37bdde79aef3619fd1f05e5ea6781d521afa88 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QQuickTextEdit: ensure we update document width when padding has changedRichard Moe Gustavsen2020-10-082-0/+33
| | | | | | | | | | | | | | | We use an if-test to check if the document width has changed before we set the new value. The problem is that the value we test against is different than the value we set. The result is that we can sometimes skip setting a new width on the document, even if padding has changed. This patch ensures that we use the same width for both testing and setting. Pick-to: 5.15 Change-Id: Ia8391999e8cc2b5be72fe525d396bf8c17ba0fa2 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* qmllint: Be more verbose when tests failUlf Hermann2020-10-081-1/+1
| | | | | Change-Id: I9394dd721eac3e0b76fbedb6b2fca6f45da48383 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Rename conflicting test targetKai Koehne2020-10-082-1/+16
| | | | | | Task-number: QTBUG-87217 Change-Id: Ib04713fd05d7d3db779b2375caa18c1fbc1be078 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* qmlformat: Make arrow functions one linersMaximilian Goldstein2020-10-083-0/+12
| | | | | | Fixes: QTBUG-87179 Change-Id: Ieb7dffab59923bcb2ce8745c499eff7de44134b1 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Fix tst_events benchmarkShawn Rutledge2020-10-071-7/+7
| | | | | | | Converting from 0 to Qt::NoModifier was never a great idea. Change-Id: I694126c86e961a9af3f963fc830dbb65d535a61a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Support 5.x style composite types in qmltypes filesUlf Hermann2020-10-071-0/+1
| | | | | | | | | In Qt6 we don't want those anymore, but it's easy enough to support them for now. Task-number: QTBUG-87164 Change-Id: I2a6cd1dd99f772d132f71575c9c5f4538a3dd0f0 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* qmllint: Read deprecated dependency specifications from qmltypes filesUlf Hermann2020-10-073-0/+5
| | | | | | | | And produce a warning when doing so. Task-number: QTBUG-87164 Change-Id: I75eab97a37af1268a310e88e3ac6a625127a7f62 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QmlCompiler: Use the declared typeinfos rather than the defaultUlf Hermann2020-10-075-1/+22
| | | | | | | | | | ... and produce a warning when encountering the default. This shows us that the qmake build omits some typeinfo entries from common modules. Add those. Change-Id: I1c7e87e8a54ef24a6076090e6051eb1c03c09b2a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* qmlformat: Make empty objects one linersMaximilian Goldstein2020-10-073-0/+10
| | | | | | Fixes: QTBUG-87181 Change-Id: Ic8b7f69b4f9faf907ec75f27b689ba3686eb013f Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QQuickListView: prevent mouse delivery in floating header or footerShawn Rutledge2020-10-072-0/+87
| | | | | | | | | | | | | | | | | | | | | | | | | Earlier we reimplemented the contains() method of ListView to prevent dragging in an Overlay or Pullback header or footer. But in QQuickWindow (QQuickWindowPrivate::pointerTargets()), an early check prevents delivery of pointer events to an item that is clipped and for which contains() returns false, and also to its children. In that case, the header or footer no longer responds to a mouse event even if you put a MouseArea in it. Reverts 6ad3445f1e159d9beea936b66d267dcaacdc5d6c; reimplemented using similar logic in a new QQuickListViewPrivate::wantsPointerEvent() method, overriding QQuickFlickablePrivate::wantsPointerEvent(), which is now checked in event-handling code in addition to checking the interactive flag. Done-with: Wang Chuan <ouchuanm@outlook.com> Pick-to: 5.15 Task-number: QTBUG-74046 Fixes: QTBUG-85302 Change-Id: I9474f035d26b74ee36c0ac19e45a77de2e694bf1 Reviewed-by: Wang Chuan <ouchuanm@outlook.com> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* qmlformat: Fix computed property namesMaximilian Goldstein2020-10-073-0/+29
| | | | | | | Fixes: QTBUG-87222 Pick-to: 5.15 Change-Id: If1da02d503041009b82651e1087fb4a1bdd79d59 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* qmllint: Capitalize importer warningsUlf Hermann2020-10-071-1/+1
| | | | | | | Refactor the "prefixed message" mechanism into ColorOutput. Change-Id: Ie982e641771f3367406f48a8bcfd2bd3da122b16 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* CMake: Regenerate projects to use new qt_internal_ APIAlexandru Croitor2020-10-06364-817/+770
| | | | | | | | 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>
* Un-blacklist Quick tests that are passingShawn Rutledge2020-10-067-33/+2
| | | | | | Task-number: QTBUG-86729 Change-Id: I35dc7ac91d2507a229dc1dde19f380e7111a4757 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* qmlformat: Fix formatting of for...of loops using array variablesMaximilian Goldstein2020-10-063-0/+23
| | | | | | | Fixes: QTBUG-86980 Pick-to: 5.15 Change-Id: Id27350821051709894c7645a362cfdf7ce0d279c Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* XHR: allow the user to set the User-Agent headerGiuseppe D'Angelo2020-10-061-1/+0
| | | | | | | | | | | | | | | | | | | | | | The Fetch spec has allowed it for a while (in other words, it's no longer forbidden): * https://fetch.spec.whatwg.org/#terminology-headers * https://developer.mozilla.org/en-US/docs/Glossary/Forbidden_header_name Cf. also * https://github.com/whatwg/fetch/issues/37 * https://github.com/whatwg/fetch/commit/dab09b0c483c46324082df1e54b29ed4c9c02162 [ChangeLog][QtQml][XmlHttpRequest] It is now possible to set the User-Agent header. Change-Id: I1d5bd785223e9df2883011f873d440a63e363a24 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QQmlMetaType: Grudgingly accept uppercase value typesUlf Hermann2020-10-051-2/+2
| | | | | | | We throw a warning instead of an error. Change-Id: I0f5886a2d46582405ae1d57879ccb3937e27950f Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* qmlformat: Fix inline componentsMaximilian Goldstein2020-10-051-5/+2
| | | | | | | Fixes: QTBUG-86979 Pick-to: 5.15 Change-Id: Ie8863bc2ecf75a9dd8e4af5e96e48c30e7acbacd Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* qmllint: Mark anchors3.qml as dirtyUlf Hermann2020-10-053-3/+7
| | | | | | | | | This is in fact invalid QML. The assignment shouldn't be accepted but qmllint cannot see that, yet. Change-Id: Ifcb2f01edaf10ada5ce4d762726c51af3b4f5087 Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* testlib: Remove the deprecated MouseDoubleClick() methodShawn Rutledge2020-10-051-5/+0
| | | | | | | | | | | | After qtbase/871d19a5b96fa5a5be4ac50e3121e0704ff08374 MouseButtonDblClick is no longer delivered like a press event, but like an update: that is, only grabbers will receive it. So this test function is even less useful for the sorts of tests that are written in QML. Those who want to test pathological event sequences can do it in C++. Task-number: QTBUG-42185 Change-Id: Ib40c7acd0a807b2c701357164c1579a9cd1823a5 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove obsolete autotest caseLaszlo Agocs2020-10-021-28/+0
| | | | | | | | | ...that would fail (threaded render loop only) - if the CI would run these tests, that is. What this case relies on went away from the threaded loop weeks ago Change-Id: Ia6087241d497e945a10a8f22d73468e557f251a7 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* qmllint: Fix updating of parent propertyUlf Hermann2020-10-023-0/+18
| | | | | | | | | | | We need to check for the baseTypeName, not for the internalName. Also, this is not really the scope's business but a property of how qmllint sets up its scopes. Task-number: QTBUG-87116 Change-Id: I8f0e558a4a5861164c6e85f90e3d88e469ea0769 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Evgeniy Dushistov <dushistov@mail.ru>
* qmllint: Ignore grouped properties againUlf Hermann2020-10-025-9/+67
| | | | | | | | | | We cannot handle those, yet. Add tests that prove correct grouped properties pass and incorrect ones are expected to fail at causing qmllint to fail for now. Task-number: QTBUG-87116 Change-Id: I0aeed15d262e2c6226e27d5d92890c5385a38936 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* skip tst_QQuickMouseArea::nestedEventDelivery on macOSShawn Rutledge2020-10-021-0/+3
| | | | | | | | | It has blocked integrating anything in CI because of crashing, so blacklisting is not enough. Does not crash locally for me on macOS 10.15 Task-number: QTBUG-86729 Change-Id: Iddae9edb09fd7b7fdadd122779832c80d0376b2d Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* qmllint: Consistently spell "Warning"Ulf Hermann2020-09-281-2/+2
| | | | | | | There was one place where it was written in lower case. Change-Id: Id953fa6c260502ab5bca8cfa061c817bb5a70581 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* qmllint: Make imports localUlf Hermann2020-09-282-0/+2
| | | | | | | | | Imports are not transitive. qmllint gets this wrong so far. Fixing it reveals two tests where we use types we haven't imported. Import the relevant modules. Change-Id: I45f3229468d54137f97d6b699f3a98a1349bc412 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Port from devicePixelRatioF() to devicePixelRatio()Morten Johan Sørvig2020-09-282-3/+3
| | | | | | | This ports all of QtDeclarative. Change-Id: Ie6eb4d96b4d49fbed1e8be514d03e331549cd712 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* qqmlimport: Use stable_partition instead of stable_sortFabian Kosmale2020-09-282-12/+24
| | | | | | | | | | | | We do not actually need to sort the imports list, we just require that all inline component imports come before all other imports. This avoids triggering a MSVC STL debug assertion about the used Compare function not actually creating a strict ordering. Fixes: QTBUG-86989 Pick-to: 5.15 Change-Id: I381852392545287ec02b186fcb4f33be3ae95b33 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Blacklist a few more on macOSShawn Rutledge2020-09-264-0/+10
| | | | | | Task-number: QTBUG-86729 Change-Id: I49fb86e867afeee2f0567dc3498598b249ae5e08 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Handle ungrab and grab-cancel consistently; inform handlersShawn Rutledge2020-09-268-42/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Call onGrabChanged on Pointer Handlers during grab transitions: this was missing in a97759a336c597327cb82eebc9f45c793aec32c9. Flickable needs to receive an ungrab by child-event-filtering, in order to set its pressed state back to false (as in the cancelOnHide autotest). This is best done as a result of the QPointingDevice::grabChanged signal, while trying to send the ungrab to the item that was the grabber, rather than as a special case. Thus, QQuickWindowPrivate::onGrabChanged (the handler for the QPointingDevice::grabChanged signal) is now the only place from which we call QQuickItem::mouseUngrabEvent() and touchUngrabEvent(). But the result is that they are called in more cases than before, so some tests need adjustment. touchUngrabEvent() is not sent unless the event is available and we can verify that all points have been released. This is important for MultiPointTouchArea: it will react by ending interaction with all points at once. Another thing that's important to MPTA and multi-touch handlers is that QQuickWindowPrivate::deliverPointerEvent() must not clear grabbers of points that are not yet released, in the case that only some points are. QQuickWindowPrivate::removeGrabber() now calls QPointingDevicePrivate::removeGrabber() with its optional cancel argument, so that it will emit either a cancel or an ungrab transition. That's only relevant for Pointer Handlers, whereas QQuickItem mouseUngrabEvent and touchUngrabEvent don't make a distinction. Task-number: QTBUG-86729 Change-Id: Idf03aef2e2182398e0fc4a606c0ddbb2aaed5681 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* TypeDescriptionReader: Don't export C++ names as QML namesUlf Hermann2020-09-251-0/+1
| | | | | | | | | | | | | | This is just wrong. The types are not visible in QML under their C++ names. Indeed, this way we reveal a number of places where we confuse the names. Fix those in turn. Furthermore, one of the tests was incorrect. The qmltypes files did not contain an export entry for one of the types, and therefore the type was formally anonymous in QML. However, we did access it via its C++ name. Fix that by exporting the C++ name. Change-Id: I8dd96334076b90fb174daf5b285d622f96495f56 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* cmake: enable colorresolving benchmarkFabian Kosmale2020-09-252-1/+29
| | | | | Change-Id: I15321e9940b1b9d5a1ae6f1296bf9466ca4f4262 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Blacklist various failing testsShawn Rutledge2020-09-256-0/+23
| | | | | | | | | | | | tst_qqflickable::nestedStopAtBounds, nestedSliderUsingTouch tst_QQuickMouseArea::preventStealing, nestedFlickableStopAtBounds tst_QQuickMultiPointTouchArea::inFlickable2, inFlickableWithPressDelay tst_QQuickPathView::nestedinFlickable, touchButtonOnFlickable, touchGrabCausesMouseUngrab tst_qqmlpropertycache::derivedGadgetMethod Task-number: QTBUG-86729 Change-Id: Ie11a50c25f90fde2636b05a72f51640643b33dec Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QQmlDirParser: Treat dependencies like importsUlf Hermann2020-09-251-0/+19
| | | | | | | In particular, allow auto and latest versions. Change-Id: I4a6b26112950d066ae2d8a37dc0e9fa1dec24724 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Blacklist tests flickable.nestedPressDelay, gridview.snapOneRowShawn Rutledge2020-09-242-0/+4
| | | | | | Task-number: QTBUG-86729 Change-Id: I061147b99c957a9b0d15b2f3305e26c9e2a99989 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Stabilize tst_QQuickListView::parentBindingShawn Rutledge2020-09-242-2/+8
| | | | | | | | | | Some platforms aren't registering their mouse devices yet, and we don't want false failures in CI because of that, so just register a mouse, even if it ends up being an extra one a lot of times. Task-number: QTBUG-86729 Change-Id: Ia3a91e3d1e4fb8df90352555c9a7ec6ea18bf6fe Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Get rid of QMutableEventPoint::stationaryWithModifiedPropertyShawn Rutledge2020-09-241-6/+7
| | | | | | | | | | | | Omitting stationary points from touch events is such a marginal optimization that this code probably isn't worth maintaining. It wasn't implemented correctly this time either, according to the tst_QQuickMultiPointTouchArea::stationaryTouchWithChangingPressure() test. Task-number: QTBUG-77142 Change-Id: I1ccc8ffe0451d6417add2b03c063ac1aebe36e8e Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Blacklist tst_qquickwindow::cleanupGrabsOnReleaseShawn Rutledge2020-09-241-0/+2
| | | | | | Task-number: QTBUG-86729 Change-Id: I9d592ae48d26851938d57d52620af12c2086054a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Blacklist maiop::dragHandlerInSiblingStealingGrabFromMouseAreaViaTouchShawn Rutledge2020-09-241-0/+2
| | | | | | Task-number: QTBUG-86729 Change-Id: Ib2585663d8cc213ccd14d1fa5d3bd854062b09c9 Reviewed-by: Daniel Smith <Daniel.Smith@qt.io>
* qmllint: Don't dump imported enums into the current scopeUlf Hermann2020-09-243-1/+21
| | | | | | | | | This bit of code has never fulfilled any discernable function. Enum access is done elsewhere. Add a test case to prove that access to enums from QtQml's plugins.qmltypes still works. Change-Id: I62fd6c1ec748c88205aa20367ee06d7a33502fa1 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>