SyntaxHighlighter: Make setChangeNumbers private function

Made setChangeNumbers private function in BaseAnnotationHighlighter
and remove usage in other places.
Moved annotationChanges to BaseAnnotationHighlighterPrivate from
VcsBaseEditorWidget.
This was done to move all instances of TextEditor::SyntaxHighlighter.
In this regards only the public API of TextEditor::SyntaxHighlighter
should be available from children and no other additional functions.

Change-Id: Ibece9476a810e13c8722839820d5c575b0808f03
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
Artem Sokolovskii
2023-05-19 13:03:01 +02:00
parent 6910408f35
commit 84275809b4
28 changed files with 156 additions and 79 deletions

View File

@@ -4,15 +4,13 @@
#include "annotationhighlighter.h"
#include "constants.h"
#include <QRegularExpression>
namespace Bazaar::Internal {
BazaarAnnotationHighlighter::BazaarAnnotationHighlighter(const ChangeNumbers &changeNumbers,
BazaarAnnotationHighlighter::BazaarAnnotationHighlighter(const VcsBase::Annotation &annotation,
QTextDocument *document)
: VcsBase::BaseAnnotationHighlighter(changeNumbers, document),
m_changeset(QLatin1String(Constants::ANNOTATE_CHANGESET_ID))
{ }
: VcsBase::BaseAnnotationHighlighter(annotation, document)
, m_changeset(QLatin1String(Constants::ANNOTATE_CHANGESET_ID))
{}
QString BazaarAnnotationHighlighter::changeNumber(const QString &block) const
{