DiffAndLogHighlighter Class | Extending Qt Creator Manual

Extending Qt Creator Manual | DiffAndLogHighlighter

Extending Qt Creator Manual 4.5.1

# DiffAndLogHighlighter Class

(VcsBase::DiffAndLogHighlighter)

The DiffAndLogHighlighter class provides a highlighter for diffs and log editors. More...

Header: | #include <DiffAndLogHighlighter>
Inherits: | TextEditor::SyntaxHighlighter

- List of all members, including inherited members

## Public Functions

| DiffAndLogHighlighter(const QRegExp &filePattern, const QRegExp &changePattern)
| ~DiffAndLogHighlighter() override

## Reimplemented Public Functions

virtual void | highlightBlock(const QString &text) override
virtual void | setFontSettings(const TextEditor::FontSettings &fontSettings) override

- 5 public functions inherited from TextEditor::SyntaxHighlighter

### Additional Inherited Members

- 2 public slots inherited from TextEditor::SyntaxHighlighter
- 1 static public member inherited from TextEditor::SyntaxHighlighter
- 16 protected functions inherited from TextEditor::SyntaxHighlighter

## Detailed Description

The DiffAndLogHighlighter class provides a highlighter for diffs and log editors.

Diff is parametrizable by the file indicator, which is for example '^====' in case of p4:

      ==== //depot/research/main/qdynamicmainwindow3/qdynamicdockwidgetlayout_p.h#34 (text) ====

Or '--- a/|'+++ b/' in case of git:

      diff --git a/src/plugins/plugins.pro b/src/plugins/plugins.pro
      index 9401ee7..ef35c3b 100644
      --- a/src/plugins/plugins.pro
      +++ b/src/plugins/plugins.pro
      @@ -10,6 +10,7 @@ SUBDIRS   = plugin_coreplugin

Log is parametrizable by change indicator. For example '^commit ([0-9a-f]{8})[0-9a-f]{32}' in Git:

## Member Function Documentation

### DiffAndLogHighlighter::DiffAndLogHighlighter(const QRegExp &filePattern, const QRegExp &changePattern)

Default constructs an instance of DiffAndLogHighlighter.

### DiffAndLogHighlighter::~DiffAndLogHighlighter()

Destroys the instance of DiffAndLogHighlighter.

### `[override virtual]` void DiffAndLogHighlighter::highlightBlock(const QString &text)

### `[override virtual]` void DiffAndLogHighlighter::setFontSettings(const TextEditor::FontSettings &fontSettings)