forked from qt-creator/qt-creator
Clang: Use clang-format for indentation
This is the new experimental plugin based on LibFormat. It replaces the default indenter for CppEditorDocument and applies clang-format after the CR or the set of 'electric' characters. Uses the global .clang-format kept in QtC settings or the one for current project. Both can be configured. For indentation some style modifications and code manipulations are done to prevent line shrinking when it's not expected. Manual indentation uses unmodified style from .clang-format file. Change-Id: I6279b805e418e1804b553efa615f5c843f395a58 Reviewed-by: Marco Bubke <marco.bubke@qt.io>
This commit is contained in:
@@ -290,7 +290,7 @@ static void showError(const QString &error)
|
||||
* Checks the state of @a task and if the formatting was successful calls updateEditorText() with
|
||||
* the respective members of @a task.
|
||||
*/
|
||||
void checkAndApplyTask(const FormatTask &task)
|
||||
static void checkAndApplyTask(const FormatTask &task)
|
||||
{
|
||||
if (!task.error.isEmpty()) {
|
||||
showError(task.error);
|
||||
|
||||
Reference in New Issue
Block a user