aboutsummaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* TreeViewDelegate: allow app to add custom pointer handlersRichard Moe Gustavsen2022-02-102-6/+62
| | | | | | | | | | | | | | | As it stood, it was not possible to add custom pointer handlers to a TreeViewDelegate, to e.g do an expandRecursive() if using the right mouse button, or holding down ctrl during a click. This patch will change this, so that we only perform the default collapse/expand operations when using a plain left (double) click, and ignore the event otherwise. Change-Id: Ifbdf0903158b65c50d0e36e98ab7e48efaa3e3ab Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> (cherry picked from commit 2014101583b89128960f645e57192d1d475767e6) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Disable failing declarative tests on AndroidAssam Boudjelthia2022-02-1017-3/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows us to enable testing on declarative for the module as a whole and have some sort of test verification for the mean time, and fix the fails over time. Task-number: QTBUG-100003 Task-number: QTBUG-100014 Task-number: QTBUG-100016 Task-number: QTBUG-100018 Task-number: QTBUG-100020 Task-number: QTBUG-100021 Task-number: QTBUG-100164 Task-number: QTBUG-100166 Task-number: QTBUG-100167 Task-number: QTBUG-100169 Task-number: QTBUG-100171 Task-number: QTBUG-100173 Task-number: QTBUG-100175 Task-number: QTBUG-100176 Task-number: QTBUG-100177 Task-number: QTBUG-100191 Task-number: QTBUG-100253 Task-number: QTBUG-100254 Task-number: QTBUG-100256 Task-number: QTBUG-100257 Task-number: QTBUG-100258 Change-Id: I85bf1501b94f04853a1ca715e35df0a56041308a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit f22d884faff5f68230981fc191527c67aeb8a18f) Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Fix tst_controls missing resourcesAssam Boudjelthia2022-02-098-4/+40
| | | | | | | | | | | | | | bundle all data resources and make sure all imports and bundled. Add dummy.qml files which are needed for androiddeployqt to be able to package the QML modules because they're not imported in a normal fashion under a QML file but rather implicitly inside the test cases. Task-numer: QTBUG-97056 Change-Id: I8be72c06994cc7bd90fb176a19bf69142b225fd1 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit b6413335b0a977e5c7218c4d74fb090fa11bf52e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Use the new QHoverEvent ctor taking globalPosShawn Rutledge2022-02-091-6/+8
| | | | | | | | | | | We want to give globalPos to every pointer event ctor in general, to avoid bad assumptions. Task-number: QTBUG-100324 Change-Id: I8f744d4f01aec9e860b625a77b258237539deab6 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 334aea0aa14eac90a6ff77aad120d76ed0fad372) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Un-blacklist some passing testsShawn Rutledge2022-02-088-22/+0
| | | | | | | | | | | | | | | | Task-number: QTBUG-75786 Task-number: QTBUG-82015 Task-number: QTBUG-82043 Task-number: QTBUG-82404 Task-number: QTBUG-85622 Task-number: QTBUG-85624 Task-number: QTBUG-88541 Task-number: QTBUG-95863 Change-Id: I361afa8b78e2947b12194b6b1212e59db1b20b11 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> (cherry picked from commit b0848d038b7bacfd656fbadc37993a81068132bb) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Correctly handle QQuickState::whenFabian Kosmale2022-02-082-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | 64c1fbe96c68b1286a70242ff4922be140128cb2 fixed that one could not assign a constant value to QQuickState::when. However, as alluded to by a comment in QQState's code, this caused state oscillation, breaking clean transitions between two states. The reason for this issue is that as soon as once of the when condition changes, we check the when condition of all states. However, in the case of logically exclusive cases we can run into the issue that the binding of the second state has not been re-evaluated yet. Thus, we might end up with all states being false, even though the second one becomes true immediately afterwards. To avoid this issue, we force the reevaluation of the binding. However, instead of doing this by using a QQmlBinding property (with all the tooling and runtime issues that it would entail), we keep using a normal property. We then ask the engine for the binding, and if it exists, we reevaluate it to obtain the current value. Fixes: QTBUG-86695 Change-Id: Id10a3549935794b93b29450b0f5dfb6d1df691a1 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit a8c729d83979fb0b9939044d246e73b1d578e65b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* SwipeView: don't cull every child item that gets addedShawn Rutledge2022-02-051-0/+63
| | | | | | | | | | | | | | | | | | This reverts commit a055629f43cf8589ff6d69e46b2610429aaa4167. A SwipeView is a ListView, which means as long as the side-by-side delegates are the right size, only one of them should occupy the area of the SwipeView itself. The other delegates (isCurrentItem == false) are to the sides, and might be outside the window, hidden under other items, or clipped. So hopefully there are not users who rely on this culling to hide them. Fixes: QTBUG-99547 Task-number: QTBUG-51078 Task-number: QTBUG-51669 Change-Id: Ic90dc1c44b9a36dc717238b47003b4d88e91f789 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit e10de033f4c44855de7287a97e2aa651f648742e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QmlCompiler: Place code for CmpNeInt in parenthesesUlf Hermann2022-02-043-0/+31
| | | | | | | | | | Otherwise it will apply the '!' to the first argument. Fixes: QTBUG-100480 Change-Id: Iaefa25d062ad8bbd9d4278ffeaa52fc53ed417e2 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit db6459665c4b4a48db9aefebfe310237e7cc92d9) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QNX: Disable flaky testPasi Petäjäjärvi2022-02-041-0/+2
| | | | | | | | | | | | | Fails with no apparent reason 1: FAIL! : qquicklayouts::Tests_GridLayout::test_spacings(NaN) property itemRect 1: Actual (): [18,0,10,10] 1: Expected (): [15,0,10,10] Change-Id: I796ea18d2d29780ae2433d9b9b4d2be8d09d495a Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io> (cherry picked from commit 5ed37bbbf1a32d1e32a82371d8602a54ba591b6d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Detach QEventPoint instances during touch compression; test & docsShawn Rutledge2022-02-042-0/+71
| | | | | | | | | | | | | | | | | | | | If we don't detach, they could be modified between the time that the event is stored (delayed) until it's delivered. QQuickDeliveryAgentPrivate::compressTouchEvent() had no explicit test coverage until now; in fact, most tests call QQuickTouchUtils::flush() after every touch event to ensure that it gets delivered immediately. Also add internal docs. Fixes: QTBUG-97185 Fixes: QTBUG-98486 Fixes: QTBUG-98543 Change-Id: I6fd76651ca6fbf15169c44d4d9dbbeb7dc7e3a71 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io> (cherry picked from commit d08038ba7015dc681c95654f7fe5e54b60c2e55c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QQmlAdaptorModel: Do not use reparenting for lifetime managemmentFabian Kosmale2022-02-032-0/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In QQmlAdaptorModel, we were using QQmlStrongJSQObjectReference to ensure that a passed in model lives long enough. However, QQmlAdaptorModel uses reparenting to keep objects alive. This is not safe, as we can use QML singletons as models. Reparenting singletons messes with the engine's lifetime handling once their new parent gets deleted: The object will be marked as queuedForDeletion by QQmlData::markAsDeleted; consequently wasDeleted returns true for the object, and any ScopedObject or ObjectWrapper will return nullptr when we try to retrieve their underlying QObject. The actual object probaly does not get deleted, as it is not placed in the QML heap. Consequently the gc will ignore it. This leads to a crash when the singleton is accessed in a different place: We see that the object is non-null, create a ScopedObject for it, and then try to later access the ScopedObject's underlying object (assuming that it must be non-null, because we already checked for the actual object being non-null). However, due to the reasons outlined above, we actually receive a null pointer, and thus encounter a crash. To avoid he issue, we change the lifetime management strategy: Instead of using the parent to keep the object alive, we now use a QV4::PersistentValue. Fixes: QTBUG-100260 Change-Id: I266e6ef94c4f079de3da2742d6fb8d61df5a64ce Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit 6901eacff40a7d8781e20fb5bcfd28d7526b589b)
* qmltc: Rely on QQmlJSResourceFileMapperAndrei Golubev2022-02-032-8/+19
| | | | | | | | | | | | | | | | | Similarly to qmllint, we should use QQmlJSResourceFileMapper in qmltc. This should in theory allow us to avoid implicit import dir vs qmldir path issues (where the former comes from source dir while the latter comes from build dir) At present, it does not seem to be the case, however. But this is to be addressed separately Task-number: QTBUG-100103 Change-Id: Ie85799cb0a4b8b1620964000bc5939e9d046678e Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit 8a72c684464a48595337b01ada5605f612f7971e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Restructure QML module of qmltc testsAndrei Golubev2022-02-0312-198/+183
| | | | | | | | | | | | | | | | | | | | | | | | Use a more canonical qmlcppcodegen-like structure, showcasing a better QML module As this change makes a single QML module instead of two QML modules (for the _diskcache and _nodiskcache scenarios), there are pros and cons Pros: + Prepares us for proper introduction of QQmlJSResourceFileMapper + Theorically allows tests to avoid (additional) weird imports Cons: - Denies the ability to test generated types under default QT_NAMESPACE (in addition to user-provided namespace). This is fine as we don't need this feature until we are able to compile QQC2 and modules alike Task-number: QTBUG-99198 Task-number: QTBUG-100103 Change-Id: I13a594a1859719bc0af3370029e6be7b1744656b Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit 6380f10185c0ec6b444cc9140480dc11f87bc67d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* V4 Date: Support another nonstandard date format QDateTime has droppedUlf Hermann2022-02-032-0/+13
| | | | | | | | | | | | Amends commit 43eaa77e8ed03153335c0002dcc8b660c39a0beb. Fixes: QTBUG-100377 Change-Id: I01028bd991b8a64bd9dcad31ce90536d83dad0a1 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> (cherry picked from commit 41a5c7b223d958bd40240aee81bb8fb96540735d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Skip tests that call qmlcachegen when cross-compiledPasi Petäjäjärvi2022-02-032-0/+53
| | | | | | | | | | qmlcachegen is not meant to be available on the target. Fixes: QTBUG-100366 Change-Id: I5cbaa62e85d9a5dd6467840eb4e3ba5e3b63857c Reviewed-by: Pasi Petäjäjärvi <pasi.petajajarvi@qt.io> (cherry picked from commit d245985f0b7aa698be2bd9c196fd7b9299aa5693) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QNX: Decrease number of objects created in tst_QJSEngine::newQObjectRacePasi Petäjäjärvi2022-02-021-1/+5
| | | | | | | | | | | | | | | | This test is so slow on QNX that it times out: QFATAL : tst_QJSEngine::newQObjectRace() Test function timed out QObject: Cannot create children for a parent that is in a different thread. (Parent is QGuiApplication(0x169b0a6b90), parent's thread is QThread(0x37eb7070f0), current thread is QThread(0x37eb734150) FAIL! : tst_QJSEngine::newQObjectRace() Received a fatal error. Task-number: QTBUG-99168 Change-Id: I623bff212b8334af60198e52bc283cc97187c3a7 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit 7fcc9c7f5848ac8c8264341dca7a0b5a3f0dec94)
* JavaScript: Make "this" available in blocks inside arrow functionsUlf Hermann2022-02-021-0/+22
| | | | | | | | Fixes: QTBUG-98039 Change-Id: I51ff36994fa0f3f3568c8114cb6841f677f64bc4 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit eeec9f03e9cf57e8cde311897f7e3e62a217da15) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Improve testing of resizing in the rendercontrol autotestLaszlo Agocs2022-02-021-24/+47
| | | | | | | | | | | Drop the unnecessary calls to create and setRenderTarget. At the same time, start testing that resizing really works as expected. Change-Id: I8d60219767fded8069a79abaf5ce85c1cd678974 Reviewed-by: Christian Strømme <christian.stromme@qt.io> Reviewed-by: Andy Nichols <andy.nichols@qt.io> (cherry picked from commit 991ca56147a8465ea677fe5f430e20439dd94f12) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* CMake: Include upper case .js and .mjs files in qmldirUlf Hermann2022-02-027-2/+16
| | | | | | | | | | | You can use them as singletons. Fixes: QTBUG-100326 Change-Id: I8e07600657bd43ba8376279ffe39cfa5d3213c38 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit bf38043b6107cb10bca4be78ecc8bbc20338a61b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QNX: Blacklist tests because not supported for software renderingPasi Petäjäjärvi2022-02-024-0/+15
| | | | | | | | | | | For QNX tests are run on qemu with offscreen plugin and software rendering. Change-Id: Idda75387bb7b2a4fc9117a442e307a2b741bc5c5 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Andy Nichols <andy.nichols@qt.io> (cherry picked from commit 11dacf93669ac68b212e343b996a076c8b16ef97) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QNX: Blacklist tests that failsPasi Petäjäjärvi2022-02-025-0/+5
| | | | | | | | | | | | QNX tests are run on CI in qemu using offscreen qpa plugin and software backend similar like b2qt. See QTBUG-95750 Task-number: QTBUG-95750 Change-Id: I4c6e4a513f8289d50922259e474a41173c29224b Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> (cherry picked from commit 8dc54c99fdab33603b68595d9f0e1a6eaccf5dd6) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QNX: Blacklist flaky qquickpointhandler testPasi Petäjäjärvi2022-02-021-0/+1
| | | | | | | Change-Id: I94d1f1c2b5afe7a20d1554238a223c3c002c8428 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> (cherry picked from commit c97955b39db4ecfa22ec211b1b6b0e7b4422e13f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QNX: suppress QEXPECT_FAIL() on two tests it passesPasi Petäjäjärvi2022-01-311-2/+2
| | | | | | | | | | | As QNX's support for feature timezone uses the TZ backend, V4's Date.timeZoneUpdated() works, as on Linux, so tests for this method now pass. Change-Id: Ie6c318023bdf508d9f2067ca3fa9d77b78292be5 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> (cherry picked from commit 9c63dfd249aeeacc5c1573b6cfe4176fb9480f25) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Distinguish property change signals from user-defined signalsAndrei Golubev2022-01-312-0/+32
| | | | | | | | | | | Do not expose this information to qmltypes just yet, though, as this seems irrelevant at the moment Change-Id: Iffd8901ef9899a0fff226e8799bf45c1d688b92b Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit b1bb4c8e5f0d4a65f36b2002bcdaf9bfcbed8c77) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QNX: Cannot run qml only testsPasi Petäjäjärvi2022-01-291-1/+1
| | | | | | | | | | | QML only tests expect to run with qmltest tool and since QNX autotests are run on Qemu that does not work. Task-number: QTBUG-100202 Change-Id: I21732c312486d07e0902b9235a7f8cb84eb5e045 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 98d4a44ecfa0c1afe3e58605f56937f20072d281) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QML: Disable host debugging related tests when cross compilingPasi Petäjäjärvi2022-01-291-14/+18
| | | | | | | | | | | Disable tests that are meant to check debugging features using host binaries. No point running those tests on actual targets. Change-Id: If020dfa00410668a305013254617fd50a0a01175 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> (cherry picked from commit 584c912dbbdc2b6f746b22e651cc57c1835c8d35) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QNX: Disable ecmascriptestsPasi Petäjäjärvi2022-01-291-1/+1
| | | | | | | | | | | | | | | For QNX tests are run on qemu which is slow so the tests will always timeout. As currently timeout is set to env via CMakeLists.txt it does not have effect on QNX as that env variable is not passed over SSH connection. Running tests on QNX qemu takes ~30min: PASS : tst_EcmaScriptTests::cleanupTestCase() Totals: 4 passed, 0 failed, 0 skipped, 0 blacklisted, 1782249ms Change-Id: Ief1ccb05ce21bf3140554272708c95ca5515bc23 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit 856df4380a467d0a5554232d213d549fe8a94d0d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QNX: Force logging to stderrPasi Petäjäjärvi2022-01-291-0/+5
| | | | | | | | | | | | | | | | | | Sub-process output is by default going to slog2 in QNX so we need to force output to stderr instead. 1: FAIL! : tst_qqmlapplicationengine::application(delayed quit) 'QString(testStdErr).endsWith(QString(expectedStdErr))' returned FALSE. ( 1: Expected ending: 1: qml: Start: delayedQuit.qml 1: qml: End 1: 1: Actual output: Task-number: QTBUG-76546 Change-Id: I4a7b6c25b079f7dcc479fc2bcbd3b079bd7bc519 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 5bc77e9b9c9ee878e31dbf6b0254b7cdee81d73c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Use up-to date LGPL license headerKai Köhne2022-01-273-33/+42
| | | | | | | | | | | | Remove usages of outdated LGPL3 header that references LICENSES.LGPLv3 instead of LICENSES.LGPL3. See also 5d4679289bc for a similar commit in the past. Change-Id: Icbe5eea7bb7b9c5d46cdd56fa3b177d2e22a5fa9 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit f3e4ecfbffa19facb12800ae41f261ff3bfdac63) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* qmltc: Rename CMake command's argument FILES -> QML_FILESAndrei Golubev2022-01-271-2/+2
| | | | | | | | | | This way we make it consistent with qt_add_qml_module() Fixes: QTBUG-100214 Change-Id: I9f38a8ba3dec978ccdf4ea937ff662ae2449e582 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 97123dbe6755a787e93797f717f8ebf193352b85) Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Enhance tst_qmltc::componentTypes() by verifying that ids are correctAndrei Golubev2022-01-271-0/+9
| | | | | | | | | We can in fact check that the ids match to correct objects Change-Id: I46ed1a3d0a9ef429670fdc0438a5d717971c459c Reviewed-by: Fawzi Mohamed <fawzi.mohamed@qt.io> (cherry picked from commit feaed5f7aa6c82d9132e71037007b7c91ea57713) Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Don't blacklist tst_QQuickFramebufferObject::everything on b2qtShawn Rutledge2022-01-271-0/+1
| | | | | | | | | | | | | Put back the [testInvalidate] condition accidentally removed while removing the first of the platforms it formerly guarded. Amends 6336763588b45a2eeae6af29f5e4ba705b64b4d6 Task-number: QTBUG-64470 Task-number: QTBUG-65614 Change-Id: I494c3359c027696dae795874e1f0337102738fe7 Reviewed-by: Marc Mutz <marc.mutz@qt.io> (cherry picked from commit affde02775e24047ff6e61651a3095654d2e3bba) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix tst_basic missing resourcesAssam Boudjelthia2022-01-272-1/+10
| | | | | | | | | | bundle all data resources and make sure all imports and bundled. Task-numer: QTBUG-97056 Change-Id: I0711675d6c2a9a79790ec460e419c65d581e6ec9 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit b44ee5022cd0418d97df7c467a209a0d1c24cff3) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Add missing dependencies to tst_qmlcppcodegenUlf Hermann2022-01-261-0/+6
| | | | | | | Change-Id: Ifb5af14faa8229d4f7025d275147044629f4f2cb Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 672891354220c05a712663d637e5c5d0074a3181) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QML: Host only testsPasi Petäjäjärvi2022-01-252-6/+10
| | | | | | | | Change-Id: I7c0f65868258bd706d9c55022d3546f2b1cb771a Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> (cherry picked from commit 3199567e96027e32f50d702ba65dede370cbd93e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Skip tests that fail on platforms that don't implement grabWindowVolker Hilsheimer2022-01-244-4/+4
| | | | | | | | | | | Replace QEXPECT_FAIL with QSKIP so that we can fix the offscreen plugin, and then re-enable tests that pass without having to orchestrate with the dependency updates. Change-Id: Ifdf7fe85a5005f30d2edcba958ff0e9c6c9000b2 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit a3924b9846f8f3412e6cfc3704f69488e64da98e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Skip the shapes tests on offscreen platformShawn Rutledge2022-01-241-10/+10
| | | | | | | | | | | Replace QEXPECT_FAIL with QSKIP so that grabWindow can be fixed in the offscreen plugin without XPASS-failing tests in qtdeclarative. Task-number: QTBUG-99962 Change-Id: I470061a324c963e09b9ebcb48daabdf8d960ff90 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> (cherry picked from commit 5d2ffc03f89d092f46ae14e958bedf9fc441b7ec) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QQuickTreeView: be able to expand rows that are not yet visible in the viewRichard Moe Gustavsen2022-01-241-0/+25
| | | | | | | | | | | | | | | | | | If the app expands a row in TreeView, that row will for a brief moment be expanded in the proxy model, but not in the view, until the view is polished. For that reason, when determining if a row can be expanded or not, we should check the state of the proxy model, and not the view. Note: if the application needs the state of the view to reflect the state of the proxy model immediataly after a call to expand, forcePolish() is always possible. Task-number: QTBUG-91374 Change-Id: I5b85e0b5c3b32d17f93409153041df3fc2437424 Reviewed-by: Andy Shaw <andy.shaw@qt.io> (cherry picked from commit a43912865e294f2014f03eb7073ecd9ecf387623) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* CMake: Don't cross-compile qjtestAlexandru Croitor2022-01-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously it was only excluded on ANDROID, but cross-compiled for other platforms. The executable should only be built when the target Qt is meant to be used as a development SDK, to be executed on some host machine. Because at the moment we lack a proper abstraction for that, as a work around, we exclude building it when cross-compiling. The executable is not called automatically by any test, it is only run manually by a developer. In the future, the qt_internal_add_tool call should likely be replaced by a customized qt_internal_add_app call, installing the executable into $prefix/libexec rather than $prefix/bin. Amends 5a55e526382f0bb6eb647c2e6b7ce55661889990 Task-number: QTBUG-92591 Task-number: QTBUG-100040 Task-number: QTBUG-100047 Change-Id: If20e73fe378acd51fe41d181078d273a7842fc81 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 0de113d37924b7403b74eea4a92fe2b62c557247) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Skip borderImageMesh test with the software backendLaszlo Agocs2022-01-241-0/+7
| | | | | | | | | | | | ShaderEffect (and BorderImageMesh) do not do anything with the software backend so the results of a scene with an effect in it cannot possibly be compared with the output from another (non-effect) scene. Fixes: QTBUG-100046 Change-Id: Ie2504971f423f68d5be381a71de459ca81af7894 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit c96fbe3e565a88427141160932115c09a1bdeef9) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QmlCompiler: Handle ID lookups of incomplete types correctlyUlf Hermann2022-01-223-0/+21
| | | | | | | | | | | Incomplete types are generally stored in some wrapper type. We cannot just assign to the accumulator. Also, we already know whether we have an ID lookup there. No need to determine it again. Change-Id: I1f9fd9f147c44975df33fe862523987d8e711905 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 3747c02fe64fbf5496dc540402dddadb1fa33c12) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QmlCompiler: Add C++ name also for types with no export candidatesUlf Hermann2022-01-212-0/+6
| | | | | | | | | | | Even if the type is only exported in a newer version of the module, we still need to know about it in an earlier version, in order to resolve base types. Change-Id: Ibc7940308e3c4aaebf9871a159e1d85f43cd7693 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 24e5b9090b513861e77dcb17b8e4d75f0bdf8651) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QQmlProperty: Prohibit ID lookup on explicitly given objectUlf Hermann2022-01-211-0/+2
| | | | | | | | | | | If an object is given, we should only use that object. Amends commit 21f15ede606df028479335c64c333db5fb1bb3f7. Task-number: QTBUG-100110 Change-Id: I51c0a44750c31984ba4937fb1cd2405dd93fcc19 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 44ca135c5a4d02ab29b57a3f15b84850aafb1cec) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* tests: port to QMutableEventPoint static APIMarc Mutz2022-01-214-54/+54
| | | | | | | | | | | | | This code was actually ok (no UB), but it's in the way of making QMutableEventPoint a befriendable namespace, so port from using QMutableEventPoint to QEventPoint instances + QMutableEventPoint static setters. Task-number: QTBUG-99615 Change-Id: I7ddcf154cb5da9b6ea2f0f0d8cac130a28203371 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> (cherry picked from commit c096435c307c610fe2dd3f177a1705b86d3631ab) Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* QmlCompiler: Respect revisionsUlf Hermann2022-01-214-5/+38
| | | | | | | | | | | | | | | | | | | | | | | The only place where revisions matter is at the boundary between composite and non-composite types. The revision of the first composite type inherited from determines which members of all composite ancestors are available. Therefore, store the revision together with the base type and pass it through the imports to have it available. Then use it to check availability of methods and properties. The test exposes two further problems, which are fixed, too: 1. If no method is found to call, we need to generate an error in the type propagator. We don't know what the call will result in, after all, and the code generator should reject it. 2. We need to check the right scopes for hasOwnMethod(). Otherwise we might not find methods that are available. Fixes: QTBUG-99128 Change-Id: I4c320b8dfb490b140d7b8c16e6b638b32f156faa Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit e19d48d07310708e56cb379124dff193c1a7fa71)
* TabBar: allow wheel events to change currentIndexNoah Davis2022-01-211-0/+49
| | | | | | | | | | | | | Setting wheelEnabled to true allows wheel events to increment or decrement the currentIndex. We keep track of the total amount of angleDelta so that touchpads and high resolution mouse wheels don't change the currentIndex too rapidly. Fixes: QTBUG-99619 Change-Id: I9bda828338ee5136efcdd6abeca8e5be15da0822 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> (cherry picked from commit 2ead10bf55733defe58616de7fe2c28452d00c93) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QQuickListView: Stop overlap for section and firstItem delegatesOliver Eftevaag2022-01-202-0/+173
| | | | | | | | | | | | | | | | | | | | | | | | | | Problem: The first delegate after a section delegate would have the same position as the section delegate, if the section delegate is invisible during initialization. In case the section delegates become visible later on during program execution, the delegates would be re-positioned again in the QQuickListViewPrivate::layoutVisibleItems function. But this would not call setPosition for the first item (delegate). It would only call setPosition for all delegates after the first one. This would mean that the position for the first delegate would never be updated, after the delegate was first created. Solution: Call FxListItemSG::setPosition() for the first item in QQuickListViewPrivate::layoutVisibleItems, just like we're already doing for all the items after the first one in the for-loop. Fixes: QTBUG-94848 Change-Id: I34a5ada336ab507b31e3675a1c11eba066fa139a Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> (cherry picked from commit 3aad05bc09f40d81df7748cbc246974230a3ca17) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Document qmltc toolAndrei Golubev2022-01-191-0/+5
| | | | | | | | | | | | | | | Add initial qmltc tool documentation with introduction, compilation process picture, description and limitations To simplify the description, we can consider some simple application. The same app can additionally become a test scenario for qmltc and a showcase of its capabilities Task-number: QTBUG-84368 Change-Id: If6d586a8c68f48d17133b25170d0fff627e2066c Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit de30f10aeb1ccf495cf39b3910e89d60f3dc591a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix build with tests when qtshadertools is not availableJoerg Bornemann2022-01-181-0/+4
| | | | | | | | Fixes: QTBUG-99888 Change-Id: I07638d31c3978a551f3beedd4dbaf329c1445bc7 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 3bfba0424bdc2f47188509a13132e7299330388a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QmlCompiler: Handle context push/pop in dead codeUlf Hermann2022-01-183-0/+34
| | | | | | | | | | Otherwise we end up with unmatched curly braces in the generated code. Change-Id: I4c24d4062a8ed54cd6a9ecb43dfd2b5d0a26c9e1 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io> (cherry picked from commit 6a54c6013d9037f5c75d47f5e03d6871591e53b2) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>