summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeena Miettinen <riitta-leena.miettinen@qt.io>2016-12-06 10:51:26 +0100
committerLeena Miettinen <riitta-leena.miettinen@qt.io>2016-12-06 16:15:05 +0000
commitfb147ef27b4acc39de41fd738d295abf00fbe58e (patch)
tree86c4f444133848407ce3e284a02f34852d7b9479
parent5d95c50bd912c7c6053688894acc2d8f3355479d (diff)
downloadqt-creator-fb147ef27b4acc39de41fd738d295abf00fbe58e.tar.gz
Doc: Update info on Beautifier options
Clang Format options differ somewhat from the Artistic Style and Uncrustify options. Also, the "Format entire file if no text was selected" is enabled by default and also applies to Uncrustify. Change-Id: I19d6badbd71275a185894e8c5dff96826d378afb Reviewed-by: Lorenz Haas <lorenz.haas@histomatics.de> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
-rw-r--r--doc/src/editors/creator-beautifier.qdoc28
1 files changed, 20 insertions, 8 deletions
diff --git a/doc/src/editors/creator-beautifier.qdoc b/doc/src/editors/creator-beautifier.qdoc
index 1ac074ce24..308aaf40a8 100644
--- a/doc/src/editors/creator-beautifier.qdoc
+++ b/doc/src/editors/creator-beautifier.qdoc
@@ -106,24 +106,37 @@
\li In the \uicontrol Options group, select the configuration file that
defines the style to use in the source files. If you select several
- options, they are applied from top down.
+ options, they are applied from top down. The available options
+ depend on the tool.
\list
\li Select the \uicontrol {Use file defined in project files}
option to use the configuration file defined in the qmake
DISTFILES variable as the configuration file for the
- selected tool.
+ selected tool. This option is available for Artistic Style
+ and Uncrustify.
\li Select the \uicontrol {Use file in $HOME} option to use the
specified file in the user's home directory as the
- configuration file for the selected tool.
+ configuration file for the selected tool. This option is
+ available for Artistic Style and Uncrustify.
+
+ \li For Clang Format, you can use a predefined style, by
+ selecting the \uicontrol {Use predefined style} radio
+ button, and then selecting the style to use from the list of
+ available styles.
+
+ Select \uicontrol File to load the style configuration from
+ the \c .clang-format or \c _clang-format file located in the
+ same directory as the source file or in one of its parent
+ directories.
\li Select the \uicontrol {Use customized style} option, and
then \uicontrol Add to define your own style.
Define code formatting in the
- \uicontrol {Edit Configuration} dialog. It provides syntax
+ \uicontrol {Add Configuration} dialog. It provides syntax
highlighting, auto-completion, and context-sensitive help.
For these features, you must have the tool installed.
@@ -143,8 +156,7 @@
In addition to the \uicontrol {Format Current File} command, ClangFormat
and Uncrustify provide the \uicontrol {Format Selected Text} command. If you
- select it when no text is selected, nothing happens. To format the entire
- file in this case when using Clang, select the
- \uicontrol {Format entire file if no text was selected} check box in the
- \uicontrol {Clang Format} options.
+ select it when no text is selected, the whole file is formatted by default.
+ To disable this behavior, deselect the
+ \uicontrol {Format entire file if no text was selected} check box.
*/