aboutsummaryrefslogtreecommitdiffstats
path: root/src/qmltest
Commit message (Collapse)AuthorAgeFilesLines
* QuickTest: Do not recurse forever on inline components in enumerateTestCasesFabian Kosmale2021-02-011-1/+4
| | | | | | | | | | | | | | | | | | | | | In TestCaseCollector::enumerateTestCases, we visit the super compilation unit of QML tpyes to check if they might be instances of TestCase. However, in the case of inline components, the super unit is the current compilation unit, and we would recurse endlessly. This does not address the issue that an inline component might actually inherit TestCase. However, as this only affects the enumeration output and does not actually affect test execution, this is not that much of an issue. It should also be noted that the enumeration also fails in any case where TestCases are loaded dynamically (with a loader), so the method is not 100% accurate even in the absence of inline components. Fixes: QTBUG-90740 Task-number: QTBUG-90762 Change-Id: I7e133d62c4f62fc46e9bd3999ff755f7ded3c386 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit edca9f3d60141a823a3b4401039f260c2c7f7888) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Document how to use CMake for Qt QuickTestKai Koehne2020-12-034-18/+51
| | | | | | | | Task-number: QTBUG-73058 Change-Id: Ia00916e8ce8193225a773f85fe2af87e334afaab Reviewed-by: Paul Wicking <paul.wicking@qt.io> (cherry picked from commit 3bf876a771c6e9e62b506f4c99965fca6d0e7f3b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Remove version numbers for import statementJerome Pasion2020-11-261-1/+1
| | | | | | | | | | | | -recommend using the import statement without versions for Qt 6.0 -update use of \qml snippet without \QtMinorVersion -some language change to be neutral about versions Task-number: QTBUG-87155 Change-Id: I3ac44f93aab3086c1a49de79ecc677beb4ef9180 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 72746ef0ad69d589de91f43aa2043d6e47745d68) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Remove version numbers for import statementJerome Pasion2020-11-241-1/+1
| | | | | | | | | | | -recommend using the import statement without versions for Qt 6.0 -update use of \qml Task-number: QTBUG-87155 Change-Id: I555d582a13006c5abb6dc1e0266d2987ba79c6d8 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit 370fe537badd2b98c2da7f8918a15411d5aa67ad) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Mention a change in Qt Quick TestVolker Hilsheimer2020-11-181-1/+3
| | | | | | Change-Id: Id81fcbd8e6869239ad4625907819987463443d07 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Rename "Porting" pages to "Changes"Jerome Pasion2020-11-091-2/+2
| | | | | | | | | | | | | | The content in the porting guides are closer to a changelog than a porting guide. At this point, it is easier for maintainers and contributors to write in a changelog than a guide. This change should help with readability and is closer to the usage of "Changes" in documentation. Part of a rename in other submodules. Task-number: QTBUG-87156 Change-Id: Ibb58a3cba5394962a5709aeb08e3701e16c7775d Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* CMake: Fix qmltest's config module name as understood by qmakeAlexandru Croitor2020-11-022-0/+2
| | | | | | | | | | | While the library artifact is called libQt6QuickTest.so, the actual Qt module name as understood by qmake is 'qmltest'. Regenerate the project to add the CONFIG_MODULE_NAME. This should make 'QT += qmltest' work now. Fixes: QTBUG-88025 Change-Id: I5627edbcce3f0e2b297a5d6b85489c038ec90b3b Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Regenerate projects to use new qt_internal_ APIAlexandru Croitor2020-10-062-8/+8
| | | | | | | | 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>
* Doc: Add porting guides for all modules to porting guidePaul Wicking2020-09-161-0/+46
| | | | | | | Task-number: QTBUG-84051 Change-Id: Iffc8774898dba5bda329fa572289cc0134fddb6f Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Avoid various warnings about deprected QMetaType methodsUlf Hermann2020-09-161-1/+3
| | | | | Change-Id: I8f4b2703fdd08ff341904219cec33c321e0511c7 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* [Fix] Use the sourceDir if specifiedAssam Boudjelthia2020-08-261-5/+6
| | | | | | | | | | Android is passing the test path via QUICK_TEST_SOURCE_DIR but it was set to ":/" no matter what. Pick-to: 5.15 Change-Id: If0e6615999019cf1869a237056d41e35b5be12f1 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Doc: fix Qt Quick Test headerMitch Curtis2020-08-241-0/+1
| | | | | | | | It's QtQuickTest, not QQuickTest. Pick-to: 5.15 Change-Id: Ic28d11814bdbc5a3de61235205617878250ea0e9 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Read tests from qmltest fileMichal Klocek2020-08-131-3/+27
| | | | | | Change-Id: I3550d20aac165539b97247d71e488fb3da30e48c Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Make QtQuickTest snippets compilableNico Vertriest2020-06-296-14/+71
| | | | | | | Task-number: QTBUG-81495 Change-Id: I9e57ac2a22cea9d35847145842a7e822fd1c4c30 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Port QtDeclarative from QStringRef to QStringViewKarsten Heimrich2020-06-161-1/+1
| | | | | | | | Task-number: QTBUG-84319 Change-Id: I2dcfb8a2db98282c7a1acdad1e6f4f949f26df15 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Remove winrtOliver Wolff2020-06-041-1/+1
| | | | | | | | | Task-number: QTBUG-84434 Change-Id: If8f57f00726868a3540c877d07fca761618e4f08 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* CMake: Regenerate qtdeclarative/srcAlexandru Croitor2020-05-292-1/+2
| | | | | | | | | | Includes - renaming of internal plugin api call - generation of QT_QMLTYPES_FILENAME - addition of a few TARGET_DESCRIPTION Change-Id: I72b5647b8c16af9945795ead62a075322b6bb2f6 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Fix qmltypes file names for qmltypes built from librariesUlf Hermann2020-05-191-0/+1
| | | | | | | We still expect those to be called "plugins.qmltypes" in a few places. Change-Id: I751b2bb9ca264fb7998d11c2f969ee46b32fb2cb Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Fix building Qt.test.qtestroot qmltypes with cmakeUlf Hermann2020-04-152-2/+52
| | | | | Change-Id: I94c08d3dbda94552437ae5c22278b0a57e0b96d9 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-04-094-52/+130
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/jsruntime/qv4executablecompilationunit.cpp src/qml/jsruntime/qv4executablecompilationunit_p.h src/qml/qml/qqmlobjectcreator.cpp src/qml/qml/qqmlpropertycachecreator_p.h src/qml/qml/qqmltypecompiler.cpp src/qml/qml/qqmltypedata.cpp tests/auto/qml/qmlformat/tst_qmlformat.cpp tools/qmllint/scopetree.cpp src/qml/qml/qqmlapplicationengine_p.h Adjusted tools/qmllint/findunqualified.cpp to use newer API Change-Id: Ibfb4678ca39d626d47527265e3c96e43313873d4
| * Add qmltypes for Qt.test.qtestrootUlf Hermann2020-04-064-52/+130
| | | | | | | | | | | | | | Somehow this was missed when moving to static type registration. Change-Id: I33f0567449f7bce62b0cb71b9d4f0862ed801e59 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
| * QML: Avoid cyclic references between ResolvedTypeRefence and CUUlf Hermann2020-03-251-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | The compilation unit keeps a list of references to used types. Usually those are references to types in other compilation units. However, in the case of inline components they can be references to the same compilation unit. In that case we should not addref() the compilation unit, as that forms a cyclic reference. Fixes: QTBUG-82768 Change-Id: I29d28f3a4780aad4fabd4aa2ed02ca0d0108987e Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Encapsulate QV4::ResolvedTypeReferenceUlf Hermann2020-03-251-6/+6
| | | | | | | | | | | | | | It's used all over the place. We need a proper interface. Change-Id: Iebe254ef3bf35503bf3fdd3639979a5db2b3449e Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* | Merge remote-tracking branch 'origin/dev' into wip/cmakeAlexandru Croitor2020-03-123-5/+4
|\ \ | | | | | | | | | | | | | | | | | | | | | Conflicts: dependencies.yaml src/qml/qml/qqmlengine.cpp Change-Id: I6a73fd1064286f4a2232de85c2ce7f80452d4641
| * | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-03-091-1/+0
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/compiler/qqmlirbuilder_p.h src/qml/qml/qqmlpropertycachecreator_p.h src/qmltyperegistrar/qmltypesclassdescription.cpp src/qmltyperegistrar/qmltypesclassdescription.h src/qmltyperegistrar/qmltypescreator.cpp src/quick/items/qquicktext_p.h src/quick/util/qquickvaluetypes_p.h Change-Id: Ic209741592e7b85820bf3845722023a190ebc1c5
| | * Move dependencies.json files into the right placesUlf Hermann2020-02-261-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | The workerscript and models qmltypes are built from the library directory, the testlib qmltypes are built from the plugin directory. Change-Id: Ifc497aaf8204616ca817ee08ad86383ab2cbbdae Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
| * | Add major version to all Q_REVISIONsUlf Hermann2020-02-191-3/+3
| | | | | | | | | | | | | | | Change-Id: Id72fbe10c16de61bd847773d0055d83cfe03f63c Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
| * | Quick: Don't qualify OpenGL includes (part two)Johan Klokkhammer Helsing2020-02-181-1/+1
| |/ | | | | | | | | | | | | | | | | | | | | | | 406f15ce0e only removed the "QtGui" prefix from some includes, but we are trying to move (almost) everything OpenGL related from QtGui. This removes prefixes for additional QOpenGL includes (QOpenGLShaderProgram, versioned opengl functions etc.). Task-number: QTBUG-74409 Change-Id: I91e1feac0676859f11de9b75301a0a4e81db50d9 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Regenerate projects to handle private deps correctlyAlexandru Croitor2020-02-052-0/+4
| | | | | | | | | | | | Change-Id: Ifcbab0407e93dfc35d0459d7d29dee2cd3508a86 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Merge remote-tracking branch 'origin/dev' into wip/cmakeAlexandru Croitor2020-01-291-13/+13
|\| | | | | | | | | | | | | Conflicts: dependencies.yaml Change-Id: Ie3e9dc62031a85e5e81cbdf04694b95159d49fca
| * Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-01-231-7/+7
| |\ | | | | | | | | | Change-Id: I88e94fe3398a59f10c5a8b142204db5f3ccb2657
| | * Fix printing of garbled UTF-8 characters from QML verify() statementsDimitrios Apostolou2020-01-201-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Messages that contain QtPositioning.coordinate are including the degree unicode symbol U+00B0. These were printed as garbage from QML tests that use the verify() function. This was caused by the message argument being encoded using toLatin1() on its conversion to const char *. This caused both garbled text and invalid XML output in the test runs, which in turn was causing coin's agent to fail while deserialising the test XML log. This was fixed by changing from toLatin1() to toUtf8(). Since testlib is receiving plain const char * arguments for the "description" argument, it was deemed correct to standardize on UTF-8 as the proper encoding for it, to avoid losing any information (QTBUG-81474). When it's output to the console it can be re-encoded depending on the system's locale, of course. Task-number: QTBUG-81474 Fixes: QTBUG-80527 Change-Id: I0f1fdb7d414d9dfd30d4638b00088c9502c339bd Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| * | Replace QVariant::type with QVariant::userTypeOlivier Goffart2020-01-171-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | as type is going to be deprecated. This change was done automatically with the help of clazy. In addition, ColumnRoleMetadata was changed to take an int instead of a QVariant::Type Change-Id: Ibc02d7b52e7d931a56c19fdebc4788b5e6df2a39 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Post merge fixesLeander Beernaert2020-01-242-6/+2
| | | | | | | | | | | | | | | Change-Id: Ie8aca222809f35174fb6c6488832ec3ff5432272 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | | Merge remote-tracking branch 'origin/dev' into wip/cmakeLeander Beernaert2020-01-167-811/+5
|\| | | | | | | | | | | Change-Id: I0c5b939c70bdb91ccdf7068784308416dcaa5736
| * | Generate registrations for all importsUlf Hermann2020-01-107-811/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that we can generate all QML type information at build time, we should also use it. Move the types for QtTest into the testlib import plugin. They don't need to be exported from QtQuickTest. Trigger the resource initialization of the shapes library from the plugin so that we retain a dependency and the linker doesn't optimize the module initialization away. Change-Id: Icc8cb338aa03ef1e3085e29356a5db7b73ba0a01 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
| * | Avoid initializing QFlags with 0 or nullptr in further casesFriedemann Kleint2019-11-251-1/+1
| | | | | | | | | | | | | | | | | | | | | Amends 744e77b841878fb017c0f2d60607090008f28180. Change-Id: I16e37aaf503eb62f67fca0e48be4c92c4a72ae46 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | | Merge remote-tracking branch 'origin/dev' into wip/cmakeLeander Beernaert2019-11-251-0/+2
|\| | | | | | | | | | | Change-Id: I48b9c2e4f3a75c18470c55f73f2089dc1401de54
| * | Handle -no-feature-shortcutFriedemann Kleint2019-10-181-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Preparing for the extraction of QGuiShortcut, the shortcut feature will changed to follow the convention of using QT_REQUIRE_CONFIG(shortcut) in the affected class headers. Add the required exclusions to prevent compile errors when disabling shortcuts. Task-number: QTBUG-76493 Change-Id: Icad95584ae12aa97a56b56ef27206cef1b1ba48f Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | | Regenerate all projects with new CMake API versionAlexandru Croitor2019-11-152-8/+8
| | | | | | | | | | | | | | | | | | Change-Id: Ie0db35f674137c229eaf049616f38f8e818f7092 Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Regenerate projectsAlexandru Croitor2019-11-142-2/+0
| | | | | | | | | | | | | | | | | | Change-Id: I38044c382e4d84b5865a19cdd04cc8922bd72a77 Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Regenerate required projects after dev -> wip/cmake mergeAlexandru Croitor2019-10-142-0/+2
| | | | | | | | | | | | | | | Change-Id: Ic5f1909731ec11b4fb6bc8823506d272c529ecfb Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Merge remote-tracking branch 'origin/dev' into wip/cmakeAlexandru Croitor2019-10-145-1/+210
|\| | | | | | | | | | | | | | | | | | | | Removed dependencies.yaml because we don't use it yet in wip/cmake. Fixed conflict in qmlcachegen.cpp. Change-Id: Ie1060c737bee1daa85779903598e5b6d5020d922
| * | Avoid compile warning in QuickTestUtilUlf Hermann2019-10-111-1/+1
| | | | | | | | | | | | | | | | | | Change-Id: I351048c85ca5e0416aae6f514953d04277252857 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
| * | Move QuickTestUtil into qmltestUlf Hermann2019-09-273-1/+204
| | | | | | | | | | | | | | | | | | | | | | | | This way we can provide a header for it and use it for automatic type registration. Change-Id: Ic78e63ff071a75fac051ae35dfc1ea150079bcb0 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * | Specify parameters of type registration in class declarationsUlf Hermann2019-09-262-0/+6
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using this technique we can automatically register all necessary revisions and minor versions of a type, using the metaobject system. This greatly reduces the potential for mistakes and resulting incompatibilities between versions of imports. We assume that for each type we need to register all revisions of its super types and its attached type, and that the revisions match. That is, if you import version X of type A, you will also get version X of its attached type and of any super types. As we previously didn't take these dependencies into account when manually registering the types, a number of extra revisions are now registered for some types. Potentially, we can now generate the qmltypes files at compile time, using moc. Change-Id: I7abb8a5c39f5e63ad1a0cb41a783f2c91909491b Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/wip/qt6' into wip/cmakeAlexandru Croitor2019-10-111-1/+2
|\| | | | | | | Change-Id: I4a91928610f79c8e21a05781953ffa41508c828a
| * Remove usages of deprecated APIs of QWheelEventSona Kurazyan2019-08-231-1/+2
| | | | | | | | | | | | Task-number: QTBUG-76491 Change-Id: I69b0c4ec7c03f9421b18828516e064eff2b45518 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | Regenerate qtdeclarative before mergeAlexandru Croitor2019-10-112-5/+60
| | | | | | | | | | | | Change-Id: I5710110679220c4e22bc7f8b540f18a51b735ddf Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Qt CMake Build Bot
* | Prospective Windows build fix, part 2Simon Hausmann2019-09-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Revert commit 88f90868f7ba128011883ae3884cb9652708d385 and instead fix the discrepancy between the target name (which results in QT_BUILD_${target}_LIB) and the expected macro name for DLL exports/imports (QT_BUILD_QMLTEST_NAME) the same way as fixed in qtbase/src/testlib/CMakeLists.txt as per commit e9c45bbdddd4df005bdaa5eea9740d351e6eaea2 in qtbase, using an explicit define. Change-Id: I710f48dbf089de661e765258fed1171f422ed6f8 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>