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/qmlcodemarker.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/qmlcodemarker.cpp')
-rw-r--r-- | src/qdoc/qmlcodemarker.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qdoc/qmlcodemarker.cpp b/src/qdoc/qmlcodemarker.cpp index 1475d2083..3ad787c93 100644 --- a/src/qdoc/qmlcodemarker.cpp +++ b/src/qdoc/qmlcodemarker.cpp @@ -27,7 +27,7 @@ bool QmlCodeMarker::recognizeCode(const QString &code) { #ifndef QT_NO_DECLARATIVE // Naive pre-check; starts with an import statement or 'CamelCase {' - QRegularExpression regExp(QStringLiteral("^\\s*(import |([A-Z][a-z0-9]*)+\\s?{)")); + static const QRegularExpression regExp(QStringLiteral("^\\s*(import |([A-Z][a-z0-9]*)+\\s?{)")); if (!regExp.match(code).hasMatch()) return false; |