Commit 026a2917 authored by Konrad Materka's avatar Konrad Materka

[applets/systemtray] Fix invisible plasmoid icons when Media Player is added

After adding a new plasmoid (applet), for example a new Media Player, several empty icons are rendered in the system tray which hides existing icons.
The bug occurs after opening Gwenview while the Media Player applet is NOT in use.
The systray icons reappear when Gwenview is closed or another source starts playing.

BUG: 418662

Test Plan: Start Gwenview when Media Player is not in use. All icons should render correctly.

Reviewers: #plasma_workspaces, #plasma, ngraham, broulik, apol, davidedmundson, mart

Reviewed By: #plasma_workspaces, #plasma, mart

Subscribers: apol, plasma-devel

Tags: #plasma

Differential Revision:
parent 3f063495
......@@ -30,6 +30,7 @@ Loader {
} else if (model.itemType === "StatusNotifier") {
return "StatusNotifierItem.qml"
console.warn("SystemTray ItemLoader: Invalid state, cannot determine source!")
return ""
......@@ -206,7 +206,6 @@ void PlasmoidModel::addApplet(Plasma::Applet *applet)
dataItem->setData(pluginMetaData.pluginId(), static_cast<int>(BaseModel::BaseRole::ItemId));
dataItem->setData(true, static_cast<int>(BaseModel::BaseRole::CanRender));
dataItem->setData(plasmoidCategoryForMetadata(pluginMetaData), static_cast<int>(BaseModel::BaseRole::Category));
dataItem->setData(applet->status(), static_cast<int>(BaseModel::BaseRole::Status));
connect(applet, &Plasma::Applet::statusChanged, this, [dataItem] (Plasma::Types::ItemStatus status) {
......@@ -215,6 +214,9 @@ void PlasmoidModel::addApplet(Plasma::Applet *applet)
dataItem->setData(applet->property("_plasma_graphicObject"), static_cast<int>(Role::Applet));
dataItem->setData(true, static_cast<int>(Role::HasApplet));
// CanRender has to be the last one
dataItem->setData(true, static_cast<int>(BaseModel::BaseRole::CanRender));
void PlasmoidModel::removeApplet(Plasma::Applet *applet)
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment