Details
-
Bug
-
Resolution: Done
-
P2: Important
-
4.6.3
-
None
-
Mac OS X 10.6.4, Qt/Cocoa 4.6.3
-
0e4a9ab0f60faff3bde86cb7f08250161c18103e
Description
Setting the QFileDialog::HideNameFilterDetails option on a QFileDIalog prevents the Cocoa QFileDialog from accepting files (this may affect other implementations as well).
QNSOpenSavePanelDelegate:shouldShowFilename is called by Cocoa to determine which file names should be accepted. This iterates over mSelectedNameFilter, passing each one to QDir::match to determine if they match.
However when QFileDialog::HideNameFilterDetails is set, file extensions have been stripped from mSelectedNameFilter and so no files ever match.
This can be seen by setting a filter of "Image Files (*.jpg)". mSelectedNameFilter will then contain two items ("Image" and "Files"), neither of which will match any of the files passed to shouldShowFilename.