When the static call QFileDialog::getSaveFileName() is used, and the file name typed in by the user matches the name of a file in the same folder, the overwrite confirmation dialog is not displayed.
How to reproduce:
1) Use the main.cpp file attached to this issue and create a project for it: qmake - project
2) Create a text file in the same folder where the binary is, e.g. test.txt
3) Run the application, either on ScratchBox emulator or the device.
4) When the "Save File As.." dialog appears, type in the same file name used in #, e.g. test.txt
- A dialog with the message "File <x> already exists; Do you wish to overwrite it?" should appear.
- No dialog is displayed, and the file name is returned as valid even though it already exists on the file system and the user has not explicitly chosen to overwrite it. In the example application, you will see something like:
"/home/user/file/etc/test.txt" - this is the file name yielded by the dialog
true - this shows this file already exists
1) When the same code is run on Windows and Linux, the overwrite confirmation dialog is displayed. See attached png file for details.
2) This is a case of automatic failure in Ovi Store QA tests.
3) A workaround is present in main.cpp.