Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
None
-
5.5.1, 5.6.3, 5.7.1, 5.8
-
None
-
OS X 10.11, macOS 10.12
-
-
I2fded712d4e7098eb444331d92e38cee71655100
Description
When using File dialog (Qt, QML) with specified nameFilters on OS X, the dialog disables (greys out) files not matching the filters, e.g.:
FileDialog {
nameFilters: ["MP3 (*.mp3)"]
}
When using Search field in macOS file dialog to search for files, resulted list of files displays meta-data name instead of filenames if the file contains metadata.
Since OS X 10.11 the search results are incorrectly disabled (greyed-out) even if the file matches the specified File dialog name filter.
I've attached sample project.
Steps to reproduce:
- Build the project (I've used it with Kits 5.7.0, 5.6.2 and 5.5.1)
- Run the project
- Click Open File Dialog
- Navigate to folder containing mp3 audio files with metadata (ID3 tags)
- All mp3 files should be selectable (enabled)
- Type name of any song in the folder
- File dialog should narrow search results only to those matching the name
Expected results:
All mp3 files matching the name containing meta-data should be enabled.
Actual results:
All mp3 files matching the name containing meta-data are disabled.
This is known issue outside Qt and is caused by use of deprecated method of NSOpenSavePanelDelegate:
- (BOOL)panel:(id)sender shouldShowFilename:(NSString *)filename
A replacement method should be used:
- (BOOL)panel:(id)sender shouldEnableURL:(NSURL *)url;