Hi Guiseppe,

I am using the native dialog.  I've tested again after setting QFileDialog::DontUseNativeDialog and this does not appear to have the problem.

Thanks,

Dan.

On 21/10/17 09:27, Giuseppe D'Angelo wrote:
Hi,

Il 21/10/2017 10:07, Dan Allen ha scritto:
Hi,

I'm currently working on a save dialog for my application (currently
testing in Ubuntu).  The dialog is in accept mode
QFileDialog::AcceptSave and a default suffix of "txt" is set.

I've noticed something that appears to be strange when the file provided
exists as follows (assuming a file "text.txt" exists for the following):

1. If I select the existing file "text.txt" and click save, I am
presented with the overwrite question dialog.
2. If I type "text.txt" as the file name and click save, I am presented
with the overwrite question dialog.
3. If I type "text" as the file name (without the suffix), I am not
presented with the overwrite question dialog and the dialog returns the
filename "text.txt" where the default suffix has been added.

Number (3) above is concerning.  If the dialog returns a filename, I
would assume the user has accepted overwriting it, but this doesn't
appear to be the case.  I assume this isn't intentional and is probably
a bug?

Likely, but it requires some investigation on where the bug actually lies.

First and foremost, are you using the native (GTK?) file dialog or the Qt one? You can try setting QFileDialog::DontUseNativeDialog and see if it makes a difference.

There are pretty much these cases:

A) Native, returning "text.txt" to Qt without showing the overwrite confirmation dialog. A minimal check is in order within Qt to verify that it's opening the native file dialog correctly (with/without any option that would cause such behaviour). This should result in either a bug report against Qt, or a bug report against GTK.

B) Native, returning "text" to Qt which then appends the file extension. Qt bug.

C) Non-native. Qt bug.

So, if it is a Qt bug, please report it on the bugtracker. This is obviously a P0, silent data loss.

Cheers,


_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to