aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2017-12-11 15:51:18 +0100
committerUlf Hermann <ulf.hermann@qt.io>2017-12-11 16:09:53 +0000
commit6015c5554fa11583be27f1835baa284801dcb75b (patch)
treeb2da570ad15dfffb03ac964d8d66c9ff9e289b39 /tests
parente7710b211cb08b3d975f7d8add6bedaf25d60c4d (diff)
Add the source directory as import paths in tst_qqmlimport
On shadow builds the QML components won't be found in the build directory. Change-Id: I0f524063537669f68e64fc6c04a6756ed1d130fd Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'tests')
-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());