Doc: Update info about ClangFormat options

The options are now in a separate tab.

Fixes: QTCREATORBUG-26597
Change-Id: If2d337c132f468897cd71e217205c3db29028f34
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
Leena Miettinen
2022-01-26 18:42:39 +01:00
parent 95595db7d1
commit 8ace5d3895
6 changed files with 12 additions and 13 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View File

@@ -1,6 +1,6 @@
/**************************************************************************** /****************************************************************************
** **
** Copyright (C) 2020 The Qt Company Ltd. ** Copyright (C) 2022 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.
@@ -47,11 +47,14 @@
format file recursively from the directory that contains the source file format file recursively from the directory that contains the source file
up to the file system root. up to the file system root.
To specify settings for automatic formatting and indentation: To specify global settings for automatic formatting and indentation, you
must copy the built-in settings and edit the copy:
\list 1 \list 1
\li Select \uicontrol Tools > \uicontrol Options > \uicontrol {C++}. \li Select \uicontrol Tools > \uicontrol Options > \uicontrol {C++} >
\image qtcreator-clang-format-options.png "C++ Clang Format options" \uicontrol Edit > \uicontrol {Copy Built-in Code Style} >
\uicontrol {ClangFormat}.
\image qtcreator-code-style-clang-format.png "C++ Clang Format options"
\li Select the \uicontrol {Format instead of indenting} check box to \li Select the \uicontrol {Format instead of indenting} check box to
use the \key {Ctrl+I} keyboard shortcut to format code instead of use the \key {Ctrl+I} keyboard shortcut to format code instead of
indenting it. indenting it.
@@ -72,11 +75,10 @@
To override the \c {.clang-format} file for a project, select To override the \c {.clang-format} file for a project, select
\uicontrol Projects > \uicontrol {Project Settings} > \uicontrol Projects > \uicontrol {Project Settings} >
\uicontrol {Code Style} > \uicontrol {Code Style} > \uicontrol Edit >
\uicontrol {Copy Built-in Code Style} > \uicontrol {ClangFormat} >
\uicontrol {Override Clang Format configuration file}. \uicontrol {Override Clang Format configuration file}.
\image qtcreator-code-style-clang-format.png
You can create \c {.clang-format} files that contain the configuration You can create \c {.clang-format} files that contain the configuration
options of a certain predefined style from the command line. For example, options of a certain predefined style from the command line. For example,
to create a format file for the LLVM style, enter the following command: to create a format file for the LLVM style, enter the following command:

View File

@@ -1,6 +1,6 @@
/**************************************************************************** /****************************************************************************
** **
** Copyright (C) 2021 The Qt Company Ltd. ** Copyright (C) 2022 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.
@@ -104,9 +104,6 @@
\list 1 \list 1
\li Select \uicontrol Tools > \uicontrol Options > \uicontrol {C++}. \li Select \uicontrol Tools > \uicontrol Options > \uicontrol {C++}.
\note The settings displayed here depend on which plugins you have
enabled. If the Clang Format plugin is enabled, you'll see the
settings described in \l{Automatic Formatting and Indentation}.
\li In the \uicontrol {Current settings} field, select the settings to \li In the \uicontrol {Current settings} field, select the settings to
modify and click \uicontrol Copy. modify and click \uicontrol Copy.
\image qtcreator-options-code-style-cpp.png "C++ Code Style options" \image qtcreator-options-code-style-cpp.png "C++ Code Style options"

View File

@@ -1,6 +1,6 @@
/**************************************************************************** /****************************************************************************
** **
** Copyright (C) 2020 The Qt Company Ltd. ** Copyright (C) 2022 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.
@@ -176,7 +176,7 @@
\list 1 \list 1
\li Select \uicontrol Tools > \uicontrol Options > \uicontrol C++ > \li Select \uicontrol Tools > \uicontrol Options > \uicontrol C++ >
\uicontrol Clang > \uicontrol {Use clangd (EXPERIMENTAL)}. \uicontrol Clangd > \uicontrol {Use clangd (EXPERIMENTAL)}.
\image qtcreator-options-clangd.png "clangd options" \image qtcreator-options-clangd.png "clangd options"
\li In \uicontrol {Path to executable}, enter the path to clangd \li In \uicontrol {Path to executable}, enter the path to clangd
version 13, or later. version 13, or later.