diff --git a/src/plasmaquick/appletquickitem.cpp b/src/plasmaquick/appletquickitem.cpp index ae257bf66..3ffe26967 100644 --- a/src/plasmaquick/appletquickitem.cpp +++ b/src/plasmaquick/appletquickitem.cpp @@ -462,7 +462,7 @@ void AppletQuickItem::init() //if the engine of the qmlObject is different from the static one, then we //are using an old version of the api in which every applet had one engine //so initialize a private url interceptor - if (d->applet->package().isValid() && qobject_cast(d->qmlObject)) { + if (d->applet->package().isValid() && !qobject_cast(d->qmlObject)) { PackageUrlInterceptor *interceptor = new PackageUrlInterceptor(engine, d->applet->package()); interceptor->addAllowedPath(d->coronaPackage.path()); engine->setUrlInterceptor(interceptor); diff --git a/src/scriptengines/qml/plasmoid/wallpaperinterface.cpp b/src/scriptengines/qml/plasmoid/wallpaperinterface.cpp index fcaca4b58..de41a62a1 100644 --- a/src/scriptengines/qml/plasmoid/wallpaperinterface.cpp +++ b/src/scriptengines/qml/plasmoid/wallpaperinterface.cpp @@ -21,7 +21,7 @@ #include "containmentinterface.h" #include -#include +#include #include #include @@ -127,7 +127,7 @@ void WallpaperInterface::syncWallpaperPackage() m_wallpaperPlugin = m_containmentInterface->containment()->wallpaper(); if (!m_qmlObject) { - m_qmlObject = new KDeclarative::QmlObject(this); + m_qmlObject = new KDeclarative::QmlObjectSharedEngine(this); s_rootObjects[m_qmlObject->engine()] = this; m_qmlObject->setInitializationDelayed(true); connect(m_qmlObject, &KDeclarative::QmlObject::finished, this, &WallpaperInterface::loadFinished);