summaryrefslogtreecommitdiffstats
path: root/src/widgets/dialogs
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/dialogs')
-rw-r--r--src/widgets/dialogs/qfilesystemmodel.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/widgets/dialogs/qfilesystemmodel.cpp b/src/widgets/dialogs/qfilesystemmodel.cpp
index 6afdfa6eb9..30d1324248 100644
--- a/src/widgets/dialogs/qfilesystemmodel.cpp
+++ b/src/widgets/dialogs/qfilesystemmodel.cpp
@@ -2148,12 +2148,10 @@ bool QFileSystemModelPrivate::passNameFilters(const QFileSystemNode *node) const
// Check the name regularexpression filters
if (!(node->isDir() && (filters & QDir::AllDirs))) {
- const QRegularExpression::PatternOptions options =
- (filters & QDir::CaseSensitive) ? QRegularExpression::NoPatternOption
- : QRegularExpression::CaseInsensitiveOption;
+ auto cs = (filters & QDir::CaseSensitive) ? Qt::CaseSensitive : Qt::CaseInsensitive;
for (const auto &nameFilter : nameFilters) {
- QRegularExpression rx(QRegularExpression::wildcardToRegularExpression(nameFilter), options);
+ auto rx = QRegularExpression::fromWildcard(nameFilter, cs);
QRegularExpressionMatch match = rx.match(node->fileName);
if (match.hasMatch())
return true;