aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktestutils/qml
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Update commercial SPDX-License-Identifier"Tarja Sundqvist2025-06-026-6/+6
| | | | | | | | | | This reverts commit 6517e8df24d2381e951b9ec3e0cda2ae33edac37. Commercial SPDX license identifiers need to be removed from the opensource release. Change-Id: I60f8c76ace400db6182e012c8aae050d13d262e9 Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* Update commercial SPDX-License-IdentifierTarja Sundqvist2023-12-136-6/+6
| | | | | | | | | | | | Some files in tqtc-qtdeclarative were missing the commercial SPDX-License-Identifier. Build files, examples, tests, or documentation are not updated. Task-number: QTQAINFRA-5900 Change-Id: I2cad9a7a271b0b3f3af3074259614b890b266a91 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit 132fe2df41fc5e69fec39440b35137d5f0d63f6e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Replace Q_OS_OSX with Q_OS_MACOSTor Arne Vestbø2023-06-071-2/+2
| | | | | | | Change-Id: I1e408b9676a9bfc299dcd45f1c790827e316db30 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit bec0b8a05d349a052504b9c11caa259a63012210) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* tst_QQuickTextInput: Stabilize clipboard related functions on XCBAxel Spoerl2023-04-121-1/+13
| | | | | | | | | | | | | | | | | | | Even if compiled with QT_CONFIG(clipboard), a functional clipboard might not be available on XCB (e.g. due to restrictions on CI VMs). This patch adds an explicit test for XCB to platformquirks_p.h. It skips the test functions canPaste() and canPasteEmpty(). As a drive-by it constifies local variables in canPaste() and middleClickPaste() and unifies the skip message. It also removes the BLACKLIST entries for clipboard-related tests on opensuse. Fixes: QTBUG-95940 Change-Id: If6da9b589e98c1f63435f3d444567ce310ddee8a Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit c6fdaa5ab049c7baf19a912118dd55b96ef540d8) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Port from container::count() and length() to size()Marc Mutz2022-10-071-5/+5
| | | | | | | | | | | | | | | | | | | | This is a semantic patch using ClangTidyTransformator as in qtbase/df9d882d41b741fef7c5beeddb0abe9d904443d8: auto QtContainerClass = anyOf( expr(hasType(cxxRecordDecl(isSameOrDerivedFrom(hasAnyName(classes))))).bind(o), expr(hasType(namedDecl(hasAnyName(<classes>)))).bind(o)); makeRule(cxxMemberCallExpr(on(QtContainerClass), callee(cxxMethodDecl(hasAnyName({"count", "length"), parameterCountIs(0))))), changeTo(cat(access(o, cat("size"), "()"))), cat("use 'size()' instead of 'count()/length()'")) a.k.a qt-port-to-std-compatible-api with config Scope: 'Container', with the extended set of container classes recognized. Change-Id: Idb1f75dfe2323bd1d9e8b4d58d54f1b4b80c7ed7 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QuickTestUtils: Make 'data' subdir configurableUlf Hermann2022-09-072-15/+22
| | | | | | | | tst_ecmascripttests wants to call it "test262". Task-number: QTBUG-100242 Change-Id: I978171a85fe6ade1cc40129db42ef9a5177fe90f Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Remove Qt key words from header filesYuhang Zhao2022-07-192-2/+2
| | | | | | | | | | | So that users can use QT_NO_KEYWORDS when linking against QtDeclarative, even if they are using private headers. Docs, examples and tools are not touched because it's not necessary. Pick-to: 6.4 Change-Id: Idc30797074aaa72576429ebdaaf915d7f5acf84e Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Add convenience API for making QQmlDataTest-based tests fail on warningsMitch Curtis2022-07-052-3/+18
| | | | | | | | | | | | | | | | | | | | After this patch, if a QQmlDataTest-derived class passes FailOnWarningsPolicy::FailOnWarnings to the base constructor, any non-empty warning encountered by that test will result in a test failure. This avoids the need to duplicate the catch-all regex in tests that want to fail on warnings. The goal is to gradually enable failure-on-warnings over time. Leave comments and explicitly pass DoNotFailOnWarnings for tests that should never fail on warnings. Task-number: QTBUG-98718 Pick-to: 6.2 6.3 6.4 Change-Id: I4b647d93a0f28ac891c4bdb19ef74569f2918e8f Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Use SPDX license identifiersLucie Gérard2022-06-116-162/+12
| | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Pick-to: 6.4 Task-number: QTBUG-67283 Change-Id: I63563bbeb6f60f89d2c99660400dca7fab78a294 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* QQmlDataTest: fix dataDirectoryUrl generation for paths in qrcIvan Solovev2022-04-291-1/+1
| | | | | | | | | | | | | | | When the data directory is located in qrc (like on Android), the data directory url was generated incorrectly, missing the last '/'. As a result QQmlDataTest::dataDirectoryUrl().resolved("something") call was providing incorrect results. This patch fixes it, which allows to unblacklist tst_qqmlqt::resolvedUrl() for Android. Task-number: QTBUG-100014 Pick-to: 6.3 6.2 Change-Id: Id336a698b493edaa6e2ab7d36efbbef1f5acd1d6 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QuickTestUtilsPrivate: includemocsMarc Mutz2022-04-292-0/+4
| | | | | | | | | | | | Including moc files directly into their classes' TU tends to improve codegen and enables extended compiler warnings, e.g. about unused private functions or fields. Pick-to: 6.3 6.2 5.15 Task-number: QTBUG-102948 Change-Id: I3c9d74e94b0fbbf1e5e9d59522f400485c959cb5 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* QString::count deprecation follow-upMårten Nordheim2022-03-181-2/+2
| | | | | Change-Id: I1f7185c6b630792504ca2dd3d5e2f80ac63f49bd Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* quicktestutils: do not rely on trasitive includesFabian Kosmale2022-03-111-0/+4
| | | | | Change-Id: Ic36ebd229ef9a435b50df49380712aa241bc2a72 Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
* Make sure all private headers include at least one otherThiago Macieira2022-03-104-1/+4
| | | | | | | | | | See script in qtbase/util/includeprivate for the rules. Since these files are being touched anyway, I also ran the updatecopyright.pl script too. Change-Id: Ib056b47dde3341ef9a52ffff13ef677e471674b6 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* qqmlxmlhttprequest: Fix h2c fallout and ignore in futureMårten Nordheim2021-12-021-0/+11
| | | | | | | | | | | | The headers were hardcoded but seeing as they are ultimately ignored on the server-side (which is following the spec) we can also ignore them if they come back in some form in the future. Pick-to: 6.2 Fixes: QTBUG-98811 Change-Id: Ida490cbd8193eb3e3bf8d56fd387af93c408d921 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* QQmlDataTest: Use custom cache directory and clean it upFabian Kosmale2021-11-262-0/+9
| | | | | | | | | | This should help with tests failing due to stale cachegen files. Task-number: QTBUG-98404 Change-Id: I9f9846f30e1c0e9335fc15fbfe8689c9a4f5d60b Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Purge old AST dumper and use the functionality provided by the QML DOMFabian Kosmale2021-11-132-1537/+0
| | | | | | | This reduces the number of AST visitors we need to maintain. Change-Id: I9b55706092b4b285816fe6680c94116694bd1f05 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Replace 0 pointer constants with nullptrAllan Sandfeld Jensen2021-10-181-4/+4
| | | | | | | Replaced in most common patterns. Change-Id: Idcaff1f2e915f29922702d3600a2e5f1e2418a7a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Consolidate test helpers into private librariesMitch Curtis2021-09-138-0/+2570
Previously each test would include and build sources from the shared folder. Now we make those sources a library, build it once, then have each test link to it instead. We also take the opportunity to move some helpers that qtquickcontrols2 had added into the quicktestutils library where it makes sense, and for the helpers that don't make sense to be there, move them into quickcontrolstestutils. We add the libraries to src/ so that they are internal modules built as part of Qt, rather than tests. That way we can use them in a standalone test outside of qtdeclarative. Task-number: QTBUG-95621 Pick-to: 6.2 Change-Id: I0a2ab3976fdbff2e4414df7bdc0808f16453b80a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>