From 116d5224e9409c4ed9b914a92b9d5ca9675fb357 Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Wed, 20 Nov 2024 12:19:53 +0100 Subject: Plugins M-V: Make static QRegularExpression instances static const Change-Id: I291e61ac30786dfceda330d3dc73352da719c7d0 Reviewed-by: hjk --- src/plugins/nim/project/nimtoolchain.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/plugins/nim') diff --git a/src/plugins/nim/project/nimtoolchain.cpp b/src/plugins/nim/project/nimtoolchain.cpp index d333e618537..e083ae5b172 100644 --- a/src/plugins/nim/project/nimtoolchain.cpp +++ b/src/plugins/nim/project/nimtoolchain.cpp @@ -107,7 +107,7 @@ bool NimToolchain::parseVersion(const FilePath &path, std::tuple const QString version = process.readAllStandardOutput().section('\n', 0, 0); if (version.isEmpty()) return false; - const QRegularExpression regex("(\\d+)\\.(\\d+)\\.(\\d+)"); + static const QRegularExpression regex("(\\d+)\\.(\\d+)\\.(\\d+)"); const QRegularExpressionMatch match = regex.match(version); if (!match.hasMatch()) return false; -- cgit v1.2.3