Bug 480497 - Save dialog does not prefill filename with opened file
Summary: Save dialog does not prefill filename with opened file
Status: RESOLVED FIXED
Alias: None
Product: xdg-desktop-portal-kde
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: Flatpak Linux
: NOR minor
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-01-29 16:38 UTC by Paul Krause
Modified: 2024-04-05 13:26 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Krause 2024-01-29 16:38:16 UTC
SUMMARY
There is an inconsistency, or problem for me, with all tested QT5 apps as flatpak 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.


STEPS TO REPRODUCE
1. Install flatpak
2. flatpak install org.kde.Platform org.kde.kwrite
3. flatpak run org.kde.kwrite
4. Open some file
5. Hit Save As


OBSERVED RESULT
The field for the filename on the file-chooser is left blank.


EXPECTED RESULT
The field for the filename on the file-chooser is prefilled with the name of the opened file.
As when run directly in the host OS.


ADDITIONAL INFORMATION
Here is the chain of code/events for a specific flatpak app (not Kwrite):
1. The app uses QFileDialog::getSaveFileName with a valid "dir" argument, including the filename.
2. The kde-runtime / portal frontend send a dbus message with "current_file" and "current_folder" set, but no "current_name".

I'm not sure where the issue occurs. I read the specifications, I'm not sure if this is the intended way maybe.
But I'm clueless and the developers of the kde runtime asked me to file an issue here instead.


Not source of the issue:
1. Giving the app read-write access to the opened file, or rather its directory, is not fixing it.
2. Both times the app is compiled from the same source code.
3. I tried Gtk and Kde based distros as host.


Thanks!
Comment 1 Paul Krause 2024-04-05 13:26:48 UTC
Closed as I cannot reproduce it with the version in Kubuntu 23.10 anymore.