diff --git a/src/pulseobject.cpp b/src/pulseobject.cpp index 7fd2d67..e8c844f 100644 --- a/src/pulseobject.cpp +++ b/src/pulseobject.cpp @@ -1,85 +1,90 @@ /* Copyright 2014-2015 Harald Sitter This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) version 3, or any later version accepted by the membership of KDE e.V. (or its successor approved by the membership of KDE e.V.), which shall act as a proxy defined in Section 6 of version 3 of the license. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library. If not, see . */ #include "pulseobject.h" #include "context.h" #include namespace QPulseAudio { PulseObject::PulseObject(QObject *parent) : QObject(parent) , m_index(0) { } PulseObject::~PulseObject() { } Context *PulseObject::context() const { return Context::instance(); } uint32_t PulseObject::index() const { return m_index; } QString PulseObject::iconName() const { QString name = m_properties.value(QStringLiteral("device.icon_name")).toString(); if (!name.isEmpty() && QIcon::hasThemeIcon(name)) { return name; } + name = m_properties.value(QStringLiteral("media.icon_name")).toString(); + if (!name.isEmpty() && QIcon::hasThemeIcon(name)) { + return name; + } + name = m_properties.value(QStringLiteral("window.icon_name")).toString(); if (!name.isEmpty() && QIcon::hasThemeIcon(name)) { return name; } name = m_properties.value(QStringLiteral("application.icon_name")).toString(); if (!name.isEmpty() && QIcon::hasThemeIcon(name)) { return name; } name = m_properties.value(QStringLiteral("application.process.binary")).toString(); if (!name.isEmpty() && QIcon::hasThemeIcon(name)) { return name; } name = property("name").toString(); if (!name.isEmpty() && QIcon::hasThemeIcon(name)) { return name; } return QString(); } QVariantMap PulseObject::properties() const { return m_properties; } } // QPulseAudio