aboutsummaryrefslogtreecommitdiffstats
path: root/src/qmltest/quicktest.cpp
Commit message (Collapse)AuthorAgeFilesLines
* quick_test_main_with_setup: only activate windows where supportedMitch Curtis2024-05-151-4/+8
| | | | | | | | | | | | | | | | Otherwise we get warnings before initTestCase, meaning not even failOnWarning can catch them: "qWaitForWindowActive was called on a platform that doesn't support window activation. This means there is an error in the test and it should either check for the WindowActivation platform capability before calling qWaitForWindowActivate, use qWaitForWindowExposed instead, or skip the test. Falling back to qWaitForWindowExposed." Task-number: QTBUG-124230 Pick-to: 6.5 6.7 Change-Id: I8111928917b94d51ac9b94f470f5837a98f44a71 Reviewed-by: Doris Verria <doris.verria@qt.io>
* Qt Quick Test: print backtraces for crashesMitch Curtis2024-04-171-0/+6
| | | | | | | | Just as QTest does for non-Qt Quick tests. Fixes: QTQAINFRA-6146 Change-Id: If897f80a6303e0fcf35c9ed42f4f7c4df263a130 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* quicktest: Workaround for spurious ambiguity issue on IntegrityFabian Kosmale2024-04-171-3/+3
| | | | | | | | | Explicitly qualify the type with its namespace to remove potential sources for ambiguity. Fixes: QTBUG-124229 Change-Id: I967be64e0ce46557478707e3bdf50faed9c2bd23 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Revert "Adapt layouts to take advantage of new size policy information"Santhosh Kumar2024-02-291-1/+0
| | | | | | | | | | | | | This reverts commit dd72694b6046d98a64bd99361ed9cb4613af78f8. Reason for revert: This is needed in order to rename AA_QtQuickDontUseDefaultSizePolicy to AA_QtQuickUseDefaultSizePolicy in qtbase Change-Id: I41d34682fed794cc3594f967b0e58892107b3a33 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Adapt layouts to take advantage of new size policy informationSanthosh Kumar2024-02-221-0/+1
| | | | | | | | | | | | | | The size policy been defined for QQuickItem and its subclasses (as part of task QTBUG-117597). This commit adds code so that Qt Quick Layouts will effectively use them. It also have an opt-out code path by testing for QGuiApplication::testAttribute(Qt::AA_QtQuickDontUseDefaultSizePolicy) Task-number: QTBUG-117597 Pick-to: 6.7 Change-Id: I624509a77a870d72a5c4ce96505516bf30801559 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* QtQml: Use CompiledData::CompilationUnit in more placesUlf Hermann2024-01-201-3/+4
| | | | | | | | | | We rarely actually need the executable CU, and where we need it, we can dynamically create or retrieve it from the engine. To that end, store all the CUs in the same container in the engine. Change-Id: I0b786048c578ac4f41ae4aee601da850fa400f2e Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QtQml: Move type name cache into base CUUlf Hermann2024-01-181-1/+1
| | | | | Change-Id: Ie3504f16b34859cdef72f8138e6058dcc2d1f58f Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QtQml: Move ResolvedTypeReference into base CUUlf Hermann2024-01-131-2/+2
| | | | | Change-Id: I25063457aad3a6d29a8c2a5b236f9a51b56a2f51 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QtQml: Remove QQmlTypeLoader from QQmlImportUlf Hermann2024-01-111-2/+4
| | | | | | | | | The type loader belongs to the engine and we must not store it in engine-independent data structures. We do want the import cache to be stored in the type registry, though (in a separate change). Change-Id: I2828f5098b27bf1fc96852fc2bd160db44b109e7 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Rewrite QuickTests's qWaitForSignalMårten Nordheim2023-11-061-12/+36
| | | | | | | | | | | | | | | | | | | | It doesn't use any of the features of QSignalSpy, so it hasn't done it any favors. On top of that QSignalSpy connects with DirectConnection which means that frequently emitted signals on another thread may end up trying to append another signal emission to its internal list during destruction of the signal spy, leading to use-after-free. The new implementation uses a small class with a slot that just sets a boolean. We use AutoConnection so it is thread safe, and pending emissions go away when the object is destroyed. Fixes: QTBUG-118744 Fixes: QTBUG-118163 Pick-to: 6.6 6.5 Change-Id: Ib2ccce2369a681bfe9a2e04d2c091f9690edee49 Reviewed-by: Dimitrios Apostolou <jimis@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Document that running a Quick Test always show a windowVolker Hilsheimer2023-04-181-32/+26
| | | | | | | | | | | | | | | | | | | | | | After 47490648b14938049ddf84c3f665619c1117241c, test functions are executed asynchronously through a scheduler. This makes the entire logic for detecting whether a test case completed during setSource() obsolete, and always results in a window being shown. That is as such fine, Qt Quick Test always required the GUI and Quick specific Qt modules and platform plugins to be available (so it wasn't easily possible to run those tests on a server without any display infrastructure). But we can now remove the logic from the startup function. Add a note to the documentation that running tests always shows a UI, and how to avoid it using the offscreen platform plugin. Pick-to: 6.5 Fixes: QTBUG-110592 Change-Id: Ie69b04e3fd4044db2fc7f0fc3ca44947a3dddfce Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QmlTest: Move declaration of helper qWaitForSignal() to a headerFriedemann Kleint2023-02-101-1/+1
| | | | | | | | | | Otherwise, the default parameter declaration causes a clash in CMake Unity (Jumbo) builds. Pick-to: 6.5 Task-number: QTBUG-109394 Change-Id: Ida72b30debfa97b6fc2e523b19ef219425c2a0c2 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Port from qAsConst() to std::as_const()Marc Mutz2022-10-071-4/+4
| | | | | | | | | | | | | | We've been requiring C++17 since Qt 6.0, and our qAsConst use finally starts to bother us (QTBUG-99313), so time to port away from it now. Since qAsConst has exactly the same semantics as std::as_const (down to rvalue treatment, constexpr'ness and noexcept'ness), there's really nothing more to it than a global search-and-replace. Task-number: QTBUG-99313 Change-Id: I601bf70f020f511019ed28731ba53b14b765dbf0 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Port from container::count() and length() to size()Marc Mutz2022-10-071-3/+3
| | | | | | | | | | | | | | | | | | | | 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>
* qmltest: use variadic templates instead of QGenericArgumentThiago Macieira2022-07-181-2/+3
| | | | | Change-Id: I36b24183fbd041179f2ffffd170267647be37c52 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Use SPDX license identifiersLucie Gérard2022-06-111-38/+2
| | | | | | | | | | | | 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>
* TestCase: add API for checking for polish at window levelMitch Curtis2022-06-061-0/+6
| | | | | | | | | | | | | | | | | | These were introduced to the C++ QQuickTest namespace in 36c6c1ea57ad503a2f42fe81a12d1254fcd38cca. QML-only tests should also have access to them. [ChangeLog][QtQuickTest][TestCase] Added waitForPolish() and made isPolishScheduled() also take a Window, making it possible to verify that updatePolish() was called on one or more items managed by a window. [ChangeLog][QtQuickTest][TestCase] Deprecated waitForItemPolished(). Use the new waitForPolish() function instead. Task-number: QTBUG-93757 Change-Id: Ie53389c2d49e096ebf382b902714c9dd4c8d5685 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* QtQuickTest: add API for checking for polish at window levelMitch Curtis2022-06-021-0/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a qIsPolishScheduled(QQuickWindow *) overload of qIsPolishScheduled(QQuickItem *) (added in 40d6072bc8a4df0fe1a16025fe30fe653463a446) and deprecates qWaitForItemPolished() (added in 7a3cad0619662b992154e075ec6b840bfc8a46a7) in favor of qWaitForPolish(), which has QQuickItem* and QQuickWindow* overloads. The existing functions that take QQuickItem are useful, but testing Qt Quick applications can be made even easier by allowing users to check if a window has any items that need to be polished. This information is already present (in QQuickWindowPrivate::itemsToPolish), so it's very efficient to check for. This is especially useful now that Qt Quick Layouts using polishing for their layouting, for example, as it's no longer necessary to find individual polishable items in complex hierarchies before proceeding to interact with child items. [ChangeLog][QtQuickTest][QQuickTest] Added QQuickTest::qIsPolishScheduled(QQuickWindow *) and QQuickTest::qWaitForPolish(QQuickWindow *) functions for verifying that updatePolish() was called on one or more items managed by a window. [ChangeLog][QtQuickTest][QQuickTest] Deprecated QQuickTest::qWaitForItemPolished(QQuickItem *). Use the new QQuickTest::qWaitForPolish(QQuickItem *) function instead. Fixes: QTBUG-93757 Change-Id: I95b6e051b3c9fd2fa93604f4d9ccda486bb29f9d Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* QML: Port QV4::CompiledData::Binding to new special integer bitfieldUlf Hermann2022-05-111-2/+2
| | | | | | | Pick-to: 5.15 6.2 6.3 Task-number: QTBUG-99545 Change-Id: I9f8bc5fa45c61f77ee95b055a3d8de001da8f8c5 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QML: Port QV4::CompiledData::Location to new special integer bitfieldUlf Hermann2022-05-111-2/+2
| | | | | | | | Pick-to: 5.15 6.2 6.3 Task-number: QTBUG-99545 Change-Id: If0d6f893f2351a4146ddf125be4079b5e312f308 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
* QML: Port QV4::CompiledData::Object to new special integer bitfieldUlf Hermann2022-05-111-1/+1
| | | | | | | | Pick-to: 5.15 6.2 6.3 Task-number: QTBUG-99545 Change-Id: Ia57a16313e883a8d4dab15c971181440ed1d2214 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
* QuickTest: includemocsMarc Mutz2022-04-291-0/+2
| | | | | | | | | | | 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: Ic8d138526724734169ff7f0686ad19d30c729307 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* INTEGRITY: Fix some test cases from core/qml foldersKimmo Ollila2022-03-031-1/+1
| | | | | | | | | | | | | -Add dummy_imports.qml to TESTDATA -Let qmlimportscanner handle plugin import -Skip cases that depend on mounted filesystem Task-number: QTBUG-99123 Pick-to: 6.3 6.2 Change-Id: I99e21e423f2114c4c4ee1e24bdf9bb85af51baf7 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io> Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* QuickTest: Do not leak when returning an errorUlf Hermann2021-11-091-11/+14
| | | | | | | | | | | Avoid exit(), and wrap the application into a QScopedPointer. Also, handle errors while enumerating test cases the same way as errors while creating the QQuickView. Change-Id: I0dd147a16d3ea60147e15627295d7eb82630e59d Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* 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 Pick-to: 5.15 6.0 Change-Id: I7e133d62c4f62fc46e9bd3999ff755f7ded3c386 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Drop widgets dependency from quicktestUlf Hermann2021-02-011-30/+2
| | | | | | | | | | | | | It was introduced for QtQuick.Controls 1 back when it was still called QtDesktopComponents. QtQuick.Controls 1 is deprecated and also doesn't use the widgets mode anymore. I can't think of any other use for it, but loading QtWidgets produces a number of unwelcome side effects in the tests. Change-Id: I4b7e53a9b906c428d84926302bf629b826d900c4 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Merge the QtTest and Qt.test.qtestroot QML modulesUlf Hermann2021-01-121-11/+1
| | | | | | | | | | There is no point in having them separate and this way the plugin can be optional. Fixes: QTBUG-89804 Change-Id: Ic7de35f6ee7abde4840841e17d21c2b709f6db7d Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@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>
* 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>
* 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>
* Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-04-091-51/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-061-51/+2
| | | | | | | | | | | | | | 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>
* | 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>
* Port from QLatin1Literal to QLatin1StringGiuseppe D'Angelo2019-06-111-4/+4
| | | | | | | | QLatin1Literal is an undocumented and deprecated typedef for QLatin1String, just use the original. Change-Id: Ib6e2b7ac369be12aed0e455c91cf31b807eae4ed Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix deprecation warnings in 5.14Friedemann Kleint2019-05-291-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Libraries: scenegraph/util/qsgdepthstencilbuffer.cpp:186:57: warning: 'T* QWeakPointer<T>::data() const [with T = QSGDepthStencilBuffer]' is deprecated: Use toStrongRef() instead, and data() on the returned QSharedPointer [-Wdeprecated-declarations] scenegraph/qsgdefaultcontext.cpp:163:89: warning: 'QList<T> QSet<T>::toList() const [with T = QByteArray]' is deprecated: Use values() instead. [-Wdeprecated-declarations] util/qquickpath.cpp:573:40: warning: 'QList<T> QSet<T>::toList() const [with T = QString]' is deprecated: Use values() instead. [-Wdeprecated-declarations] util/qquickpath.cpp:606:29: warning: 'QList<T> QSet<T>::toList() const [with T = QString]' is deprecated: Use values() instead. [-Wdeprecated-declarations] quicktest.cpp:562:73: warning: 'QSet<T> QList<T>::toSet() const [with T = QString]' is deprecated: Use QSet<T>(list.begin(), list.end()) instead. [-Wdeprecated-declarations] quicktest.cpp:604:77: warning: 'QSet<T> QList<T>::toSet() const [with T = QString]' is deprecated: Use QSet<T>(list.begin(), list.end()) instead. [-Wdeprecated-declarations] qquickitemparticle.cpp:233:49: warning: 'static QSet<T> QSet<T>::fromList(const QList<T>&) [with T = QQuickItem*]' is deprecated: Use QSet<T>(list.begin(), list.end()) instead. [-Wdeprecated-declarations] qquickitemparticle.cpp:239:37: warning: 'QList<T> QSet<T>::toList() const [with T = QQuickItem*]' is deprecated: Use values() instead. [-Wdeprecated-declarations] Tests: tst_propertyrequirements.cpp:123:58: warning: 'QList<T> QSet<T>::toList() const [with T = QString]' is deprecated: Use values() instead. [-Wdeprecated-declarations] tst_propertyrequirements.cpp:161:40: warning: 'static QSet<T> QSet<T>::fromList(const QList<T>&) [with T = QString]' is deprecated: Use QSet<T>(list.begin(), list.end()) instead. [-Wdeprecated-declarations] tst_propertyrequirements.cpp:161:77: warning: 'static QSet<T> QSet<T>::fromList(const QList<T>&) [with T = QString]' is deprecated: Use QSet<T>(list.begin(), list.end()) instead. [-Wdeprecated-declarations] /data1/frkleint/qt-dev/qtbase/include/QtCore/../../src/corelib/tools/qset.h:400:23: warning: 'QSet<T> QList<T>::toSet() const [with T = QString]' is deprecated: Use QSet<T>(list.begin(), list.end()) instead. [-Wdeprecated-declarations] ../shared/viewtestutil.cpp:331:26: warning: 'QSet<T> QList<T>::toSet() const [with T = int]' is deprecated: Use QSet<T>(list.begin(), list.end()) instead. [-Wdeprecated-declarations] ... tst_qmldiskcache.cpp:651:81: warning: 'QSet<T> QList<T>::toSet() const [with T = QString]' is deprecated: Use QSet<T>(list.begin(), list.end()) instead. [-Wdeprecated-declarations] tst_qmldiskcache.cpp:663:81: warning: 'QSet<T> QList<T>::toSet() const [with T = QString]' is deprecated: Use QSet<T>(list.begin(), list.end()) instead. [-Wdeprecated-declarations] tst_qmldiskcache.cpp:693:85: warning: 'QSet<T> QList<T>::toSet() const [with T = QString]' is deprecated: Use QSet<T>(list.begin(), list.end()) instead. [-Wdeprecated-declarations] tst_qmldiskcache.cpp:918:81: warning: 'QSet<T> QList<T>::toSet() const [with T = QString]' is deprecated: Use QSet<T>(list.begin(), list.end()) instead. [-Wdeprecated-declarations] tst_qmldiskcache.cpp:940:69: warning: 'QSet<T> QList<T>::toSet() const [with T = QString]' is deprecated: Use QSet<T>(list.begin(), list.end()) instead. [-Wdeprecated-declarations] tst_qquickgridview.cpp:6437:70: warning: 'QSet<T> QList<T>::toSet() const [with T = int]' is deprecated: Use QSet<T>(list.begin(), list.end()) instead. [-Wdeprecated-declarations] tst_qquickgridview.cpp:6438:46: warning: 'QSet<T> QList<T>::toSet() const [with T = int]' is deprecated: Use QSet<T>(list.begin(), list.end()) instead. [-Wdeprecated-declarations] tst_qquickgridview.cpp:6440:66: warning: 'QSet<T> QList<T>::toSet() const [with T = int]' is deprecated: Use QSet<T>(list.begin(), list.end()) instead. [-Wdeprecated-declarations] tst_qquicktableview.cpp:53:20: warning: 'kTableViewPropName' defined but not used [-Wunused-variable] tst_qquicklistview.cpp:7269:70: warning: 'QSet<T> QList<T>::toSet() const [with T = int]' is deprecated: Use QSet<T>(list.begin(), list.end()) instead. [-Wdeprecated-declarations] tst_qquicklistview.cpp:7270:46: warning: 'QSet<T> QList<T>::toSet() const [with T = int]' is deprecated: Use QSet<T>(list.begin(), list.end()) instead. [-Wdeprecated-declarations] tst_qquicklistview.cpp:7272:66: warning: 'QSet<T> QList<T>::toSet() const [with T = int]' is deprecated: Use QSet<T>(list.begin(), list.end()) instead. [-Wdeprecated-declarations] tst_qquickpositioners.cpp:4033:70: warning: 'QSet<T> QList<T>::toSet() const [with T = int]' is deprecated: Use QSet<T>(list.begin(), list.end()) instead. [-Wdeprecated-declarations] tst_qquickpositioners.cpp:4034:46: warning: 'QSet<T> QList<T>::toSet() const [with T = int]' is deprecated: Use QSet<T>(list.begin(), list.end()) instead. [-Wdeprecated-declarations] tst_qquickpositioners.cpp:4036:66: warning: 'QSet<T> QList<T>::toSet() const [with T = int]' is deprecated: Use QSet<T>(list.begin(), list.end()) instead. [-Wdeprecated-declarations] Change-Id: I9a177f83f07ae5162f7cc231a8c164ba32ffa5bc Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Split CompiledData::CompilationUnit in twoUlf Hermann2019-05-161-3/+8
| | | | | | | | We need a CompilationUnit that only holds the data needed for compilation and another one that is executable by the runtime. Change-Id: I704d859ba028576a18460f5e3a59f210f64535d3 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-03-251-5/+7
|\ | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/qmltest/quicktest.cpp tests/auto/qml/qmlcachegen/qmlcachegen.pro Change-Id: I70e96e8817d59647f876b8b77b30cdeede8f0662
| * Don't warn if invokable test setup function doesn't existMitch Curtis2019-03-211-9/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This was never the intention (as the code comments imply), but it was never tested. This is a cherry-pick of 50f234df500829a0023ed5d396c486f995ad71ef because it went to dev (5.13) when it should have originally went to 5.12. Change-Id: I8df0b3702129b1f1d086df73117d3ddb721317cb Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io> (cherry picked from commit 50f234df500829a0023ed5d396c486f995ad71ef) Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| * QUICK_TEST_MAIN_WITH_SETUP: fix qmlEngineAvailable() being called too lateMitch Curtis2019-03-211-8/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When I added the macro, I wasn't aware that TestCaseCollector was a thing. TestCaseCollector loads each QML file without running the tests (i.e. creates a QQmlComponent from the file without creating an object from that component). Since it still executes imports, the test can fail if types are registered or import paths added in qmlEngineAvailable(), since it's called too late. So, call it earlier. This should have no adverse effect on user code, as nothing of importance to the user will be skipped, and the documentation already details what can be expected by the time qmlEngineAvailable() is called. Change-Id: Ibd3a4b728bc87b90f89cc310fddf668c5879ad83 Fixes: QTBUG-74160 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-02-141-1/+5
|\| | | | | | | Change-Id: I2842f4a8096c4555e29f08e65b88b77b841441cb
| * Defer QML testing until event loop has startedTor Arne Vestbø2019-02-121-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | Executing the event loop means we get various things set up properly, such as runloop auto-release pools on macOS. If not, the whole test suite will be run as a result of the setWindowShown call. Change-Id: Ie217d803208134c5be7db0ee04fbfab86702b521 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2019-01-101-1/+1
|\| | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I6b2539bf17d3e9bc66d96b53c1bce95680113ed8
| * quicktest: winrt: Use qml files from resource system by defaultOliver Wolff2019-01-101-1/+1
| | | | | | | | | | | | | | | | Similar to how it is done for Android, winrt should use qml files from qrc by default. Change-Id: I4cd0def2467f764155302fccc393c355907be744 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Doc: Fix Qt Quick Test documentationMitch Curtis2018-12-141-9/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Add qtquicktest-cppapi.qdoc for the C++ API landing page. - Add qtquicktest.qdoc for the QQuickTest namespace. - Add qtquicktest-qmltypes.qdoc for the QML types landing page. - Add ../../imports/testlib to the sourcedirs variable so that the QML files can be found. - Add a "Reference" section to qtquicktest-index.qdoc that has links to the QML and C++ pages. - Add more targets so that we can reliably link to them while keeping the nice short section names. - Fix minor issues in existing documentation. - Link to the QML API docs from the C++ API docs. Change-Id: I5fc3c90105b095d9ea84c3f76e6c7ba0a47c2695 Reviewed-by: Topi Reiniö <topi.reinio@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | Don't warn if invokable test setup function doesn't existMitch Curtis2018-12-101-13/+21
| | | | | | | | | | | | | | | | This was never the intention (as the code comments imply), but it was never tested. Change-Id: I8df0b3702129b1f1d086df73117d3ddb721317cb Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* | Doc: fix \relates command for qIsPolishScheduled()Mitch Curtis2018-12-071-1/+1
| | | | | | | | | | | | Change-Id: Ifa59cae9fd682e9884b40cd0be0da59f5e725ffd Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | Doc: explain why QQuickTest::qIsPolishScheduled() is usefulMitch Curtis2018-10-311-0/+18
| | | | | | | | | | Change-Id: I2df4b18b46f9b532e956a64e4be656a338de7a22 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>