From 6907acbd117d00dbbc02c1c4a288c50e079ee396 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Sat, 16 Oct 2010 18:55:55 +0000 Subject: [PATCH] use imports from the KDE plugin dir, since we can't relay on plasma imports being installed on the systemwide qt imports dir svn path=/trunk/KDE/kdelibs/; revision=1186518 --- widgets/declarativewidget.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/widgets/declarativewidget.cpp b/widgets/declarativewidget.cpp index f0e20cb70..4710b97d0 100644 --- a/widgets/declarativewidget.cpp +++ b/widgets/declarativewidget.cpp @@ -29,6 +29,8 @@ #include #include +#include +#include namespace Plasma { @@ -90,6 +92,10 @@ void DeclarativeWidgetPrivate::execute(const QString &fileName) delete component; engine = new QDeclarativeEngine(q); + foreach(const QString &importPath, KGlobal::dirs()->findDirs("module", "imports")) { + engine->addImportPath(importPath); + } + component = new QDeclarativeComponent(engine, fileName, q); if (delay) {