Commit bb053d8c authored by Konrad Materka's avatar Konrad Materka
Browse files

Merge branch 'Plasma/5.18'

parents d62fd2dd 77975468
......@@ -322,8 +322,10 @@ void StatusNotifierModel::dataUpdated(const QString &sourceName, const Plasma::D
QVariant icon = data.value("Icon");
if (icon.isValid() && icon.canConvert<QIcon>() && !icon.value<QIcon>().isNull()) {
dataItem->setData(icon, Qt::DecorationRole);
dataItem->setData(icon, static_cast<int>(Role::Icon));
} else {
dataItem->setData(data.value("IconName"), Qt::DecorationRole);
dataItem->setData(QVariant(), static_cast<int>(Role::Icon));
}
dataItem->setData(data.value("Id"), static_cast<int>(BaseModel::BaseRole::ItemId));
......@@ -344,7 +346,6 @@ void StatusNotifierModel::dataUpdated(const QString &sourceName, const Plasma::D
updateItemData(dataItem, data, Role::AttentionIconName);
updateItemData(dataItem, data, Role::AttentionMovieName);
updateItemData(dataItem, data, Role::Category);
updateItemData(dataItem, data, Role::Icon);
updateItemData(dataItem, data, Role::IconName);
updateItemData(dataItem, data, Role::IconThemePath);
updateItemData(dataItem, data, Role::IconsChanged);
......
......@@ -303,7 +303,7 @@ void StatusNotifierItemSource::refreshCallback(QDBusPendingCallWatcher *call)
overlayIcon(&icon, &overlay);
}
}
setData(QStringLiteral("Icon"), icon.isNull() ? QVariant() : icon);
setData(QStringLiteral("Icon"), icon);
setData(QStringLiteral("IconName"), iconName);
}
......@@ -329,7 +329,7 @@ void StatusNotifierItemSource::refreshCallback(QDBusPendingCallWatcher *call)
overlayIcon(&attentionIcon, &overlay);
}
}
setData(QStringLiteral("AttentionIcon"), attentionIcon.isNull() ? QVariant() : attentionIcon);
setData(QStringLiteral("AttentionIcon"), attentionIcon);
}
//ToolTip
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment