diff options
author | Tim Jenssen <tim.jenssen@qt.io> | 2016-11-24 00:49:55 +0100 |
---|---|---|
committer | Tim Jenssen <tim.jenssen@qt.io> | 2016-11-24 10:45:56 +0000 |
commit | c7cb98eeb2b3d23e14a9f422bc6812862c471d5e (patch) | |
tree | fd0b0ac0f9b23a6c9dcb52ef38009d0eb33d76d1 /src/plugins/welcome | |
parent | d63001f1e1a3d6d9aa09b97315fb497bd95a608d (diff) |
Welcome: set import pathes only one time
Change-Id: Ie398a8fdbea44498d03870f42a89e2b185bf51be
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Diffstat (limited to 'src/plugins/welcome')
-rw-r--r-- | src/plugins/welcome/welcomeplugin.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/welcome/welcomeplugin.cpp b/src/plugins/welcome/welcomeplugin.cpp index bb445eb636..adc682267a 100644 --- a/src/plugins/welcome/welcomeplugin.cpp +++ b/src/plugins/welcome/welcomeplugin.cpp @@ -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); |