Filename of save dialog not prefilled with opened file
There is a inconvenience, inconsistency, or problem with, at least some, QT5 apps and saving via the file-chooser. One of these apps is Kwrite.
If build and run directly on the host, the filename of the currently opened file is suggested for saving. If run as flatpak app, the field for the filename on the file-chooser is left blank.
Giving the app read-write access to the openened file, or rather its directory, is not fixing it. Both times the app is compiled from the same source code.
Here is the chain of code/events for a specific flatpak app (not Kwrite):
- The app uses QFileDialog::getSaveFileName with a valid "dir" argument, including the filename.
- The kde-runtime / portal frontend send a dbus message with "current_file" and "current_folder" set, but no "current_name". (I read the specifications, but I'm not sure if this is the intended way.)
- The desktop-portal backend on the host does not suggest a filename. (I tried Gtk and Kde based distros.)
I do not know if this is intended, can be fixed, or an issue with the desktop-portal specifications instead. If this is not an issue with the Kde runtime, then
- I apologize
- Any other help would be appreciated. Like, where is the issue or where can this be discussed instead?
Thanks!