@@ -39,10 +39,10 @@ void prependImportPaths(QQmlEngine *engine, const QStringList &paths)
3939 // don't duplicate
4040 const QString& path = paths[i];
4141 QStringList::iterator iter = qFind(importPathList.begin(), importPathList.end(), path);
42− if (iter == importPathList.end())
43− importPathList.prepend(path);
42+ if (iter == importPathList.end()) {
43+ engine->addImportPath(path);
44+ }
4445 }
45− engine->setImportPathList(importPathList);
4646}
4747
4848/* When you append and import path to the list of import paths it will be the *last*
@@ -54,10 +54,10 @@ void appendImportPaths(QQmlEngine *engine, const QStringList &paths)
5454 Q_FOREACH(const QString& path, paths) {
5555 // don't duplicate
5656 QStringList::iterator iter = qFind(importPathList.begin(), importPathList.end(), path);
57− if (iter == importPathList.end())
57+ if (iter == importPathList.end()) {
5858 importPathList.append(path);
59+ }
5960 }
60− importPathList.append(paths);
6161 engine->setImportPathList(importPathList);
6262}
6363
@@ -134,9 +134,8 @@ int main(int argc, char** argv)
134134 QObject::connect(view->engine(), SIGNAL(quit()), qApp, SLOT(quit()));
135135
136136 QUrl source("Shell.qml");
137− prependImportPaths(view->engine(), QStringList() << ::shellAppDirectory());
138− prependImportPaths(view->engine(), ::shellImportPaths());
139− appendImportPaths(view->engine(), QStringList() << ::fakePluginsImportPath());
137+ prependImportPaths(view->engine(), ::overrideImportPaths());
138+ appendImportPaths(view->engine(), ::fallbackImportPaths());
140139 view->setSource(source);
141140 view->setColor("transparent");
142141