diff --git a/components/mobileshell/components/applethost.cpp b/components/mobileshell/components/applethost.cpp index 011fcf76..9fe7cf16 100644 --- a/components/mobileshell/components/applethost.cpp +++ b/components/mobileshell/components/applethost.cpp @@ -25,6 +25,10 @@ public: { KPackage::Package pkg = KPackage::PackageLoader::self()->loadPackage(u"Plasma/Shell"_s); pkg.setPath(u"org.kde.plasma.mobile"_s); + if (!pkg.isValid()) { + qWarning() << "AppletHost: failed to load plasma shell package org.kde.plasma.mobile"; + return; + } setKPackage(pkg); } diff --git a/components/mobileshell/components/applethost.h b/components/mobileshell/components/applethost.h index 9d152c3d..0b686ccd 100644 --- a/components/mobileshell/components/applethost.h +++ b/components/mobileshell/components/applethost.h @@ -30,6 +30,11 @@ public: explicit AppletHost(QObject *parent = nullptr); ~AppletHost() override; + static QObject *create(QQmlEngine * /*engine*/, QJSEngine * /*scriptEngine*/) + { + return new AppletHost(); + } + Q_INVOKABLE QQuickItem *fullRepresentationFor(const QString &pluginId); Q_SIGNALS: