← Back to team overview

ubuntu-sdk-bugs team mailing list archive

[Bug 1324059] [NEW] file save dialog fails to confirm overwrite existing file

 

You have been subscribed to a public bug:

I am developing an app using Qt5.2.1, PyQt5, Python3.4 testing on
Ubuntu14.04LTS.  All packages are Ubuntu packages.

When a file exists already, e.g. 'foo.txt'.  Start the app which creates
files of suffix '.txt'.  User creates new document and chooses 'Save'.
App displays a file dialog for choosing a filename for saving, passing
the default filename of 'untitled.txt'.  Filename textbox is empty
(incorrectly?).  User enters just 'foo' in the filename text box.  User
chooses the 'Save' button.  Dialog incorrectly fails to show a message
box to confirm user wants to overwrite existing file.  Dialog returns
filename 'foo.txt' to the app.  App proceeds to overwrite an existing
file, causing user loss of data.

The QFileDialog by default uses the native dialogs i.e. GTK2?  If app
instead tells it to use the Qt provided dialog (non-native), the
behaviour is as expected (the textbox displays 'untitled.txt' and the
dialog confirms overwrite.)  (The native and non-native dialogs have
different look-and-feel.)

This is changed behaviour from Ubuntu 13.04 and Qt4.8.  (But I am
uncertain whether Qt used the native GTK dialog in those versions.)

I have also tested on Ubuntu 14.04Gnome, and the behaviour seems
slightly different: depending on whether the user Tabs out of the
textbox, the dialog completes the filename in the textbox (i.e. finds
the existing file and selects it) and DOES confirm overwrite.  (I will
need to retest to be sure about this.)

Note that I have experienced a related bug, where the dialog emits
'fileSelected' signal twice, once with 'foo' and once with 'foo.txt.'
Discussed at qt-project.org forums, but not reported here yet.

** Affects: qtbase-opensource-src (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: bot-comment
-- 
file save dialog fails to confirm overwrite existing file
https://bugs.launchpad.net/bugs/1324059
You received this bug notification because you are a member of Ubuntu SDK bug tracking, which is subscribed to qtbase-opensource-src in Ubuntu.