diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2019-06-06 15:35:06 +0200 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2019-06-06 19:00:41 +0200 |
commit | 2a302a73613d68475e667f69b8e36ce07853c813 (patch) | |
tree | 06de55baaed993b51af517dba8f230fab749882c /src/corelib/mimetypes | |
parent | 5505d25be972948db1621e1511b89b4144aa8bfc (diff) | |
parent | dea7110b29c5c68a5b09454c968324042ed1b607 (diff) |
Merge remote-tracking branch 'origin/dev' into wip/qt6
Change-Id: Iac12a37fa6536ebe30e6548f7c54ec0c402c9f5d
Diffstat (limited to 'src/corelib/mimetypes')
-rw-r--r-- | src/corelib/mimetypes/qmimeglobpattern.cpp | 6 | ||||
-rw-r--r-- | src/corelib/mimetypes/qmimeprovider.cpp | 2 |
2 files changed, 7 insertions, 1 deletions
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 <QRegularExpression> +#endif #include <QStringList> #include <QDebug> @@ -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) diff --git a/src/corelib/mimetypes/qmimeprovider.cpp b/src/corelib/mimetypes/qmimeprovider.cpp index 7e2696b719..a3a6b9615c 100644 --- a/src/corelib/mimetypes/qmimeprovider.cpp +++ b/src/corelib/mimetypes/qmimeprovider.cpp @@ -673,7 +673,7 @@ void QMimeXMLProvider::load(const QString &fileName) { QString errorMessage; if (!load(fileName, &errorMessage)) - qWarning("QMimeDatabase: Error loading %s\n%s", qPrintable(fileName), qPrintable(errorMessage)); + qWarning("QMimeDatabase: Error loading %ls\n%ls", qUtf16Printable(fileName), qUtf16Printable(errorMessage)); } bool QMimeXMLProvider::load(const QString &fileName, QString *errorMessage) |