From 2795c514f283fb274c8e70e81b04be3d02703fe7 Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Fri, 29 May 2020 14:31:57 +0200 Subject: util.cpp: drop OptimizeOnFirstUsage option on newer Qt Qt 5.12+ always optimise QRegularExpression on first usage. --- lib/util.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib') 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 -- cgit v1.2.3