diff --git a/src/plugins/texteditor/syntaxhighlighter.cpp b/src/plugins/texteditor/syntaxhighlighter.cpp index 1c16870d7a6..4585b2bb998 100644 --- a/src/plugins/texteditor/syntaxhighlighter.cpp +++ b/src/plugins/texteditor/syntaxhighlighter.cpp @@ -15,6 +15,8 @@ #include +Q_LOGGING_CATEGORY(Log, "qtc.editor.syntaxhighlighter", QtWarningMsg) + namespace TextEditor { enum HighlighterTypeProperty @@ -208,6 +210,7 @@ void SyntaxHighlighterPrivate::reformatBlocks(int from, int charsRemoved, int ch else if (block.blockNumber() > highlightEndBlock) highlightEndBlock = block.blockNumber(); + qCDebug(Log) << "reformat blocks from:" << from << "to:" << from + charsAdded - charsRemoved; reformatBlocks(); } @@ -222,6 +225,8 @@ void SyntaxHighlighterPrivate::reformatBlocks() foldValidator.reset(); bool forceHighlightOfNextBlock = false; + qCDebug(Log) << "continue reformat blocks start block:" << highlightStartBlock + << "end block:" << highlightEndBlock << "blockCount:" << doc->blockCount(); QTextBlock block = doc->findBlockByNumber(highlightStartBlock); QTC_ASSERT(block.isValid(), block = doc->firstBlock()); QTextBlock endBlock = doc->findBlockByNumber(highlightEndBlock); @@ -256,6 +261,7 @@ void SyntaxHighlighterPrivate::reformatBlocks() } else { highlightEndBlock = 0; highlightStartBlock = INT_MAX; + qCDebug(Log) << "reformat blocks done"; syntaxInfoUpToDate = true; emit q->finished(); }