Do not hardcode Dash plugin path in tests
commit560941b5241503694898a14dc55948bb8dad2992
authorMichał Sawicz <michal.sawicz@canonical.com>
dateThu 30 Apr 2015, 22:45 (11 years ago)
parentd0e93b3
tests/plugins/Dash/CMakeLists.txt−1
@@ -23,7 +23,6 @@ include_directories(
2323remove_definitions(-DQT_NO_KEYWORDS)
2424
2525add_definitions(-DDASHVIEWSTEST_FOLDER="${CMAKE_CURRENT_SOURCE_DIR}")
26−add_definitions(-DBUILT_PLUGINS_DIR="${CMAKE_BINARY_DIR}/plugins")
2726
2827macro(add_lvwph_test FILENAME TESTNAME)
2928 add_executable(${TESTNAME}TestExec
tests/plugins/Dash/cardcreatortest.cpp−1
@@ -35,7 +35,6 @@ private Q_SLOTS:
3535 void init()
3636 {
3737 view = new QQuickView();
38− view->engine()->addImportPath(BUILT_PLUGINS_DIR);
3938 view->setSource(QUrl::fromLocalFile(DASHVIEWSTEST_FOLDER "/cardcreatortest.qml"));
4039 view->show();
4140 QTest::qWaitForWindowExposed(view);
tests/plugins/Dash/horizontaljournaltest.cpp−1
@@ -123,7 +123,6 @@ private Q_SLOTS:
123123 {
124124 view = new QQuickView();
125125 view->setResizeMode(QQuickView::SizeRootObjectToView);
126− view->engine()->addImportPath(BUILT_PLUGINS_DIR);
127126
128127 model = new WidthModel();
129128 QStringList widthList;
tests/plugins/Dash/horizontaljournaltry.cpp−1
@@ -63,7 +63,6 @@ int main(int argc, char *argv[])
6363
6464 QQuickView *view = new QQuickView();
6565 view->setResizeMode(QQuickView::SizeRootObjectToView);
66− view->engine()->addImportPath(BUILT_PLUGINS_DIR);
6766
6867 QWidthModela model;
6968 QStringList heightList;
tests/plugins/Dash/listviewwithpageheadersectionexternalmodeltest.cpp−1
@@ -168,7 +168,6 @@ private Q_SLOTS:
168168 void init()
169169 {
170170 view = new QQuickView();
171− view->engine()->addImportPath(BUILT_PLUGINS_DIR);
172171 view->setSource(QUrl::fromLocalFile(DASHVIEWSTEST_FOLDER "/listviewwithpageheadertestsectionexternalmodel.qml"));
173172 lvwph = dynamic_cast<ListViewWithPageHeader*>(view->rootObject()->findChild<QQuickFlickable*>());
174173 QVERIFY(lvwph);
tests/plugins/Dash/listviewwithpageheadersectiontest.cpp−1
@@ -133,7 +133,6 @@ private Q_SLOTS:
133133 void init()
134134 {
135135 view = new QQuickView();
136− view->engine()->addImportPath(BUILT_PLUGINS_DIR);
137136 view->setSource(QUrl::fromLocalFile(DASHVIEWSTEST_FOLDER "/listviewwithpageheadertestsection.qml"));
138137 lvwph = dynamic_cast<ListViewWithPageHeader*>(view->rootObject()->findChild<QQuickFlickable*>());
139138 model = view->rootObject()->findChild<QQmlListModel*>();
tests/plugins/Dash/listviewwithpageheadertest.cpp−1
@@ -119,7 +119,6 @@ private Q_SLOTS:
119119 void init()
120120 {
121121 view = new QQuickView();
122− view->engine()->addImportPath(BUILT_PLUGINS_DIR);
123122 view->setSource(QUrl::fromLocalFile(DASHVIEWSTEST_FOLDER "/listviewwithpageheadertest.qml"));
124123 lvwph = dynamic_cast<ListViewWithPageHeader*>(view->rootObject()->findChild<QQuickFlickable*>());
125124 model = view->rootObject()->findChild<QQmlListModel*>();
tests/plugins/Dash/organicgridtest.cpp−1
@@ -126,7 +126,6 @@ private Q_SLOTS:
126126 {
127127 view = new QQuickView();
128128 view->setResizeMode(QQuickView::SizeRootObjectToView);
129− view->engine()->addImportPath(BUILT_PLUGINS_DIR);
130129
131130 model = new DummyModel();
132131 model->setCount(21);
tests/plugins/Dash/organicgridtry.cpp−1
@@ -73,7 +73,6 @@ int main(int argc, char *argv[])
7373
7474 QQuickView *view = new QQuickView();
7575 view->setResizeMode(QQuickView::SizeRootObjectToView);
76− view->engine()->addImportPath(BUILT_PLUGINS_DIR);
7776
7877 DummyModel model;
7978 model.setCount(3);
tests/plugins/Dash/verticaljournaltest.cpp−1
@@ -125,7 +125,6 @@ private Q_SLOTS:
125125 {
126126 view = new QQuickView();
127127 view->setResizeMode(QQuickView::SizeRootObjectToView);
128− view->engine()->addImportPath(BUILT_PLUGINS_DIR);
129128
130129 model = new HeightModel();
131130 QStringList heightList;
tests/plugins/Dash/verticaljournaltry.cpp−1
@@ -63,7 +63,6 @@ int main(int argc, char *argv[])
6363
6464 QQuickView *view = new QQuickView();
6565 view->setResizeMode(QQuickView::SizeRootObjectToView);
66− view->engine()->addImportPath(BUILT_PLUGINS_DIR);
6766
6867 QHeightModel model;
6968 QStringList heightList;