diff --git a/components/mobileshell/components/applethost.cpp b/components/mobileshell/components/applethost.cpp index b2dff3b5..011fcf76 100644 --- a/components/mobileshell/components/applethost.cpp +++ b/components/mobileshell/components/applethost.cpp @@ -91,7 +91,18 @@ QQuickItem *AppletHost::fullRepresentationFor(const QString &pluginId) item->setPreloadFullRepresentation(true); - return item->fullRepresentationItem(); + auto *fullRepItem = item->fullRepresentationItem(); + if (!fullRepItem) { + connect( + item, + &PlasmaQuick::AppletQuickItem::fullRepresentationItemChanged, + this, + [this, pluginId]() { + Q_EMIT appletReady(pluginId); + }, + static_cast(Qt::AutoConnection | Qt::SingleShotConnection)); + } + return fullRepItem; } #include "applethost.moc" diff --git a/components/mobileshell/components/applethost.h b/components/mobileshell/components/applethost.h index a40898e3..9d152c3d 100644 --- a/components/mobileshell/components/applethost.h +++ b/components/mobileshell/components/applethost.h @@ -32,6 +32,9 @@ public: Q_INVOKABLE QQuickItem *fullRepresentationFor(const QString &pluginId); +Q_SIGNALS: + void appletReady(const QString &pluginId); + private: void ensureCorona(); diff --git a/components/mobileshell/qml/statusbar/TaskWidget.qml b/components/mobileshell/qml/statusbar/TaskWidget.qml index b4b24a5d..8c9056f5 100644 --- a/components/mobileshell/qml/statusbar/TaskWidget.qml +++ b/components/mobileshell/qml/statusbar/TaskWidget.qml @@ -50,6 +50,9 @@ Item { var operationName = mouse.button === Qt.RightButton ? "ContextMenu" : "Activate"; var operation = model.service.operationDescription(operationName); + if (!operation) { + return; + } operation.x = taskIcon.mapToGlobal(0, 0).x; operation.y = taskIcon.mapToGlobal(0, taskIcon.height).y; model.service.startOperationCall(operation);