Bug 415837

Summary: Regression: Current File Name Not Suggested as File Name When "Save As" of File
Product: [Frameworks and Libraries] frameworks-kio Reporter: Gunter Ohrner <mails.bugs.kde.org-2025-1>
Component: Open/save dialogsAssignee: David Faure <faure>
Status: RESOLVED FIXED    
Severity: normal CC: a.samirh78, kdelibs-bugs-null, nate, ped
Priority: NOR Keywords: triaged
Version First Reported In: 5.82.0   
Target Milestone: ---   
Platform: Neon   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Empty file name text box in "Save As" dialog.

Description Gunter Ohrner 2020-01-03 12:13:29 UTC
Created attachment 124866 [details]
Empty file name text box in "Save As" dialog.

SUMMARY

Since 5.65 or 5.64, in eg. Okular and LibreOffice, the current file name is not pre-filled into the "file name" field in the save as dialog, forcing the user to manually re-enter the file name if (s)he just wants to safe a copy of the file under the same (or a very similar) name.

I hope I filed this correctly under "frameworks-kio", please re-assign if this was wrong.

STEPS TO REPRODUCE

1. Open a PDF in Okular (only an example, also reproducable with LibreOffice and LibreOffice document files)
2. Chose "File -> Save As"

OBSERVED RESULT

The "Save As" dialog opens with an empty file name field. (See screenshot.)


EXPECTED RESULT

The "Save As" dialog opens the the "file name" field contains the file's current file name.


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: KDE Neon
KDE Plasma Version: 5.17.4
KDE Frameworks Version: KDE Frameworks 5.65.0
Qt Version: Qt 5.13.2 (kompiliert gegen 5.13.2)
Comment 1 Nate Graham 2020-01-07 00:00:57 UTC
Weird, this works just fine for me with Frameworks 5.66 from git master on openSUSE Tumbleweed in Okular and LibreOffice (and any other app using the KDE file save dialog).
Comment 2 Ahmad Samir 2021-06-13 18:49:50 UTC
Seems to be an issue if "select filename extension" checkbox is enabled in KFileWidget.
Comment 3 Gunter Ohrner 2021-06-16 12:31:27 UTC
(In reply to Ahmad Samir from comment #2)
> Seems to be an issue if "select filename extension" checkbox is enabled in
> KFileWidget.

That's it, thanks!

If the checkbox is checked, the filename gets lost. If it's unchecked, it seems to work.

This is still true in todays KDE neon with KF5 5.82.0.



Maybe it's actually then also older than 5.65 or 5.64, and that was just the time when I started to use the "select filename extension" feature and I didn't make the connection until now...
Comment 4 Peter Ped Helcmanovsky 2022-09-04 08:57:49 UTC
Can't reproduce with Gwenview 22.08.0, KF5 5.97.0, Qt 5.15.5 (current KDE neon user packages).

Whether I enable/disable "Automatically select filename extension", the original image filename is filled in when I hit "Save as", and base filename is selected as text for editing.

But. I have now the empty filename in "Save as" of Kate, must have happened recently (probably in last 2-3 KF5+Kate updates, as it's annoying for me a lot and can't recall this issue before). And there the automatic filename extension option is just disabled as filter is always "All files".

Should I open new bug for this or can this one continue? (feels like same KDE5 code issue, but different configuration, maybe regression of changes trying to fix the originally reported issue, but I didn't look into the code, so I may be also completely wrong and the issue may be unrelated)
Comment 5 Nate Graham 2022-09-09 17:21:24 UTC
Let's get a new bug report for that since it seems like the original issue is fixed now. I think it may actually be a Kate-specific issue.