Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Utilities
Kate
Commits
ac0842e6
Commit
ac0842e6
authored
Apr 02, 2021
by
Nicolas Fella
Browse files
Port from KToolInvocation to KIO::CommandLauncherJob
parent
2d265987
Changes
2
Show whitespace changes
Inline
Side-by-side
addons/sessionapplet/CMakeLists.txt
View file @
ac0842e6
...
...
@@ -16,6 +16,7 @@ target_link_libraries(
PRIVATE
KF5::I18n
KF5::Plasma
KF5::KIOGui
Qt5::Widgets
)
...
...
addons/sessionapplet/katesessionsjob.cpp
View file @
ac0842e6
...
...
@@ -11,7 +11,7 @@ SPDX-License-Identifier: GPL-2.0-or-later
*********************************************************************/
#include
"katesessionsjob.h"
#include
"katesessionsengine.h"
#include
<K
ToolInvocation
>
#include
<K
IO/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
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment