diff options
author | hjk <hjk@qt.io> | 2020-06-23 16:36:59 +0200 |
---|---|---|
committer | hjk <hjk@qt.io> | 2020-06-24 05:47:26 +0000 |
commit | a6fe2efd4e7409c99c2adc5e0911a540b86ae81e (patch) | |
tree | 5a1bf4c6879392a8896e704f23dd08ef7d2e134b /src/plugins/bazaar/annotationhighlighter.cpp | |
parent | f7242cdce946693aafc030c673b17fda46dc3d01 (diff) |
Bazaar: Replace QRegExp
Task-number: QTCREATORBUG-24098
Change-Id: I450d5756359596495f501759670970c9c541d4d9
Reviewed-by: Hugues Delorme <delorme.hugues@fougue.pro>
Diffstat (limited to 'src/plugins/bazaar/annotationhighlighter.cpp')
-rw-r--r-- | src/plugins/bazaar/annotationhighlighter.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/plugins/bazaar/annotationhighlighter.cpp b/src/plugins/bazaar/annotationhighlighter.cpp index 5980470a6f0..2fcebe0b1f5 100644 --- a/src/plugins/bazaar/annotationhighlighter.cpp +++ b/src/plugins/bazaar/annotationhighlighter.cpp @@ -26,6 +26,8 @@ #include "annotationhighlighter.h" #include "constants.h" +#include <QRegularExpression> + using namespace Bazaar::Internal; using namespace Bazaar; @@ -37,7 +39,8 @@ BazaarAnnotationHighlighter::BazaarAnnotationHighlighter(const ChangeNumbers &ch QString BazaarAnnotationHighlighter::changeNumber(const QString &block) const { - if (m_changeset.indexIn(block) != -1) - return m_changeset.cap(1); + const QRegularExpressionMatch match = m_changeset.match(block); + if (match.hasMatch()) + return match.captured(1); return QString(); } |