plasma: prepare for runners changes

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2024-04-18 22:34:11 +03:00
parent bca37f3d5b
commit d20f749ec4
3 changed files with 5 additions and 13 deletions

View file

@ -71,15 +71,6 @@ void LocationsRunner::match(Plasma::RunnerContext &context)
match.setId("openfile");
}
context.addMatch(match);
} else if (type == Plasma::RunnerContext::Help) {
//kDebug() << "Locations matching because of" << type;
Plasma::QueryMatch match(this);
match.setText(i18n("Open %1", term));
match.setIcon(KIcon("system-help"));
match.setData(term);
match.setRelevance(1);
match.setId("help");
context.addMatch(match);
} else if (type == Plasma::RunnerContext::NetworkLocation || type == Plasma::RunnerContext::UnknownType) {
const bool filtered = KUriFilter::self()->filterUri(term, QStringList() << QLatin1String("kshorturifilter"));

View file

@ -33,7 +33,7 @@ PowerDevilRunner::PowerDevilRunner(QObject *parent, const QVariantList &args)
setObjectName(QLatin1String("PowerDevil"));
setIgnoredTypes(
Plasma::RunnerContext::Directory | Plasma::RunnerContext::File |
Plasma::RunnerContext::NetworkLocation | Plasma::RunnerContext::Help
Plasma::RunnerContext::NetworkLocation
);
updateStatus();

View file

@ -33,9 +33,10 @@ ShellRunner::ShellRunner(QObject *parent, const QVariantList &args)
{
setObjectName( QLatin1String("Command" ));
setPriority(AbstractRunner::HighestPriority);
setIgnoredTypes(Plasma::RunnerContext::Directory | Plasma::RunnerContext::File |
Plasma::RunnerContext::NetworkLocation | Plasma::RunnerContext::UnknownType |
Plasma::RunnerContext::Help);
setIgnoredTypes(
Plasma::RunnerContext::Directory | Plasma::RunnerContext::File |
Plasma::RunnerContext::NetworkLocation | Plasma::RunnerContext::UnknownType
);
addSyntax(Plasma::RunnerSyntax(":q:", i18n("Finds commands that match :q:, using common shell syntax")));
}