aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlimport/tst_qqmlimport.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qml/qqmlimport/tst_qqmlimport.cpp')
-rw-r--r--tests/auto/qml/qqmlimport/tst_qqmlimport.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/tests/auto/qml/qqmlimport/tst_qqmlimport.cpp b/tests/auto/qml/qqmlimport/tst_qqmlimport.cpp
index fdf72b83f0..f52b01cf04 100644
--- a/tests/auto/qml/qqmlimport/tst_qqmlimport.cpp
+++ b/tests/auto/qml/qqmlimport/tst_qqmlimport.cpp
@@ -34,12 +34,15 @@
#include <QtQuick/qquickitem.h>
#include <private/qqmlimport_p.h>
#include <private/qqmlengine_p.h>
-#include "../../shared/util.h"
+#include <QtQuickTestUtils/private/qmlutils_p.h>
class tst_QQmlImport : public QQmlDataTest
{
Q_OBJECT
+public:
+ tst_QQmlImport();
+
private slots:
void importPathOrder();
void testDesignerSupported();
@@ -175,6 +178,11 @@ void tst_QQmlImport::uiFormatLoading()
delete test;
}
+tst_QQmlImport::tst_QQmlImport()
+ : QQmlDataTest(QT_QMLTEST_DATADIR)
+{
+}
+
void tst_QQmlImport::importPathOrder()
{
#ifdef Q_OS_ANDROID
@@ -358,7 +366,9 @@ void tst_QQmlImport::removeDynamicPlugin()
{
// Load something that adds a dynamic plugin
QQmlComponent component(&engine);
- component.setData(QByteArray("import QtTest 1.0; TestResult{}"), QUrl());
+ // Make sure to use something other than QtTest here, since the !plugins.isEmpty()
+ // check will fail if we do.
+ component.setData(QByteArray("import QtQuick.tooling; Property{}"), QUrl());
QVERIFY2(component.isReady(), qPrintable(component.errorString()));
}
QQmlImportDatabase *imports = &QQmlEnginePrivate::get(&engine)->importDatabase;