add the package folder (script) as valid imports dir (will probably have to be contents/imports

svn path=/trunk/KDE/kdebase/runtime/; revision=1187952
This commit is contained in:
Marco Martin 2010-10-20 20:55:35 +00:00
parent e054fbb8aa
commit 5dd5d716dc

View File

@ -77,6 +77,9 @@ bool DeclarativeAppletScript::init()
{
m_declarativeWidget = new Plasma::DeclarativeWidget(applet());
m_declarativeWidget->setInitializationDelayed(true);
m_declarativeWidget->engine()->addImportPath(package()->path()+"/contents/script");
m_declarativeWidget->setQmlPath(mainScript());
if (!m_declarativeWidget->engine() || !m_declarativeWidget->engine()->rootContext() || !m_declarativeWidget->engine()->rootContext()->isValid() || m_declarativeWidget->mainComponent()->isError()) {