Commit 78347989 authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇
Browse files

Just return applicationDisplayName in MPRIS Identity

Avoids some code duplication.

Differential Revision: https://phabricator.kde.org/D25404
parent 415f3d05
......@@ -33,8 +33,6 @@
#include "mprisroot.h"
#include "mprisplayer.h"
#include "settings.h"
#include <unistd.h> // getppid
static const QString s_serviceName = QStringLiteral("org.mpris.MediaPlayer2.plasma-browser-integration");
......@@ -278,16 +276,7 @@ void MPrisPlugin::handleData(const QString &event, const QJsonObject &data)
QString MPrisPlugin::identity() const
{
switch (Settings::self().environment()) {
case Settings::Environment::Unknown: return QString();
case Settings::Environment::Chrome: return QStringLiteral("Google Chrome");
case Settings::Environment::Chromium: return QStringLiteral("Chromium");
case Settings::Environment::Firefox: return QStringLiteral("Firefox Web Browser");
case Settings::Environment::Opera: return QStringLiteral("Opera");
case Settings::Environment::Vivaldi: return QStringLiteral("Vivaldi");
}
return QString();
return QGuiApplication::applicationDisplayName();
}
QString MPrisPlugin::desktopEntry() const
......
Markdown is supported
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