From 0f61a0531fa8e27198b00faf93749b23fb4e8d11 Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Tue, 20 Sep 2022 07:36:38 +0300 Subject: [PATCH] plasma: remove unused powerdevil runner method and variable Signed-off-by: Ivailo Monev --- plasma/runners/powerdevil/PowerDevilRunner.cpp | 15 --------------- plasma/runners/powerdevil/PowerDevilRunner.h | 1 - 2 files changed, 16 deletions(-) diff --git a/plasma/runners/powerdevil/PowerDevilRunner.cpp b/plasma/runners/powerdevil/PowerDevilRunner.cpp index e06cfa70..e3627297 100644 --- a/plasma/runners/powerdevil/PowerDevilRunner.cpp +++ b/plasma/runners/powerdevil/PowerDevilRunner.cpp @@ -122,18 +122,6 @@ void PowerDevilRunner::updateStatus() updateSyntaxes(); } - -bool PowerDevilRunner::parseQuery(const QString& query, const QList& rxList, QString& parameter) const -{ - foreach (const QRegExp& rx, rxList) { - if (rx.exactMatch(query)) { - parameter = rx.cap(1).trimmed(); - return true; - } - } - return false; -} - void PowerDevilRunner::match(Plasma::RunnerContext &context) { const QString term = context.query(); @@ -142,9 +130,6 @@ void PowerDevilRunner::match(Plasma::RunnerContext &context) } QList matches; - - QString parameter; - if (term.compare(i18nc("Note this is a KRunner keyword", "suspend"), Qt::CaseInsensitive) == 0) { QSet< Solid::PowerManagement::SleepState > states = Solid::PowerManagement::supportedSleepStates(); diff --git a/plasma/runners/powerdevil/PowerDevilRunner.h b/plasma/runners/powerdevil/PowerDevilRunner.h index d34c9b83..ae9e0639 100644 --- a/plasma/runners/powerdevil/PowerDevilRunner.h +++ b/plasma/runners/powerdevil/PowerDevilRunner.h @@ -40,7 +40,6 @@ class PowerDevilRunner : public Plasma::AbstractRunner void initUpdateTriggers(); void updateSyntaxes(); void addSuspendMatch(int value, QList &matches); - bool parseQuery(const QString& query, const QList& rxList, QString& parameter) const; int m_shortestCommand; }; -- 2.11.0