Commit e97df376 authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇

Port from Settings::environmentDescription().icon to qApp->windowIcon().name()

parent 52b41d15
......@@ -21,7 +21,9 @@
#include "settings.h"
#include <QDBusConnection>
#include <QGuiApplication>
#include <QJsonArray>
#include <QIcon>
#include <QImage>
#include <QSet>
#include <QUrl>
......@@ -117,7 +119,7 @@ void HistoryRunnerPlugin::handleData(const QString& event, const QJsonObject& js
match.type = Plasma::QueryMatch::NoMatch;
match.relevance = 0;
match.text = i18nc("Dummy search result", "Additional permissions are required");
match.iconName = Settings::self().environmentDescription().iconName;
match.iconName = qApp->windowIcon().name();
matches.append(match);
} else {
const QJsonArray results = json.value(QStringLiteral("results")).toArray();
......@@ -159,7 +161,7 @@ void HistoryRunnerPlugin::handleData(const QString& event, const QJsonObject& js
} else {
match.text = url.toDisplayString();
}
match.iconName = Settings::self().environmentDescription().iconName;
match.iconName = qApp->windowIcon().name();
QUrl urlWithoutPassword = url;
urlWithoutPassword.setPassword({});
......
......@@ -292,11 +292,6 @@ Settings::Environment Settings::environment() const
return m_environment;
}
EnvironmentDescription Settings::environmentDescription() const
{
return m_currentEnvironment;
}
bool Settings::pluginEnabled(const QString &subsystem) const
{
return settingsForPlugin(subsystem).value(QStringLiteral("enabled")).toBool();
......
......@@ -68,8 +68,6 @@ public:
QJsonObject handleData(int serial, const QString &event, const QJsonObject &data) override;
Environment environment() const;
// TODO remove and migrate runners to use qApp->windowIcon().name()
EnvironmentDescription environmentDescription() const;
bool pluginEnabled(const QString &subsystem) const;
QJsonObject settingsForPlugin(const QString &subsystem) const;
......
......@@ -26,7 +26,9 @@
#include "connection.h"
#include <QDBusConnection>
#include <QGuiApplication>
#include <QHash>
#include <QIcon>
#include <QImage>
#include <QJsonArray>
#include <QJsonObject>
......@@ -188,7 +190,7 @@ void TabsRunnerPlugin::handleData(const QString& event, const QJsonObject& json)
actions.append(s_actionIdMute);
}
} else {
match.iconName = Settings::self().environmentDescription().iconName;
match.iconName = qApp->windowIcon().name();
const QImage favIcon = imageFromDataUrl(tab.value(QStringLiteral("favIconData")).toString());
if (!favIcon.isNull()) {
......
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