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.
35 lines
767 B
35 lines
767 B
/* |
|
SPDX-FileCopyrightText: 2013 Eike Hein <hein@kde.org> |
|
|
|
SPDX-License-Identifier: GPL-2.0-or-later |
|
*/ |
|
|
|
#include "processrunner.h" |
|
|
|
#include <KIO/ApplicationLauncherJob> |
|
#include <KNotificationJobUiDelegate> |
|
|
|
ProcessRunner::ProcessRunner(QObject *parent) |
|
: QObject(parent) |
|
{ |
|
} |
|
|
|
ProcessRunner::~ProcessRunner() |
|
{ |
|
} |
|
|
|
void ProcessRunner::runMenuEditor() |
|
{ |
|
const auto service = KService::serviceByDesktopName(QStringLiteral("org.kde.kmenuedit")); |
|
|
|
if (!service) { |
|
qWarning() << "Could not find kmenuedit"; |
|
return; |
|
} |
|
|
|
auto *job = new KIO::ApplicationLauncherJob(service); |
|
auto *delegate = new KNotificationJobUiDelegate; |
|
delegate->setAutoErrorHandlingEnabled(true); |
|
job->setUiDelegate(delegate); |
|
job->start(); |
|
}
|
|
|