You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
693 B
31 lines
693 B
/* |
|
SPDX-FileCopyrightText: 2009 Chani Armitage <chani@kde.org> |
|
|
|
SPDX-License-Identifier: LGPL-2.0-only |
|
*/ |
|
|
|
#include "appjob.h" |
|
|
|
#include <KIO/ApplicationLauncherJob> |
|
|
|
AppJob::AppJob(AppSource *source, const QString &operation, QMap<QString, QVariant> ¶meters, QObject *parent) |
|
: ServiceJob(source->objectName(), operation, parameters, parent) |
|
, m_source(source) |
|
{ |
|
} |
|
|
|
AppJob::~AppJob() |
|
{ |
|
} |
|
|
|
void AppJob::start() |
|
{ |
|
const QString operation = operationName(); |
|
if (operation == QLatin1String("launch")) { |
|
auto job = new KIO::ApplicationLauncherJob(m_source->getApp()); |
|
job->start(); |
|
setResult(true); |
|
return; |
|
} |
|
setResult(false); |
|
}
|
|
|