https://bugs.kde.org/show_bug.cgi?id=377351

            Bug ID: 377351
           Summary: QFileDialog::getSaveFileName() checks for existing
                    files before appending the file name extension
           Product: frameworks-kio
           Version: 5.31.0
          Platform: openSUSE RPMs
                OS: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: fa...@kde.org
          Reporter: fschaefer....@googlemail.com
                CC: kdelibs-b...@kde.org
  Target Milestone: ---

When using a QFileDialog::getSaveFileName with automatic file name suffix
appending enabled, the overwrite check is done before appending the file name
extension, which is wrong.
I have verified that QFileDialog calls the native KDE dialog (Qts own dialog
also doesn't provide automatic file name suffix appending).

Steps to reproduce:
1.) create a file called "aaa" (e.g. in the applications path)
2.) open save dialog, e.g. QString fileName =
QFileDialog::getSaveFileName(this, "Save",
QCoreApplication::applicationDirPath(), "test files(*.zzz)");
3.) enable automatic file name extension appending in the dialog
4.) enter file name "aaa"
5.) confirm saving

=> dialog should return file name "aaa.zzz" (file doesn't exist)
=> instead the user is asked to confirm overwrite of file "aaa" (which already
exists)
=> if overwriting is confirmed, file name "aaa" is returned instead of
"aaa.zzz"
(if "aaa" didn't exist and the overwrite check passes, "aaa.zzz" is returned as
expected)

Used Qt version is 5.7.1.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to