Changeset View
Changeset View
Standalone View
Standalone View
runners/windowedwidgets/windowedwidgetsrunner.cpp
Show First 20 Lines • Show All 51 Lines • ▼ Show 20 Line(s) | |||||
52 | void WindowedWidgetsRunner::match(Plasma::RunnerContext &context) | 52 | void WindowedWidgetsRunner::match(Plasma::RunnerContext &context) | ||
53 | { | 53 | { | ||
54 | const QString term = context.query(); | 54 | const QString term = context.query(); | ||
55 | 55 | | |||
56 | if (!context.singleRunnerQueryMode() && term.length() < 3) { | 56 | if (!context.singleRunnerQueryMode() && term.length() < 3) { | ||
57 | return; | 57 | return; | ||
58 | } | 58 | } | ||
59 | 59 | | |||
60 | | ||||
61 | QList<Plasma::QueryMatch> matches; | 60 | QList<Plasma::QueryMatch> matches; | ||
62 | 61 | | |||
63 | foreach (const KPluginMetaData &md, Plasma::PluginLoader::self()->listAppletMetaData(QString())) { | 62 | const auto &listMetadata = Plasma::PluginLoader::self()->listAppletMetaData(QString()); | ||
63 | for (const KPluginMetaData &md : listMetadata) { | ||||
64 | if (!md.isValid()) { | 64 | if (!md.isValid()) { | ||
65 | continue; | 65 | continue; | ||
66 | } | 66 | } | ||
67 | 67 | | |||
68 | if (((md.name().contains(term, Qt::CaseInsensitive) || | 68 | if (((md.name().contains(term, Qt::CaseInsensitive) || | ||
69 | md.value(QLatin1String("GenericName")).contains(term, Qt::CaseInsensitive) || | 69 | md.value(QLatin1String("GenericName")).contains(term, Qt::CaseInsensitive) || | ||
70 | md.description().contains(term, Qt::CaseInsensitive)) || | 70 | md.description().contains(term, Qt::CaseInsensitive)) || | ||
71 | md.category().contains(term, Qt::CaseInsensitive) || | 71 | md.category().contains(term, Qt::CaseInsensitive) || | ||
▲ Show 20 Lines • Show All 51 Lines • Show Last 20 Lines |