Commit bf9003b0 authored by Alexander Lohnau's avatar Alexander Lohnau 💬
Browse files

powerdevil runner: Remove unneeded DBus signal listener

The capabilities come from upower, the powerdevil config reloaded event does
not change these capabilities.
parent 4eaf342a
......@@ -40,7 +40,6 @@ PowerDevilRunner::PowerDevilRunner(QObject *parent, const KPluginMetaData &metaD
{
setObjectName(QStringLiteral("PowerDevil"));
updateStatus();
initUpdateTriggers();
setMinLetterCount(3);
const KLocalizedString suspend = ki18nc("Note this is a KRunner keyword", "suspend");
m_suspend = RunnerKeyword{suspend.untranslatedText(), suspend.toString()};
......@@ -85,22 +84,6 @@ PowerDevilRunner::~PowerDevilRunner()
{
}
void PowerDevilRunner::initUpdateTriggers()
{
// Also receive updates triggered through the DBus
QDBusConnection dbus = QDBusConnection::sessionBus();
if (dbus.interface()->isServiceRegistered(QStringLiteral("org.kde.Solid.PowerManagement"))) {
if (!dbus.connect(QStringLiteral("org.kde.Solid.PowerManagement"),
QStringLiteral("/org/kde/Solid/PowerManagement"),
QStringLiteral("org.kde.Solid.PowerManagement"),
QStringLiteral("configurationReloaded"),
this,
SLOT(updateStatus()))) {
qDebug() << "error!";
}
}
}
void PowerDevilRunner::updateStatus()
{
updateSyntaxes();
......
......@@ -45,7 +45,6 @@ private Q_SLOTS:
void updateStatus();
private:
void initUpdateTriggers();
void updateSyntaxes();
void addSuspendMatch(int value, QList<Plasma::QueryMatch> &matches, Plasma::QueryMatch::Type type);
// Returns -1 if there is no match, otherwise the percentage that the user has entered
......
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