Skip to content

[Notifications] Show which app will open a file when job finishes

Kai Uwe Broulik requested to merge work/kbroulik/noti-job-appname into master

For example, show "Open with Gwenview" with its icon after downloading an image file, and "Open with..." in case there is no associated application. While at it also give an icon to the "Open Containing Folder" button.

Also, port it to use a KIO::mimetypeJob to make it asynchronous and work on remote locations. To make for a less jarring transition (icon suddenly appearing, causing text reflow and the dialog to resize), take an initial guess about the mimetype using the file extension while the job is running.

Furthermore, hide the "Open" actions in case the job fails which likely means the file doesn't exist anymore or cannot be accessed, and as as result probably cannot be opened anyway.


It was also a bit of a testbed for using a Q_GADGET from QML :) I'll probably wait until 5.21 is branched before merging.

Screenshot_20210115_134512

Screenshot_20210115_134602

Screenshot_20210115_134452

Screenshot_20210115_134530

Edited by Kai Uwe Broulik

Merge request reports

Loading