Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Graphics
Spectacle
Commits
a00b13b5
Commit
a00b13b5
authored
Oct 26, 2020
by
Méven Car
Committed by
Méven Car
Oct 26, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ExportMenu: Port to KIO::ApplicationLauncherJob
parent
e7049186
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
src/Gui/ExportMenu.cpp
src/Gui/ExportMenu.cpp
+10
-2
No files found.
src/Gui/ExportMenu.cpp
View file @
a00b13b5
...
...
@@ -23,6 +23,8 @@
#include <KLocalizedString>
#include <KApplicationTrader>
#include <KRun>
#include <KIO/ApplicationLauncherJob>
#include <KNotificationJobUiDelegate>
#include <KStandardShortcut>
#ifdef KIPI_FOUND
#include <KIPI/Plugin>
...
...
@@ -85,8 +87,14 @@ void ExportMenu::getKServiceItems()
connect
(
action
,
&
QAction
::
triggered
,
this
,
[
=
]()
{
const
QUrl
filename
=
mExportManager
->
getAutosaveFilename
();
mExportManager
->
doSave
(
filename
);
QList
<
QUrl
>
whereIs
({
filename
});
KRun
::
runService
(
*
service
,
whereIs
,
parentWidget
(),
true
);
auto
*
job
=
new
KIO
::
ApplicationLauncherJob
(
service
);
auto
*
delegate
=
new
KNotificationJobUiDelegate
;
delegate
->
setAutoErrorHandlingEnabled
(
true
);
job
->
setUiDelegate
(
delegate
);
job
->
setUrls
({
filename
});
job
->
start
();
});
addAction
(
action
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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