Doc: Add info about Clang Format to "Specifying Code Style Settings"
If the Clang Format plugin is enabled, the settings look totally different than currently described. Updated screenshots. Change-Id: I7b9a458329e539bb6140907a9c4ea9ec6c1acdba Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 14 KiB |
BIN
doc/images/qtcreator-projects-code-style.png
Normal file
After Width: | Height: | Size: 11 KiB |
@@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
\section2 Automatic Formatting and Indentation
|
\section2 Automatic Formatting and Indentation
|
||||||
|
|
||||||
The experimental Clang Format plugin uses the
|
The Clang Format plugin uses the
|
||||||
\l{https://clang.llvm.org/docs/LibFormat.html}{LibFormat}
|
\l{https://clang.llvm.org/docs/LibFormat.html}{LibFormat}
|
||||||
library for automatic formatting and indentation.
|
library for automatic formatting and indentation.
|
||||||
|
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
**
|
**
|
||||||
** Copyright (C) 2018 The Qt Company Ltd.
|
** Copyright (C) 2019 The Qt Company Ltd.
|
||||||
** Contact: https://www.qt.io/licensing/
|
** Contact: https://www.qt.io/licensing/
|
||||||
**
|
**
|
||||||
** This file is part of the Qt Creator documentation.
|
** This file is part of the Qt Creator documentation.
|
||||||
@@ -48,6 +48,16 @@
|
|||||||
switch between them. In addition, you can import and export code style
|
switch between them. In addition, you can import and export code style
|
||||||
settings.
|
settings.
|
||||||
|
|
||||||
|
\image qtcreator-projects-code-style.png "Code Style settings in Projects mode"
|
||||||
|
|
||||||
|
Alternatively, you can enable the Clang Format plugin to enforce
|
||||||
|
the code style specified in a \c {.clang-format} file. It uses the
|
||||||
|
\l{https://clang.llvm.org/docs/LibFormat.html}{LibFormat} library for
|
||||||
|
automatic code formatting and indentation. For more information, see
|
||||||
|
\l {Automatic Formatting and Indentation}.
|
||||||
|
|
||||||
|
\image qtcreator-code-style-clang-format.png "Clang Format Code Style settings in Projects mode"
|
||||||
|
|
||||||
To specify global code style settings sets for C++ files, select
|
To specify global code style settings sets for C++ files, select
|
||||||
\uicontrol {Tools > Options > C++}.
|
\uicontrol {Tools > Options > C++}.
|
||||||
|
|
||||||
|