forked from qt-creator/qt-creator
Bazaar: Replace QRegExp
Task-number: QTCREATORBUG-24098 Change-Id: I450d5756359596495f501759670970c9c541d4d9 Reviewed-by: Hugues Delorme <delorme.hugues@fougue.pro>
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user