diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2022-12-01 15:08:47 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2022-12-02 12:47:53 +0100 |
commit | 1ce71d77409bf8ea962444b59b9e5e7b5b98b188 (patch) | |
tree | f2fc74e92a789dcacb01d69cc3da2eb86681d767 /src/qdoc/cppcodemarker.cpp | |
parent | 11c9f677a9880bb0456d7796dfd2518b1396add3 (diff) | |
download | qttools-1ce71d77409bf8ea962444b59b9e5e7b5b98b188.tar.gz |
qdoc: Fix clang warnings about temporary QRegularExpression objects
Pick-to: 6.4
Change-Id: I0d6c597552103251a8c09418d83ea2e38ed10012
Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io>
Reviewed-by: Luca Di Sera <luca.disera@qt.io>
Diffstat (limited to 'src/qdoc/cppcodemarker.cpp')
-rw-r--r-- | src/qdoc/cppcodemarker.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
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 = [&]() { |