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
This commit is contained in:
Oliver Henshaw 2013-05-23 17:18:48 +01:00
parent b4a70ca2ef
commit bf044bf509
2 changed files with 0 additions and 8 deletions

View file

@ -550,11 +550,6 @@ void KWin::DeclarativeScript::run()
pal.setColor(m_view->backgroundRole(), Qt::transparent); pal.setColor(m_view->backgroundRole(), Qt::transparent);
m_view->setPalette(pal); m_view->setPalette(pal);
foreach (const QString &importPath, KGlobal::dirs()->findDirs("module", "imports")) {
m_view->engine()->addImportPath(importPath);
}
// add read config // add read config
KDeclarative kdeclarative; KDeclarative kdeclarative;
kdeclarative.setDeclarativeEngine(m_view->engine()); kdeclarative.setDeclarativeEngine(m_view->engine());

View file

@ -138,9 +138,6 @@ DeclarativeView::DeclarativeView(QAbstractItemModel *model, TabBoxConfig::TabBox
QPalette pal = palette(); QPalette pal = palette();
pal.setColor(backgroundRole(), Qt::transparent); pal.setColor(backgroundRole(), Qt::transparent);
setPalette(pal); setPalette(pal);
foreach (const QString &importPath, KGlobal::dirs()->findDirs("module", "imports")) {
engine()->addImportPath(importPath);
}
engine()->addImageProvider(QLatin1String("client"), new ImageProvider(model)); engine()->addImageProvider(QLatin1String("client"), new ImageProvider(model));
KDeclarative kdeclarative; KDeclarative kdeclarative;
kdeclarative.setDeclarativeEngine(engine()); kdeclarative.setDeclarativeEngine(engine());