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

QFileDialog::HideNameFilterDetails breaks Cocoa QFileDIalog filter

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 4.7.1
    • 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.

      Attachments

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

        Activity

          People

            richard Richard Moe Gustavsen
            refnum Dair Grant
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes