From c7cb98eeb2b3d23e14a9f422bc6812862c471d5e Mon Sep 17 00:00:00 2001 From: Tim Jenssen Date: Thu, 24 Nov 2016 00:49:55 +0100 Subject: Welcome: set import pathes only one time Change-Id: Ie398a8fdbea44498d03870f42a89e2b185bf51be Reviewed-by: Eike Ziller --- src/plugins/welcome/welcomeplugin.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/plugins/welcome') diff --git a/src/plugins/welcome/welcomeplugin.cpp b/src/plugins/welcome/welcomeplugin.cpp index bb445eb6361..adc682267a9 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); -- cgit v1.2.3