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( ...@@ -16,6 +16,7 @@ target_link_libraries(
PRIVATE PRIVATE
KF5::I18n KF5::I18n
KF5::Plasma KF5::Plasma
KF5::KIOGui
Qt5::Widgets Qt5::Widgets
) )
......
...@@ -11,7 +11,7 @@ SPDX-License-Identifier: GPL-2.0-or-later ...@@ -11,7 +11,7 @@ SPDX-License-Identifier: GPL-2.0-or-later
*********************************************************************/ *********************************************************************/
#include "katesessionsjob.h" #include "katesessionsjob.h"
#include "katesessionsengine.h" #include "katesessionsengine.h"
#include <KToolInvocation> #include <KIO/CommandLauncherJob>
#include <QDebug> #include <QDebug>
#include <QUrl> #include <QUrl>
...@@ -42,7 +42,8 @@ void KateSessionsJob::start() ...@@ -42,7 +42,8 @@ void KateSessionsJob::start()
// CHECK IF SESSION EXISTS // CHECK IF SESSION EXISTS
QStringList args; QStringList args;
args << QStringLiteral("-n") << QStringLiteral("--start") << sessionName; args << QStringLiteral("-n") << QStringLiteral("--start") << sessionName;
KToolInvocation::kdeinitExec(QStringLiteral("kate"), args); auto job = new KIO::CommandLauncherJob(QStringLiteral("kate"), args);
job->start();
setResult(true); setResult(true);
emitResult(); emitResult();
return; return;
...@@ -62,7 +63,9 @@ void KateSessionsJob::start() ...@@ -62,7 +63,9 @@ void KateSessionsJob::start()
// args <<"-n"<< "--start"<<m_sessions[ id-3 ]; // args <<"-n"<< "--start"<<m_sessions[ id-3 ];
} }
KToolInvocation::kdeinitExec(QStringLiteral("kate"), args); auto job = new KIO::CommandLauncherJob(QStringLiteral("kate"), args);
job->start();
setResult(true); setResult(true);
emitResult(); emitResult();
return; 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