summaryrefslogtreecommitdiffstats
path: root/src/corelib/io
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/io')
-rw-r--r--src/corelib/io/qdiriterator.cpp28
1 files changed, 3 insertions, 25 deletions
diff --git a/src/corelib/io/qdiriterator.cpp b/src/corelib/io/qdiriterator.cpp
index 7128435aa4..d77829e9f3 100644
--- a/src/corelib/io/qdiriterator.cpp
+++ b/src/corelib/io/qdiriterator.cpp
@@ -93,9 +93,6 @@
#include "qdir_p.h"
#include "qabstractfileengine_p.h"
-#ifdef QT_BOOTSTRAPPED
-#include <QtCore/qregexp.h>
-#endif
#include <QtCore/qset.h>
#include <QtCore/qstack.h>
#include <QtCore/qvariant.h>
@@ -144,10 +141,7 @@ public:
const QDir::Filters filters;
const QDirIterator::IteratorFlags iteratorFlags;
-#if defined(QT_BOOTSTRAPPED)
- // ### Qt6: Get rid of this once we don't bootstrap qmake anymore
- QVector<QRegExp> nameRegExps;
-#elif QT_CONFIG(regularexpression)
+#if QT_CONFIG(regularexpression)
QVector<QRegularExpression> nameRegExps;
#endif
@@ -173,15 +167,7 @@ QDirIteratorPrivate::QDirIteratorPrivate(const QFileSystemEntry &entry, const QS
, filters(QDir::NoFilter == filters ? QDir::AllEntries : filters)
, iteratorFlags(flags)
{
-#if defined(QT_BOOTSTRAPPED)
- nameRegExps.reserve(nameFilters.size());
- for (const auto &filter : nameFilters) {
- nameRegExps.append(
- QRegExp(filter,
- (filters & QDir::CaseSensitive) ? Qt::CaseSensitive : Qt::CaseInsensitive,
- QRegExp::Wildcard));
- }
-#elif QT_CONFIG(regularexpression)
+#if QT_CONFIG(regularexpression)
nameRegExps.reserve(nameFilters.size());
for (const auto &filter : nameFilters) {
QString re = QRegularExpression::wildcardToRegularExpression(filter);
@@ -352,23 +338,15 @@ bool QDirIteratorPrivate::matchesFilters(const QString &fileName, const QFileInf
return false;
// name filter
-#if QT_CONFIG(regularexpression) || defined(QT_BOOTSTRAPPED)
+#if QT_CONFIG(regularexpression)
// Pass all entries through name filters, except dirs if the AllDirs
if (!nameFilters.isEmpty() && !((filters & QDir::AllDirs) && fi.isDir())) {
bool matched = false;
for (const auto &re : nameRegExps) {
-#if defined(QT_BOOTSTRAPPED)
- QRegExp copy = re;
- if (copy.exactMatch(fileName)) {
- matched = true;
- break;
- }
-#else
if (re.match(fileName).hasMatch()) {
matched = true;
break;
}
-#endif
}
if (!matched)
return false;