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

Audio files with metadata are ignored by FileDialog filter on macOS

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • None
    • 5.5.1, 5.6.3, 5.7.1, 5.8
    • Extras: Mac
    • None
    • OS X 10.11, macOS 10.12
    • macOS
    • 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:

      1. Build the project (I've used it with Kits 5.7.0, 5.6.2 and 5.5.1)
      2. Run the project
      3. Click Open File Dialog
      4. Navigate to folder containing mp3 audio files with metadata (ID3 tags)
      5. All mp3 files should be selectable (enabled)
      6. Type name of any song in the folder
      7. 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;
      

      Attachments

        1. Search results.png
          Search results.png
          67 kB
        2. Normal results.png
          Normal results.png
          67 kB
        3. filedialogfilter.zip
          2 kB

        Activity

          People

            qt.team.graphics.and.multimedia Qt Graphics Team
            pavol.markovic Pavol Markovic
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: