From bf044bf509a1753c689e33b49e74074965e35331 Mon Sep 17 00:00:00 2001 From: Oliver Henshaw Date: Thu, 23 May 2013 17:18:48 +0100 Subject: [PATCH] Drop unneeded duplicate addImportPath Let KDeclarative::setupBindings() add the import paths: it too takes paths from KGlobal::dirs()->findDirs("module", "imports"); it adds paths in the correct (reverse) order [1]. [1] See kdelibs 400b9f2e9d10386bb175b6123fe0cdaafeaffe61 for further details. REVIEW: 110670 --- scripting/scripting.cpp | 5 ----- tabbox/declarative.cpp | 3 --- 2 files changed, 8 deletions(-) diff --git a/scripting/scripting.cpp b/scripting/scripting.cpp index 13a77bc346..16a696c6cf 100644 --- a/scripting/scripting.cpp +++ b/scripting/scripting.cpp @@ -550,11 +550,6 @@ void KWin::DeclarativeScript::run() pal.setColor(m_view->backgroundRole(), Qt::transparent); m_view->setPalette(pal); - - foreach (const QString &importPath, KGlobal::dirs()->findDirs("module", "imports")) { - m_view->engine()->addImportPath(importPath); - } - // add read config KDeclarative kdeclarative; kdeclarative.setDeclarativeEngine(m_view->engine()); diff --git a/tabbox/declarative.cpp b/tabbox/declarative.cpp index f759512c76..7f169dcb02 100644 --- a/tabbox/declarative.cpp +++ b/tabbox/declarative.cpp @@ -138,9 +138,6 @@ DeclarativeView::DeclarativeView(QAbstractItemModel *model, TabBoxConfig::TabBox QPalette pal = palette(); pal.setColor(backgroundRole(), Qt::transparent); setPalette(pal); - foreach (const QString &importPath, KGlobal::dirs()->findDirs("module", "imports")) { - engine()->addImportPath(importPath); - } engine()->addImageProvider(QLatin1String("client"), new ImageProvider(model)); KDeclarative kdeclarative; kdeclarative.setDeclarativeEngine(engine());