aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlimport
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2017-09-20 11:47:49 +0200
committerUlf Hermann <ulf.hermann@qt.io>2017-09-20 10:07:23 +0000
commit4b286a2975d37700c7e500c61516f01b63e04b01 (patch)
treeb87749ecf1edb7f94f3acf3539e5a32e39b28052 /tests/auto/qml/qqmlimport
parent40d0ddaa8357ba4955c85178b5b34a28bec4fd71 (diff)
In tst_qqmlimport, import from the source directory
The imports are all QML, not C++ plugins. They don't get built and cannot be found in the build directory if that is different from the source directory. Change-Id: Ib922908746932ff5e18a1a16921b99189c12cd61 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'tests/auto/qml/qqmlimport')
-rw-r--r--tests/auto/qml/qqmlimport/tst_qqmlimport.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/auto/qml/qqmlimport/tst_qqmlimport.cpp b/tests/auto/qml/qqmlimport/tst_qqmlimport.cpp
index 68739886c4..70aaa9678e 100644
--- a/tests/auto/qml/qqmlimport/tst_qqmlimport.cpp
+++ b/tests/auto/qml/qqmlimport/tst_qqmlimport.cpp
@@ -54,7 +54,7 @@ void tst_QQmlImport::cleanup()
void tst_QQmlImport::testDesignerSupported()
{
QQuickView *window = new QQuickView();
- window->engine()->addImportPath(QT_TESTCASE_BUILDDIR);
+ window->engine()->addImportPath(directory());
window->setSource(testFileUrl("testfile_supported.qml"));
QVERIFY(window->errors().isEmpty());
@@ -68,7 +68,7 @@ void tst_QQmlImport::testDesignerSupported()
delete window;
window = new QQuickView();
- window->engine()->addImportPath(QT_TESTCASE_BUILDDIR);
+ window->engine()->addImportPath(directory());
window->engine()->clearComponentCache();
window->setSource(testFileUrl("testfile_supported.qml"));
@@ -91,7 +91,7 @@ void tst_QQmlImport::uiFormatLoading()
int size = 0;
QQmlApplicationEngine *test = new QQmlApplicationEngine(testFileUrl("TestForm.ui.qml"));
- test->addImportPath(QT_TESTCASE_BUILDDIR);
+ test->addImportPath(directory());
QCOMPARE(test->rootObjects().size(), ++size);
QVERIFY(test->rootObjects()[size -1]);
QVERIFY(test->rootObjects()[size -1]->property("success").toBool());