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

Native QFileDialog on OS X: setDirectory for Open/Save fails - again

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 5.2.1
    • 5.2.0
    • None
    • OS X 10.8.5 with Xcode 5.0.2 and OS X 10.9.0, both with Qt 5.2.0
    • macOS
    • e37616bbad5cadf07f6002f02da880c2630154cb

    Description

      Setting the initial directory for the static and non-static member functions of QFileDialog seems to be ignored, for both save and open flavours. Using the non-native dialog works.

      This happens on both OS X 10.8.5 (Mountain Lion) and 10.9.0 (Mavericks - not yet updated to 10.9.1) with the stock Qt 5.2.0 OS X desktop installation (qt-mac-opensource-5.2.0-clang-offline).

      On 10.8.5 I have Xcode 5.0.2 installed, together with the "Command Line Tools". However I realised that qmake now seems to use Clang++ from

      /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++

      (so it seems that the command line tools are no longer necessary for installing/using Qt - nice )

      Clang version:

      Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
      Target: x86_64-apple-darwin12.5.0
      Thread model: posix
      

      How to reproduce:

      • Unzip the attachment
      • cd QFileDialogPredefinedPath
      • qmake; make
      • Launch ./QFileDialogPredefinedPath.app/Contents/MacOS/QFileDialogPredefinedPath
      • With the "Native Dialog" checkbox enabled: try the various Open/Save buttons which invoke the various static/non-static/window modal variants
      • All of them should start in the directory as set in "Directory" (e.g. /Users/tknoll/Documents)
      • BUG: But instead the initial directory is always set to the "current directory" (e.g. the application's directory)
      • Unchecking the "Native Dialog" checkbox and repeating the steps produces the expected results

      Note that I have another application compiled with Qt 4.7.3, and on the same platform (OS X 10.8.5) the native QFileDialog (using the static methods) works as expected. That same application compiled with Qt 5.2.0 shows the same buggy QFileDialog behaviour, as described here.

      Attachments

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

        Activity

          People

            srutledg Shawn Rutledge
            till213 Oliver Knoll
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes