qmlobjectsharedengine in wallpapers
Change-Id: I6125cfa6d7a0cbf1f6f4ece132e9b824a447ddfb
This commit is contained in:
parent
a595bf9f61
commit
1b5805ba02
@ -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<KDeclarative::QmlObjectSharedEngine *>(d->qmlObject)) {
|
||||
if (d->applet->package().isValid() && !qobject_cast<KDeclarative::QmlObjectSharedEngine *>(d->qmlObject)) {
|
||||
PackageUrlInterceptor *interceptor = new PackageUrlInterceptor(engine, d->applet->package());
|
||||
interceptor->addAllowedPath(d->coronaPackage.path());
|
||||
engine->setUrlInterceptor(interceptor);
|
||||
|
@ -21,7 +21,7 @@
|
||||
|
||||
#include "containmentinterface.h"
|
||||
#include <kdeclarative/configpropertymap.h>
|
||||
#include <kdeclarative/qmlobject.h>
|
||||
#include <kdeclarative/qmlobjectsharedengine.h>
|
||||
|
||||
#include <kactioncollection.h>
|
||||
#include <kdesktopfile.h>
|
||||
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user