Commit ac0842e6 authored by Nicolas Fella's avatar Nicolas Fella
Browse files

Port from KToolInvocation to KIO::CommandLauncherJob

parent 2d265987
......@@ -16,6 +16,7 @@ target_link_libraries(
PRIVATE
KF5::I18n
KF5::Plasma
KF5::KIOGui
Qt5::Widgets
)
......
......@@ -11,7 +11,7 @@ SPDX-License-Identifier: GPL-2.0-or-later
*********************************************************************/
#include "katesessionsjob.h"
#include "katesessionsengine.h"
#include <KToolInvocation>
#include <KIO/CommandLauncherJob>
#include <QDebug>
#include <QUrl>
......@@ -42,7 +42,8 @@ void KateSessionsJob::start()
// CHECK IF SESSION EXISTS
QStringList args;
args << QStringLiteral("-n") << QStringLiteral("--start") << sessionName;
KToolInvocation::kdeinitExec(QStringLiteral("kate"), args);
auto job = new KIO::CommandLauncherJob(QStringLiteral("kate"), args);
job->start();
setResult(true);
emitResult();
return;
......@@ -62,7 +63,9 @@ void KateSessionsJob::start()
// args <<"-n"<< "--start"<<m_sessions[ id-3 ];
}
KToolInvocation::kdeinitExec(QStringLiteral("kate"), args);
auto job = new KIO::CommandLauncherJob(QStringLiteral("kate"), args);
job->start();
setResult(true);
emitResult();
return;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment