aboutsummaryrefslogtreecommitdiff
path: root/lib/util.cpp
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2020-05-29 14:31:57 +0200
committerKitsune Ral <Kitsune-Ral@users.sf.net>2020-06-07 13:48:52 +0200
commit2795c514f283fb274c8e70e81b04be3d02703fe7 (patch)
treeabebf950a862e968e87b3265dd51e07e177f6b0e /lib/util.cpp
parenteccab6df7003bb9c20c48dfe0af57502383ba42e (diff)
downloadlibquotient-2795c514f283fb274c8e70e81b04be3d02703fe7.tar.gz
libquotient-2795c514f283fb274c8e70e81b04be3d02703fe7.zip
util.cpp: drop OptimizeOnFirstUsage option on newer Qt
Qt 5.12+ always optimise QRegularExpression on first usage.
Diffstat (limited to 'lib/util.cpp')
-rw-r--r--lib/util.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/util.cpp b/lib/util.cpp
index 4cbebfe2..61661de8 100644
--- a/lib/util.cpp
+++ b/lib/util.cpp
@@ -28,7 +28,9 @@
static const auto RegExpOptions =
QRegularExpression::CaseInsensitiveOption
- | QRegularExpression::OptimizeOnFirstUsageOption
+#if QT_VERSION < QT_VERSION_CHECK(5, 12, 0)
+ | QRegularExpression::OptimizeOnFirstUsageOption // Default since 5.12
+#endif
| QRegularExpression::UseUnicodePropertiesOption;
// Converts all that looks like a URL into HTML links