diff options
Diffstat (limited to 'tests/auto/qml/qqmlengine/tst_qqmlengine.cpp')
-rw-r--r-- | tests/auto/qml/qqmlengine/tst_qqmlengine.cpp | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/tests/auto/qml/qqmlengine/tst_qqmlengine.cpp b/tests/auto/qml/qqmlengine/tst_qqmlengine.cpp index ab4c083b65..0081243a88 100644 --- a/tests/auto/qml/qqmlengine/tst_qqmlengine.cpp +++ b/tests/auto/qml/qqmlengine/tst_qqmlengine.cpp @@ -687,9 +687,9 @@ void tst_qqmlengine::qtqmlModule_data() << QString(testFileUrl("qtqmlModule.3.qml").toString() + QLatin1String(":1 module \"QtQml\" version 1.0 is not installed\n")) << QStringList(); - QTest::newRow("import QtQml of incorrect version (2.50)") + QTest::newRow("import QtQml of old version (2.50)") << testFileUrl("qtqmlModule.4.qml") - << QString(testFileUrl("qtqmlModule.4.qml").toString() + QLatin1String(":1 module \"QtQml\" version 2.50 is not installed\n")) + << QString() << QStringList(); QTest::newRow("QtQml 2.0 module provides Component, QtObject, Connections, Binding and Timer") @@ -716,6 +716,11 @@ void tst_qqmlengine::qtqmlModule_data() << testFileUrl("qtqmlModule.9.qml") << QString(testFileUrl("qtqmlModule.9.qml").toString() + QLatin1String(":4 Item is not a type\n")) << QStringList(); + + QTest::newRow("import QtQml of incorrect version (6.50)") + << testFileUrl("qtqmlModule.10.qml") + << QString(testFileUrl("qtqmlModule.10.qml").toString() + QLatin1String(":1 module \"QtQml\" version 6.50 is not installed\n")) + << QStringList(); } // Test that the engine registers the QtQml module @@ -997,6 +1002,11 @@ public: SomeQObjectClass() : QObject(nullptr){} }; +class Dayfly : public QObject +{ + Q_OBJECT +}; + void tst_qqmlengine::singletonInstance() { QQmlEngine engine; @@ -1115,7 +1125,7 @@ void tst_qqmlengine::singletonInstance() { // deleted object - auto dayfly = new QObject{}; + auto dayfly = new Dayfly{}; auto id = qmlRegisterSingletonInstance("Vanity", 1, 0, "Dayfly", dayfly); delete dayfly; QTest::ignoreMessage(QtMsgType::QtWarningMsg, "<Unknown File>: The registered singleton has already been deleted. Ensure that it outlives the engine."); |