mirror of
https://bitbucket.org/smil3y/kde-workspace.git
synced 2025-02-23 18:32:50 +00:00
plasma: remove unused kill runner data
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
9e289a9f9b
commit
bcb99e3eff
1 changed files with 3 additions and 9 deletions
|
@ -82,7 +82,7 @@ void KillRunner::match(Plasma::RunnerContext &context)
|
||||||
|
|
||||||
const QString name = process->name;
|
const QString name = process->name;
|
||||||
if (!name.contains(term, Qt::CaseInsensitive)) {
|
if (!name.contains(term, Qt::CaseInsensitive)) {
|
||||||
//Process doesn't match the search term
|
// Process doesn't match the search term
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -97,14 +97,11 @@ void KillRunner::match(Plasma::RunnerContext &context)
|
||||||
user = QLatin1String("root");
|
user = QLatin1String("root");
|
||||||
}
|
}
|
||||||
|
|
||||||
QVariantList data;
|
|
||||||
data << pid << user;
|
|
||||||
|
|
||||||
Plasma::QueryMatch match(this);
|
Plasma::QueryMatch match(this);
|
||||||
match.setText(i18n("Terminate %1", name));
|
match.setText(i18n("Terminate %1", name));
|
||||||
match.setSubtext(i18n("Process ID: %1\nRunning as user: %2", QString::number(pid), user));
|
match.setSubtext(i18n("Process ID: %1\nRunning as user: %2", QString::number(pid), user));
|
||||||
match.setIcon(KIcon("application-exit"));
|
match.setIcon(KIcon("application-exit"));
|
||||||
match.setData(data);
|
match.setData(pid);
|
||||||
match.setId(name);
|
match.setId(name);
|
||||||
|
|
||||||
// Set the relevance
|
// Set the relevance
|
||||||
|
@ -129,10 +126,7 @@ void KillRunner::match(Plasma::RunnerContext &context)
|
||||||
|
|
||||||
void KillRunner::run(const Plasma::QueryMatch &match)
|
void KillRunner::run(const Plasma::QueryMatch &match)
|
||||||
{
|
{
|
||||||
QVariantList data = match.data().value<QVariantList>();
|
const quint64 pid = match.data().toULongLong();
|
||||||
quint64 pid = data[0].toUInt();
|
|
||||||
QString user = data[1].toString();
|
|
||||||
|
|
||||||
int signal = SIGKILL;
|
int signal = SIGKILL;
|
||||||
if (match.selectedAction() != NULL) {
|
if (match.selectedAction() != NULL) {
|
||||||
signal = match.selectedAction()->data().toInt();
|
signal = match.selectedAction()->data().toInt();
|
||||||
|
|
Loading…
Add table
Reference in a new issue