From c034544767965be3e66b25b46fa9378e43e60395 Mon Sep 17 00:00:00 2001 From: Tasuku Suzuki Date: Wed, 22 May 2019 14:04:11 +0900 Subject: [PATCH] Fix corelib build without feature.regularexpression Change-Id: I208d6cb7f57a74873fae3a36fe094a92d287c2f0 Reviewed-by: David Faure --- src/corelib/mimetypes/qmimeglobpattern.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/corelib/mimetypes/qmimeglobpattern.cpp b/src/corelib/mimetypes/qmimeglobpattern.cpp index e353ba10cc..ad78cd9ffa 100644 --- a/src/corelib/mimetypes/qmimeglobpattern.cpp +++ b/src/corelib/mimetypes/qmimeglobpattern.cpp @@ -39,7 +39,9 @@ #include "qmimeglobpattern_p.h" +#if QT_CONFIG(regularexpression) #include +#endif #include #include @@ -142,8 +144,12 @@ bool QMimeGlobPattern::matchFileName(const QString &inputFilename) const return (m_pattern == filename); // Other (quite rare) patterns, like "*.anim[1-9j]": use slow but correct method +#if QT_CONFIG(regularexpression) QRegularExpression rx(QRegularExpression::wildcardToRegularExpression(m_pattern)); return rx.match(filename).hasMatch(); +#else + return false; +#endif } static bool isFastPattern(const QString &pattern)