TextEditor: Add some logging for code folding

Change-Id: I95f6c1b370d458602d9d97e36b21d61c1d261e59
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Christian Kandeler
2024-06-18 15:29:57 +02:00
parent c57d70e242
commit c3d28861da
4 changed files with 20 additions and 1 deletions

View File

@@ -10,6 +10,7 @@
#include "tabsettings.h"
#include "textdocumentlayout.h"
#include "texteditor.h"
#include "texteditorconstants.h"
#include "texteditorsettings.h"
#include "texteditortr.h"
#include "textindenter.h"
@@ -573,6 +574,9 @@ void TextDocument::setIfdefedOutBlocks(const QList<BlockRange> &blocks)
}
if (braceDepthDelta) {
qCDebug(Internal::foldingLog)
<< "changing brace depth and folding indent by" << braceDepthDelta << "for line"
<< (block.blockNumber() + 1) << "due to ifdefed out code";
TextDocumentLayout::changeBraceDepth(block,braceDepthDelta);
TextDocumentLayout::changeFoldingIndent(block, braceDepthDelta); // ### C++ only, refactor!
}