path: root/src/corelib/io/qdir.h
diff options
authorSamuel Gaist <>2018-07-19 00:21:49 +0200
committerSamuel Gaist <>2018-08-19 04:03:29 +0000
commita2c85bffbeaa027e98fb6c23b2d7919adc8d28b7 (patch)
tree8dcb621ac9f3fbd495ef0f85a1878e6e56edd823 /src/corelib/io/qdir.h
parent3746eb8412ea42d7e3c519926460482530782a75 (diff)
Migrate QDir to use QRegularExpression
The match method still uses QRegExp. This patch updates the code to use QRegularExpression and translates the wildcard patterns to a suitable form for QRegularExpression. [ChangeLog][Core][QDir] QDir now uses QRegularExpression internally for wildcard matching. Note that QRegularExpression might not give the exact same result as QRegExp as its implementation follows strictly the glob patterns definition for wildcard expressions. Nevertheless, the tests for QDir return the same results as before. Change-Id: I095959443ac7362f7534e35454eff038061fca82 Reviewed-by: Ulf Hermann <>
Diffstat (limited to 'src/corelib/io/qdir.h')
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/io/qdir.h b/src/corelib/io/qdir.h
index 950a26f327..45c59d9e1d 100644
--- a/src/corelib/io/qdir.h
+++ b/src/corelib/io/qdir.h
@@ -206,7 +206,7 @@ public:
static inline QDir temp() { return QDir(tempPath()); }
static QString tempPath();
-#ifndef QT_NO_REGEXP
+#if QT_CONFIG(regularexpression)
static bool match(const QStringList &filters, const QString &fileName);
static bool match(const QString &filter, const QString &fileName);