diff options
author | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2020-01-15 23:00:58 +0100 |
---|---|---|
committer | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2020-01-17 01:53:12 +0100 |
commit | 800dda19a611339863aa5cfe6da13bc235d68e68 (patch) | |
tree | 84e13308856b5bf9fc01a26a0d9ced65c6ac7956 /src/corelib/io/qdiriterator.cpp | |
parent | 6faaef5a665f86465d616f20b5effd2ba650cee7 (diff) |
Do not anchor an already-anchored regexp
wildcardToRegularExpression() returns an anchored regexp, so it is
pointless to anchor it again.
Change-Id: If470179d63ae7ca2e7f137c0f403ec5bb5be8aaf
Task-number: QTBUG-81396
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Diffstat (limited to 'src/corelib/io/qdiriterator.cpp')
-rw-r--r-- | src/corelib/io/qdiriterator.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/io/qdiriterator.cpp b/src/corelib/io/qdiriterator.cpp index ce436b06e3..1cf6b1be08 100644 --- a/src/corelib/io/qdiriterator.cpp +++ b/src/corelib/io/qdiriterator.cpp @@ -181,7 +181,7 @@ QDirIteratorPrivate::QDirIteratorPrivate(const QFileSystemEntry &entry, const QS #elif QT_CONFIG(regularexpression) nameRegExps.reserve(nameFilters.size()); for (const auto &filter : nameFilters) { - QString re = QRegularExpression::anchoredPattern(QRegularExpression::wildcardToRegularExpression(filter)); + QString re = QRegularExpression::wildcardToRegularExpression(filter); nameRegExps.append( QRegularExpression(re, (filters & QDir::CaseSensitive) ? QRegularExpression::NoPatternOption : QRegularExpression::CaseInsensitiveOption)); } |