~mzanetti/unity8/fix-preview-collapsing

« back to all changes in this revision

Viewing changes to main.cpp

merged with trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
        // don't duplicate
41
41
        const QString& path = paths[i];
42
42
        QStringList::iterator iter = qFind(importPathList.begin(), importPathList.end(), path);
43
 
        if (iter == importPathList.end())
44
 
            importPathList.prepend(path);
 
43
        if (iter == importPathList.end()) {
 
44
            engine->addImportPath(path);
 
45
        }
45
46
    }
46
 
    engine->setImportPathList(importPathList);
47
47
}
48
48
 
49
49
/* When you append and import path to the list of import paths it will be the *last*
55
55
    Q_FOREACH(const QString& path, paths) {
56
56
        // don't duplicate
57
57
        QStringList::iterator iter = qFind(importPathList.begin(), importPathList.end(), path);
58
 
        if (iter == importPathList.end())
 
58
        if (iter == importPathList.end()) {
59
59
            importPathList.append(path);
 
60
        }
60
61
    }
61
 
    importPathList.append(paths);
62
62
    engine->setImportPathList(importPathList);
63
63
}
64
64
 
80
80
    setenv("QML_FORCE_THREADED_RENDERER", "1", 1);
81
81
    setenv("QML_FIXED_ANIMATION_STEP", "1", 1);
82
82
 
83
 
    QGuiApplication::setApplicationName("Qml Phone Shell");
 
83
    QGuiApplication::setApplicationName("Unity 8");
84
84
    QGuiApplication application(argc, argv);
85
85
 
86
86
    resolveIconTheme();
133
133
    view->setProperty("role", 2); // INDICATOR_ACTOR_ROLE
134
134
 
135
135
    QUrl source("Shell.qml");
136
 
    prependImportPaths(view->engine(), QStringList() << ::shellAppDirectory());
137
 
    prependImportPaths(view->engine(), ::shellImportPaths());
138
 
    appendImportPaths(view->engine(), QStringList() << ::fakePluginsImportPath());
 
136
    prependImportPaths(view->engine(), ::overrideImportPaths());
 
137
    appendImportPaths(view->engine(), ::fallbackImportPaths());
139
138
    view->setSource(source);
140
139
    view->setColor("transparent");
141
140