@@ -39,10 +39,10 @@ void prependImportPaths(QQmlEngine *engine, const QStringList &paths)
39 // don't duplicate
39 // don't duplicate
40 const QString& path = paths[i];
40 const QString& path = paths[i];
41 QStringList::iterator iter = qFind(importPathList.begin(), importPathList.end(), path);
41 QStringList::iterator iter = qFind(importPathList.begin(), importPathList.end(), path);
42− if (iter == importPathList.end())
42+ if (iter == importPathList.end()) {
43− importPathList.prepend(path);
43+ engine->addImportPath(path);
45− engine->setImportPathList(importPathList);
48/* When you append and import path to the list of import paths it will be the *last*
48/* 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)
54 Q_FOREACH(const QString& path, paths) {
54 Q_FOREACH(const QString& path, paths) {
55 // don't duplicate
55 // don't duplicate
56 QStringList::iterator iter = qFind(importPathList.begin(), importPathList.end(), path);
56 QStringList::iterator iter = qFind(importPathList.begin(), importPathList.end(), path);
57− if (iter == importPathList.end())
57+ if (iter == importPathList.end()) {
58 importPathList.append(path);
58 importPathList.append(path);
60− importPathList.append(paths);
61 engine->setImportPathList(importPathList);
61 engine->setImportPathList(importPathList);
@@ -134,9 +134,8 @@ int main(int argc, char** argv)
134 QObject::connect(view->engine(), SIGNAL(quit()), qApp, SLOT(quit()));
134 QObject::connect(view->engine(), SIGNAL(quit()), qApp, SLOT(quit()));
136 QUrl source("Shell.qml");
136 QUrl source("Shell.qml");
137− prependImportPaths(view->engine(), QStringList() << ::shellAppDirectory());
137+ prependImportPaths(view->engine(), ::overrideImportPaths());
138− prependImportPaths(view->engine(), ::shellImportPaths());
139− appendImportPaths(view->engine(), QStringList() << ::fakePluginsImportPath());
138+ appendImportPaths(view->engine(), ::fallbackImportPaths());
140 view->setSource(source);
139 view->setSource(source);
141 view->setColor("transparent");
140 view->setColor("transparent");