OSDN Git Service

kemu: set the runner match types to Plasma::QueryMatch::HelperMatch
authorIvailo Monev <xakepa10@gmail.com>
Mon, 3 Oct 2022 01:27:12 +0000 (04:27 +0300)
committerIvailo Monev <xakepa10@gmail.com>
Mon, 3 Oct 2022 01:27:27 +0000 (04:27 +0300)
that way the runner trigger term is stored in the history instead of
the match text which does not trigger the action

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
kemu/krunner/krunner_kemu.cpp

index 3a87bcc..2071124 100644 (file)
@@ -58,7 +58,7 @@ void KEmuControlRunner::match(Plasma::RunnerContext &context)
             const bool isrunning = interface.call("isRunning", machine).arguments().at(0).toBool();
             if (!isrunning) {
                 Plasma::QueryMatch match(this);
-                match.setType(Plasma::QueryMatch::PossibleMatch);
+                match.setType(Plasma::QueryMatch::HelperMatch);
                 match.setIcon(KIcon("system-run"));
                 match.setText(i18n("Start %1 virtual machine", machine));
                 match.setData(QStringList() << "start" << machine);
@@ -70,7 +70,7 @@ void KEmuControlRunner::match(Plasma::RunnerContext &context)
             const bool isrunning = interface.call("isRunning", machine).arguments().at(0).toBool();
             if (isrunning) {
                 Plasma::QueryMatch match(this);
-                match.setType(Plasma::QueryMatch::PossibleMatch);
+                match.setType(Plasma::QueryMatch::HelperMatch);
                 match.setIcon(KIcon("system-shutdown"));
                 match.setText(i18n("Stop %1 virtual machine", machine));
                 match.setData(QStringList() << "stop" << machine);