Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-63972

QFileDialog - No overwrite confirmation when used with setDefaultSuffix() (GTK)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.9.2
    • None
    • Ubuntu 17.10

    Description

      This issue is present when a nativeĀ QFileDialog is in QFileDialog::AcceptSave mode and is set to use a default suffix (example below).

      QFileDialog fileDialog;
      fileDialog.setFileMode(QFileDialog::AnyFile);
      fileDialog.setAcceptMode(QFileDialog::AcceptSave);
      fileDialog.setDefaultSuffix("txt");
      fileDialog.setNameFilter("Text (*.txt)");

      The problem is when the following sequence occurs:

      1. The user navigates to a folder where a file "text.txt" exists.
      2. The user enters "text" into the textbox (without the ".txt" suffix).
      3. The user presses return or clicks "save".
      4. The dialog returns "text.txt" without requesting overwrite confirmation from the user.

      This issue seems to be present in Linux. I have tested it using Windows and OSX and the confirmation is requested.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            richard Richard Moe Gustavsen
            gsxruk Dan Allen
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes