diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/dialogs/qfiledialog_mac.mm | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gui/dialogs/qfiledialog_mac.mm b/src/gui/dialogs/qfiledialog_mac.mm index fb52274..f1d3a4a 100644 --- a/src/gui/dialogs/qfiledialog_mac.mm +++ b/src/gui/dialogs/qfiledialog_mac.mm @@ -305,12 +305,13 @@ QT_USE_NAMESPACE QString qtFileName = QT_PREPEND_NAMESPACE(qt_mac_NSStringToQString)(filename); QFileInfo info(qtFileName.normalized(QT_PREPEND_NAMESPACE(QString::NormalizationForm_C))); QString path = info.absolutePath(); + QString name = info.fileName(); if (path != *mLastFilterCheckPath){ *mLastFilterCheckPath = path; *mQDirFilterEntryList = info.dir().entryList(*mQDirFilter); } // Check if the QDir filter accepts the file: - if (!mQDirFilterEntryList->contains(info.fileName())) + if (!mQDirFilterEntryList->contains(name)) return NO; // No filter means accept everything @@ -318,7 +319,7 @@ QT_USE_NAMESPACE return YES; // Check if the current file name filter accepts the file: for (int i=0; i<mSelectedNameFilter->size(); ++i) { - if (QDir::match(mSelectedNameFilter->at(i), qtFileName)) + if (QDir::match(mSelectedNameFilter->at(i), name)) return YES; } return NO; |