Details
-
Bug
-
Resolution: Incomplete
-
P3: Somewhat important
-
None
-
5.5.0 RC, 5.5.0
-
None
-
OS X 10.10
Description
On Mac OSX Yosemite there are some cases where the initial folder ('dir' parameter) passed to the QFileDialog::getOpenFileName is ignored and the initial folder is set to Documents independently on the initial dir passed to the function. I managed to reproduce the problem only when the view as columns is set on the Finder and when more than one filter is passed in the 'filter' parameter.
Attached is a small example to reproduce the issue. Please follow this steps to reproduce the problem:
- uncompress the attached project and cd into it
- compile the project
qmake openfile.pro make
- from a terminal launch the executable
./openfile.app/Contents/MacOS/openfile
this way the working directory is set to the one where the executable is launched from. That folder contains 2 directories (dir1 and dir2) needed for testing
- click on the open button, make sure the view as columns is set on the Finder (3rd icon in the type of views). The initial directory is set to ./dir1 and it works the first time you open the dialog.
- select the file in dir2/test2.foo and open it. The next initial directory is now set to ./dir2.
- Click the open button again, the dialog starts on Documents folder now even if the initial dir is set to ./dir2.
As I already said, I noticed the problem when the view as columns is selected in the Finder and more than one filter is passed to the QFileDialog::getOpenFileName (I could not reproduce the problem if the filter has only one line or none). The initial directory is properly working first time it is passed to the QFileDialog::getOpenFileName, but it does not work anymore the moment the QFileDialog::getOpenFileName is called with a new initial directory
This problem is happening only on OS X 10.10 Yosemite.