summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qplatformdialoghelper.cpp
diff options
context:
space:
mode:
authorTasuku Suzuki <tasuku.suzuki@qbc.io>2019-05-22 15:21:13 +0900
committerTasuku Suzuki <tasuku.suzuki@qbc.io>2019-05-22 22:11:41 +0900
commitec6dc5f78453048c4f0604655a34c6c20c79d819 (patch)
tree11abc64fbcf73b07f86ab090ad145cd6f3faec4a /src/gui/kernel/qplatformdialoghelper.cpp
parent9f77c9152220abb26a4d6a9dfa46fec7f87d60e6 (diff)
Fix gui build without feature.regularexpression
Change-Id: Id27fc81af8d2b0355b186540f41d75a9c8d7c7f3 Reviewed-by: David Faure <david.faure@kdab.com>
Diffstat (limited to 'src/gui/kernel/qplatformdialoghelper.cpp')
-rw-r--r--src/gui/kernel/qplatformdialoghelper.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gui/kernel/qplatformdialoghelper.cpp b/src/gui/kernel/qplatformdialoghelper.cpp
index d14d575056..4bee153489 100644
--- a/src/gui/kernel/qplatformdialoghelper.cpp
+++ b/src/gui/kernel/qplatformdialoghelper.cpp
@@ -41,7 +41,9 @@
#include <QtCore/QCoreApplication>
#include <QtCore/QVariant>
+#if QT_CONFIG(regularexpression)
#include <QtCore/QRegularExpression>
+#endif
#include <QtCore/QSharedData>
#if QT_CONFIG(settings)
#include <QtCore/QSettings>
@@ -786,6 +788,7 @@ const char QPlatformFileDialogHelper::filterRegExp[] =
// Makes a list of filters from a normal filter string "Image Files (*.png *.jpg)"
QStringList QPlatformFileDialogHelper::cleanFilterList(const QString &filter)
{
+#if QT_CONFIG(regularexpression)
QRegularExpression regexp(QString::fromLatin1(filterRegExp));
Q_ASSERT(regexp.isValid());
QString f = filter;
@@ -794,6 +797,9 @@ QStringList QPlatformFileDialogHelper::cleanFilterList(const QString &filter)
if (match.hasMatch())
f = match.captured(2);
return f.split(QLatin1Char(' '), QString::SkipEmptyParts);
+#else
+ return QStringList();
+#endif
}
// Message dialog