Files
qt-creator/src/plugins/bazaar/annotationhighlighter.cpp
Jarek Kobus 221d4ad563 BaseAnnotationHighlighter: Get rid of QTextDocument arg from c'tor
It's always nullptr.

Change-Id: Ia392b826f0afe8562b90b916722c374c5244d9aa
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-11-21 15:49:49 +00:00

23 lines
690 B
C++

// Copyright (C) 2016 Hugues Delorme
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include "annotationhighlighter.h"
#include "constants.h"
namespace Bazaar::Internal {
BazaarAnnotationHighlighter::BazaarAnnotationHighlighter(const VcsBase::Annotation &annotation)
: VcsBase::BaseAnnotationHighlighter(annotation)
, m_changeset(QLatin1String(Constants::ANNOTATE_CHANGESET_ID))
{}
QString BazaarAnnotationHighlighter::changeNumber(const QString &block) const
{
const QRegularExpressionMatch match = m_changeset.match(block);
if (match.hasMatch())
return match.captured(1);
return {};
}
} // Bazaar::Internal