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

"Application" example tries to save file even when you click cancel

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.4.0 Beta
    • 5.3.0, 5.3.2, 5.4.0
    • Examples and Demos
    • None
    • eaf94872230a3b2fd9ade268f58262f70e6dcf27

    Description

      To reproduce:

      1. Start "application" example
      2. Click "save" button to open the file dialog
      3. Click "cancel"

      You will get a message box that the file cannot be saved because the file name points to a directory.

      Looking at the code in the example, it tries to detect cancel by checking if the returned list from selectedFiles() is empty. This is documented to never happen. The example should check the return value from exec() instead.

      Reproduced on Linux and Android.

      Attachments

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

        Activity

          People

            misalmel Mika Salmela
            esabraha Eskil Abrahamsen Blomfeldt
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes