Bug 445530 - Export screenshot to different app: "Internal error Could not prompt the user for which application to start"
Summary: Export screenshot to different app: "Internal error Could not prompt the user...
Status: RESOLVED FIXED
Alias: None
Product: Spectacle
Classification: Applications
Component: General (other bugs)
Version First Reported In: 21.08.3
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Boudhayan Gupta
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-11-15 12:59 UTC by postix
Modified: 2021-11-16 17:48 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 21.12.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description postix 2021-11-15 12:59:22 UTC
STEPS TO REPRODUCE
1. Take a screenshot via Spectacle
2.  Click on "Export" -> "Different application"

OBSERVED RESULT
A notification appears saying "Internal Error: could not prompt the user for which application to start".
There are no further logs in `journalctl`

SOFTWARE/OS VERSIONS
Operating System: Fedora Linux 35
KDE Plasma Version: 5.22.5
KDE Frameworks Version: 5.87.0
Qt Version: 5.15.2
Kernel Version: 5.14.17-301.fc35.x86_64 (64-bit)
Graphics Platform: X11
Comment 1 Nicolas Fella 2021-11-15 13:36:31 UTC
Looks like using KNotificationJobUiDelegate (https://invent.kde.org/graphics/spectacle/-/blob/master/src/Gui/ExportMenu.cpp#L102) breaks the open with dialog
Comment 2 Bug Janitor Service 2021-11-15 14:01:44 UTC
A possibly relevant merge request was started @ https://invent.kde.org/graphics/spectacle/-/merge_requests/96
Comment 3 Nicolas Fella 2021-11-16 10:53:08 UTC
Git commit 2b7693328eb487c1d25504a28ffe3a27beebd92f by Nicolas Fella.
Committed on 16/11/2021 at 10:52.
Pushed by nicolasfella into branch 'master'.

Use KIO::JobUiDelegate for opening other application

KNotificationJobUiDelegate cannot open an 'Open With' dialog which is what we need here. Instead use the KIO delegate that can

M  +2    -1    src/Gui/ExportMenu.cpp

https://invent.kde.org/graphics/spectacle/commit/2b7693328eb487c1d25504a28ffe3a27beebd92f
Comment 4 Nicolas Fella 2021-11-16 17:48:47 UTC
Git commit 410fcc3b6fae86490ebcdd2fce040b9ff046a090 by Nicolas Fella.
Committed on 16/11/2021 at 17:48.
Pushed by nicolasfella into branch 'release/21.12'.

Use KIO::JobUiDelegate for opening other application

KNotificationJobUiDelegate cannot open an 'Open With' dialog which is what we need here. Instead use the KIO delegate that can
(cherry picked from commit 2b7693328eb487c1d25504a28ffe3a27beebd92f)

M  +2    -1    src/Gui/ExportMenu.cpp

https://invent.kde.org/graphics/spectacle/commit/410fcc3b6fae86490ebcdd2fce040b9ff046a090