Plasma5Support

appjob.cpp
1/*
2 SPDX-FileCopyrightText: 2009 Chani Armitage <chani@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.0-only
5*/
6
7#include "appjob.h"
8
9#include <KIO/ApplicationLauncherJob>
10
11AppJob::AppJob(AppSource *source, const QString &operation, QMap<QString, QVariant> &parameters, QObject *parent)
12 : ServiceJob(source->objectName(), operation, parameters, parent)
13 , m_source(source)
14{
15}
16
17AppJob::~AppJob()
18{
19}
20
21void AppJob::start()
22{
23 const QString operation = operationName();
24 if (operation == QLatin1String("launch")) {
25 auto job = new KIO::ApplicationLauncherJob(m_source->getApp());
26 job->start();
27 setResult(true);
28 return;
29 }
30 setResult(false);
31}
App Source.
Definition appsource.h:19
void setResult(const QVariant &result)
Sets the result for an operation.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:08:57 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.