diff options
Diffstat (limited to 'src/plugins/platforms/cocoa')
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm b/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm index b53235a0f1..1b414d0771 100644 --- a/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm +++ b/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm @@ -243,8 +243,12 @@ typedef QSharedPointer<QFileDialogOptions> SharedPointerFileDialogOptions; return NO; } - if (!(filter & QDir::Hidden) && fileInfo.isHidden()) - return NO; + // We control the visibility of hidden files via the showsHiddenFiles + // property on the panel, based on QDir::Hidden being set. But the user + // can also toggle this via the Command+Shift+. keyboard shortcut, + // in which case they have explicitly requested to show hidden files, + // and we should enable them even if QDir::Hidden was not set. In + // effect, we don't need to filter on QDir::Hidden here. return YES; } @@ -350,6 +354,8 @@ typedef QSharedPointer<QFileDialogOptions> SharedPointerFileDialogOptions; if (m_panel.allowedFileTypes.count > 2) m_panel.extensionHidden = NO; + m_panel.showsHiddenFiles = m_options->filter().testFlag(QDir::Hidden); + if (m_panel.visible) [m_panel validateVisibleColumns]; } |