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

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

XMLWordPrintable

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

      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.

        For Gerrit Dashboard: QTBUG-41020
        # Subject Branch Project Status CR V

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes