From 1ce71d77409bf8ea962444b59b9e5e7b5b98b188 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Thu, 1 Dec 2022 15:08:47 +0100 Subject: qdoc: Fix clang warnings about temporary QRegularExpression objects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Pick-to: 6.4 Change-Id: I0d6c597552103251a8c09418d83ea2e38ed10012 Reviewed-by: Topi Reiniƶ Reviewed-by: Luca Di Sera --- src/qdoc/cppcodemarker.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/qdoc/cppcodemarker.cpp') diff --git a/src/qdoc/cppcodemarker.cpp b/src/qdoc/cppcodemarker.cpp index 647fb4b8f..7d4e8c4ed 100644 --- a/src/qdoc/cppcodemarker.cpp +++ b/src/qdoc/cppcodemarker.cpp @@ -387,9 +387,9 @@ QString CppCodeMarker::addMarkUp(const QString &in, const Node * /* relative */, int start = 0; int finish = 0; QChar ch; - QRegularExpression classRegExp(QRegularExpression::anchoredPattern("Qt?(?:[A-Z3]+[a-z][A-Za-z]*|t)")); - QRegularExpression functionRegExp(QRegularExpression::anchoredPattern("q([A-Z][a-z]+)+")); - QRegularExpression findFunctionRegExp(QStringLiteral("^\\s*\\(")); + static const QRegularExpression classRegExp(QRegularExpression::anchoredPattern("Qt?(?:[A-Z3]+[a-z][A-Za-z]*|t)")); + static const QRegularExpression functionRegExp(QRegularExpression::anchoredPattern("q([A-Z][a-z]+)+")); + static const QRegularExpression findFunctionRegExp(QStringLiteral("^\\s*\\(")); bool atEOF = false; auto readChar = [&]() { -- cgit v1.2.1