OSDN Git Service

plasma: remove unused powerdevil runner method and variable
authorIvailo Monev <xakepa10@gmail.com>
Tue, 20 Sep 2022 04:36:38 +0000 (07:36 +0300)
committerIvailo Monev <xakepa10@gmail.com>
Tue, 20 Sep 2022 04:36:38 +0000 (07:36 +0300)
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
plasma/runners/powerdevil/PowerDevilRunner.cpp
plasma/runners/powerdevil/PowerDevilRunner.h

index e06cfa7..e362729 100644 (file)
@@ -122,18 +122,6 @@ void PowerDevilRunner::updateStatus()
     updateSyntaxes();
 }
 
-
-bool PowerDevilRunner::parseQuery(const QString& query, const QList<QRegExp>& 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<Plasma::QueryMatch> 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();
 
index d34c9b8..ae9e063 100644 (file)
@@ -40,7 +40,6 @@ class PowerDevilRunner : public Plasma::AbstractRunner
         void initUpdateTriggers();
         void updateSyntaxes();
         void addSuspendMatch(int value, QList<Plasma::QueryMatch> &matches);
-        bool parseQuery(const QString& query, const QList<QRegExp>& rxList, QString& parameter) const;
 
         int m_shortestCommand;
 };