ClangFormat: Lower the file size threshold

E.g. cppquickfix_test.cpp in Qt Creator is ~260KB, and editing it is
quite sluggish with ClangFormat enabled.

Change-Id: Ifa0db8198b8c15fd03571176b9e94f046da3e44d
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
This commit is contained in:
Christian Kandeler
2023-10-04 13:33:00 +02:00
parent 9af8ecd935
commit 70f4d9bda0
2 changed files with 3 additions and 2 deletions

View File

@@ -25,7 +25,8 @@ ClangFormatSettings::ClangFormatSettings()
m_overrideDefaultFile = settings->value(Constants::OVERRIDE_FILE_ID, false).toBool();
m_formatWhileTyping = settings->value(Constants::FORMAT_WHILE_TYPING_ID, false).toBool();
m_formatOnSave = settings->value(Constants::FORMAT_CODE_ON_SAVE_ID, false).toBool();
m_fileSizeThreshold = settings->value(Constants::FILE_SIZE_THREDSHOLD, 1024).toInt();
m_fileSizeThreshold = settings->value(Constants::FILE_SIZE_THREDSHOLD,
m_fileSizeThreshold).toInt();
// Convert old settings to new ones. New settings were added to QtC 8.0
bool isOldFormattingOn = settings->value(FORMAT_CODE_INSTEAD_OF_INDENT_ID, false).toBool();