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

macOS/Catalina: Modal File Dialog Save-Replace Always Rejected

    XMLWordPrintable

Details

    • macOS
    • aa3b42d6342c6756c3ce941db0bbf1122ae48224 (qt/qtbase/dev) 7d3fee7ca9b8b0c47fc2cb8092bf21ba28d582e3 (qt/qtbase/6.0) b554869a8f546dfccc5ded528fb0680281fac6d4 (qt/tqtc-qtbase/tqtc/lts-5.15)

    Description

      When you create a modal native file dialog to save a file, and you wish to replace an existing file with the same name, macOS will prompt you if you wish to "Replace".  When you accept it, QFileDialog::exec() returns 0 (Rejected).  When not modal, 1 (Accepted) is returned.  We want to use modal and for it to appear as a sheet.  Bug #2: Whether you accept or cancel, selectedFiles() is always valid, so there is no secondary way of determining if the choice was truly rejected.

      Example program attached.

       

      This is Catalina specific. Works on Osx 10.14

      Attachments

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

        Activity

          People

            vestbo Tor Arne Vestbø
            remik Remik Ziemlinski
            Votes:
            4 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes