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

REG (from 5.2 Alpha): QFileDialog::getSaveFileName() does not open the file dialog in the specified directory when using native dialogs

    XMLWordPrintable

Details

    • 7e5452a23f02c87f73f729cf6eab0ffe1ffa440c

    Description

      The dialog seems to open in the executable's directory. This worked fine in 5.2.0 Alpha.

      In qtbase/src/widgets/dialogs/qfiledialogs.cpp in the getSaveFileName static method, the QPlatformDialogHelper *m_platformHelper member of QFileDialog seems properly setup in the constructor at line 2366, but it is then destroyed in the call to dialog.setAcceptMode(AcceptSave) at line 2367. It is recreated in the call to dialog.exec() in line 2370 but it isn't properly initialized again.

      I will put together an app that demonstrates the problem.

      Steps to reproduce, using tests/manual/dialogs:

      • Enter directory
      • Choose getSaveFileName: Note directory is not observed
      • Choose getOpenFileName: Note directory is observed

      Attachments

        Issue Links

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

          Activity

            People

              srutledg Shawn Rutledge
              imoir Ian Moir
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes