Changeset View
Changeset View
Standalone View
Standalone View
runners/kill/killrunner.cpp
Show First 20 Lines • Show All 114 Lines • ▼ Show 20 Line(s) | 95 | { | |||
---|---|---|---|---|---|
115 | term = term.right(term.length() - m_triggerWord.length()); | 115 | term = term.right(term.length() - m_triggerWord.length()); | ||
116 | 116 | | |||
117 | if (term.length() < 2) { | 117 | if (term.length() < 2) { | ||
118 | return; | 118 | return; | ||
119 | } | 119 | } | ||
120 | 120 | | |||
121 | QList<Plasma::QueryMatch> matches; | 121 | QList<Plasma::QueryMatch> matches; | ||
122 | const QList<KSysGuard::Process *> processlist = m_processes->getAllProcesses(); | 122 | const QList<KSysGuard::Process *> processlist = m_processes->getAllProcesses(); | ||
123 | foreach (const KSysGuard::Process *process, processlist) { | 123 | for (const KSysGuard::Process *process : processlist) { | ||
124 | if (!context.isValid()) { | 124 | if (!context.isValid()) { | ||
125 | return; | 125 | return; | ||
126 | } | 126 | } | ||
127 | 127 | | |||
128 | const QString name = process->name(); | 128 | const QString name = process->name(); | ||
129 | if (!name.contains(term, Qt::CaseInsensitive)) { | 129 | if (!name.contains(term, Qt::CaseInsensitive)) { | ||
130 | //Process doesn't match the search term | 130 | //Process doesn't match the search term | ||
131 | continue; | 131 | continue; | ||
▲ Show 20 Lines • Show All 94 Lines • Show Last 20 Lines |