aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/texteditor/generichighlighter/highlighter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/texteditor/generichighlighter/highlighter.cpp')
-rw-r--r--src/plugins/texteditor/generichighlighter/highlighter.cpp14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/plugins/texteditor/generichighlighter/highlighter.cpp b/src/plugins/texteditor/generichighlighter/highlighter.cpp
index 3476a637b2..f7004e878c 100644
--- a/src/plugins/texteditor/generichighlighter/highlighter.cpp
+++ b/src/plugins/texteditor/generichighlighter/highlighter.cpp
@@ -62,7 +62,7 @@ public:
m_continueObservableState(-1)
{}
- ~HighlighterCodeFormatterData() {}
+ ~HighlighterCodeFormatterData() override {}
int m_foldingIndentDelta;
int m_originalObservableState;
QStack<QString> m_foldingRegions;
@@ -71,7 +71,7 @@ public:
HighlighterCodeFormatterData *formatterData(const QTextBlock &block)
{
- HighlighterCodeFormatterData *data = 0;
+ HighlighterCodeFormatterData *data = nullptr;
if (TextBlockUserData *userData = TextDocumentLayout::userData(block)) {
data = static_cast<HighlighterCodeFormatterData *>(userData->codeFormatterData());
if (!data) {
@@ -127,13 +127,7 @@ static TextStyle styleForFormat(int format)
}
Highlighter::Highlighter(QTextDocument *parent) :
- SyntaxHighlighter(parent),
- m_regionDepth(0),
- m_indentationBasedFolding(false),
- m_tabSettings(0),
- m_persistentObservableStatesCounter(PersistentsStart),
- m_dynamicContextsCounter(0),
- m_isBroken(false)
+ SyntaxHighlighter(parent)
{
setTextFormatCategories(TextFormatIdCount, styleForFormat);
}
@@ -217,7 +211,7 @@ void Highlighter::highlightBlock(const QString &text)
handleContextChange(m_currentContext->lineBeginContext(),
m_currentContext->definition());
- ProgressData *progress = new ProgressData;
+ auto progress = new ProgressData;
const int length = text.length();
while (progress->offset() < length)
iterateThroughRules(text, length, progress, false, m_currentContext->rules());