diff --git a/doc/qtcreator/images/qtcreator-clang-format-options.png b/doc/qtcreator/images/qtcreator-clang-format-options.png deleted file mode 100644 index 57b151ea78b..00000000000 Binary files a/doc/qtcreator/images/qtcreator-clang-format-options.png and /dev/null differ diff --git a/doc/qtcreator/images/qtcreator-code-style-clang-format.png b/doc/qtcreator/images/qtcreator-code-style-clang-format.png index 8ecce2a9608..5eea378da21 100644 Binary files a/doc/qtcreator/images/qtcreator-code-style-clang-format.png and b/doc/qtcreator/images/qtcreator-code-style-clang-format.png differ diff --git a/doc/qtcreator/images/qtcreator-code-style-settings-edit-cpp.png b/doc/qtcreator/images/qtcreator-code-style-settings-edit-cpp.png index fccc6b6b849..ed4afb14728 100644 Binary files a/doc/qtcreator/images/qtcreator-code-style-settings-edit-cpp.png and b/doc/qtcreator/images/qtcreator-code-style-settings-edit-cpp.png differ diff --git a/doc/qtcreator/src/editors/creator-clangformat.qdocinc b/doc/qtcreator/src/editors/creator-clangformat.qdocinc index 9b7ef41d0ad..c7e3e370af9 100644 --- a/doc/qtcreator/src/editors/creator-clangformat.qdocinc +++ b/doc/qtcreator/src/editors/creator-clangformat.qdocinc @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2020 The Qt Company Ltd. +** Copyright (C) 2022 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Creator documentation. @@ -47,11 +47,14 @@ format file recursively from the directory that contains the source file 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 - \li Select \uicontrol Tools > \uicontrol Options > \uicontrol {C++}. - \image qtcreator-clang-format-options.png "C++ Clang Format options" + \li Select \uicontrol Tools > \uicontrol Options > \uicontrol {C++} > + \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 use the \key {Ctrl+I} keyboard shortcut to format code instead of indenting it. @@ -72,11 +75,10 @@ To override the \c {.clang-format} file for a project, select \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}. - \image qtcreator-code-style-clang-format.png - You can create \c {.clang-format} files that contain the configuration 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: diff --git a/doc/qtcreator/src/editors/creator-code-indentation.qdoc b/doc/qtcreator/src/editors/creator-code-indentation.qdoc index 09afcca6b5e..e9ef596caf7 100644 --- a/doc/qtcreator/src/editors/creator-code-indentation.qdoc +++ b/doc/qtcreator/src/editors/creator-code-indentation.qdoc @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2021 The Qt Company Ltd. +** Copyright (C) 2022 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Creator documentation. @@ -104,9 +104,6 @@ \list 1 \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 modify and click \uicontrol Copy. \image qtcreator-options-code-style-cpp.png "C++ Code Style options" diff --git a/doc/qtcreator/src/editors/creator-only/creator-clang-codemodel.qdoc b/doc/qtcreator/src/editors/creator-only/creator-clang-codemodel.qdoc index 34f8cc28ba2..0480cdeed66 100644 --- a/doc/qtcreator/src/editors/creator-only/creator-clang-codemodel.qdoc +++ b/doc/qtcreator/src/editors/creator-only/creator-clang-codemodel.qdoc @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2020 The Qt Company Ltd. +** Copyright (C) 2022 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Creator documentation. @@ -176,7 +176,7 @@ \list 1 \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" \li In \uicontrol {Path to executable}, enter the path to clangd version 13, or later.