Welcome: set import pathes only one time

Change-Id: Ie398a8fdbea44498d03870f42a89e2b185bf51be
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Tim Jenssen
2016-11-24 00:49:55 +01:00
parent d63001f1e1
commit c7cb98eeb2

View File

@@ -272,8 +272,7 @@ void WelcomeMode::sceneGraphError(QQuickWindow::SceneGraphError, const QString &
void WelcomeMode::facilitateQml(QQmlEngine *engine)
{
QStringList importPathList = engine->importPathList();
importPathList << resourcePath() + QLatin1String("/welcomescreen");
engine->setImportPathList(importPathList);
importPathList.append(resourcePath() + QLatin1String("/welcomescreen"));
engine->addImageProvider(QLatin1String("icons"), new WelcomeImageIconProvider);
if (!debug)
engine->setOutputWarningsToStandardError(false);
@@ -283,7 +282,8 @@ void WelcomeMode::facilitateQml(QQmlEngine *engine)
pluginPath += QLatin1String("/../PlugIns");
else
pluginPath += QLatin1String("/../" IDE_LIBRARY_BASENAME "/qtcreator");
engine->addImportPath(QDir::cleanPath(pluginPath));
importPathList.append(QDir::cleanPath(pluginPath));
engine->setImportPathList(importPathList);
QQmlContext *ctx = engine->rootContext();
ctx->setContextProperty(QLatin1String("welcomeMode"), this);