plasma: do not require icons path for notifier items

the only requirement, by the spec, is that the icon name is
Freedesktop-compliant which means it can in $HOME/.icons or any other
compliant path

Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
This commit is contained in:
Ivailo Monev 2019-11-19 16:01:03 +00:00
parent a4edab463c
commit ceba21c739
2 changed files with 2 additions and 4 deletions

View file

@ -325,9 +325,8 @@ void DBusSystemTrayTask::syncIcons(const Plasma::DataEngine::Data &properties)
}
const QString path = m_iconThemePath;
if (!path.isEmpty()) {
// FIXME: If last part of path is not "icons", this won't work!
QStringList tokens = path.split('/', QString::SkipEmptyParts);
if (tokens.length() >= 3 && tokens.takeLast() == QLatin1String("icons")) {
if (tokens.length() >= 3) {
QString appName = tokens.takeLast();
QString prefix = QChar('/') + tokens.join("/");
// FIXME: Fix KIconLoader and KIconTheme so that we can use

View file

@ -214,9 +214,8 @@ void StatusNotifierItemSource::refreshCallback(QDBusPendingCallWatcher *call)
if (!m_customIconLoader) {
QString path = properties["IconThemePath"].toString();
if (!path.isEmpty()) {
// FIXME: If last part of path is not "icons", this won't work!
QStringList tokens = path.split('/', QString::SkipEmptyParts);
if (tokens.length() >= 3 && tokens.takeLast() == "icons") {
if (tokens.length() >= 3) {
QString appName = tokens.takeLast();
QString prefix = '/' + tokens.join("/");
// FIXME: Fix KIconLoader and KIconTheme so that we can use