diff --git a/doc/qtcreator/images/qtcreator-clang-code-model-options.png b/doc/qtcreator/images/qtcreator-clang-code-model-options.png index 126f393c5d2..7bc9edcafdf 100644 Binary files a/doc/qtcreator/images/qtcreator-clang-code-model-options.png and b/doc/qtcreator/images/qtcreator-clang-code-model-options.png differ diff --git a/doc/qtcreator/images/qtcreator-code-style-clang-format.png b/doc/qtcreator/images/qtcreator-code-style-clang-format.png index 27fac40e5fa..66d7fb782f1 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 ed4afb14728..33c5953d303 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/images/qtcreator-code-style-settings-edit-qtquick.png b/doc/qtcreator/images/qtcreator-code-style-settings-edit-qtquick.png index e0f5e44e7c9..34473e4bd89 100644 Binary files a/doc/qtcreator/images/qtcreator-code-style-settings-edit-qtquick.png and b/doc/qtcreator/images/qtcreator-code-style-settings-edit-qtquick.png differ diff --git a/doc/qtcreator/images/qtcreator-options-clangd.png b/doc/qtcreator/images/qtcreator-options-clangd.png index b03a9e4d70d..a4251e7be8f 100644 Binary files a/doc/qtcreator/images/qtcreator-options-clangd.png and b/doc/qtcreator/images/qtcreator-options-clangd.png differ diff --git a/doc/qtcreator/images/qtcreator-projects-code-style.png b/doc/qtcreator/images/qtcreator-projects-code-style.png index 6063a2c211d..f29aab6ab3e 100644 Binary files a/doc/qtcreator/images/qtcreator-projects-code-style.png and b/doc/qtcreator/images/qtcreator-projects-code-style.png differ diff --git a/doc/qtcreator/src/analyze/creator-clang-static-analyzer.qdoc b/doc/qtcreator/src/analyze/creator-clang-static-analyzer.qdoc index 473977c2b6d..673b9096b39 100644 --- a/doc/qtcreator/src/analyze/creator-clang-static-analyzer.qdoc +++ b/doc/qtcreator/src/analyze/creator-clang-static-analyzer.qdoc @@ -132,10 +132,14 @@ to run in parallel to make the analysis faster on multi-core processors. - \li In the \uicontrol {Diagnostic Configuration} group, select - \uicontrol Manage to create or edit a custom configuration. + \li The \uicontrol {Diagnostic configuration} field shows the + checks to perform. Click the value of the field to open the + \uicontrol {Diagnostic Configurations} dialog, where you can + select and edit the checks to perform. - \li Select \uicontrol Copy to create a custom Clang configuration. + \image qtcreator-clang-tools-diagnostics-configuration.png "Diagnostics Configuration dialog" + + \li Select \uicontrol Copy to copy the selected diagnostics for editing. \image qtcreator-clang-copy-diagnostic-configuration.png "Copy Diagnostic Configuration dialog" @@ -148,8 +152,6 @@ system to the Clang code model for displaying annotations in the code editor. - \image qtcreator-clang-tools-diagnostics-configuration.png "Diagnostics Configuration dialog" - \li In the \uicontrol {Clang-Tidy Checks} tab, select \uicontrol {Select Checks} to select the checks to perform. To filter the checks, enter a string in the diff --git a/doc/qtcreator/src/editors/creator-code-syntax.qdoc b/doc/qtcreator/src/editors/creator-code-syntax.qdoc index ddd90d8139a..ae86067e9f8 100644 --- a/doc/qtcreator/src/editors/creator-code-syntax.qdoc +++ b/doc/qtcreator/src/editors/creator-code-syntax.qdoc @@ -716,4 +716,23 @@ \uicontrol {Enable auto format on file save}. \image qtcreator-qml-js-editing.png "QML/JS Editing preferences" + + \if defined(qtcreator) + \section1 Inspecting Preprocessed C++ Code + + To analyze the causes of compile errors or errors caused by wrong includes + pulled in by dependencies or C++ macros expanding to something unexpected, + select \uicontrol {Show Preprocessed Source} in the editor context menu. + + This action expands all C++ macros to their actual code and removes code that + is guarded by a currently inactive \c {#ifdef} statements. If you deselect + the \uicontrol {Use built-in preprocessor to show pre-processed files} check + box in \uicontrol Edit > \uicontrol Preferences > \uicontrol C++ > + \uicontrol {Code Model}, this action also expands all + \c {"#include "} statements to their actual contents. + + \image qtcreator-clang-code-model-options.png "C++ Code Model preferences" + + \endif + */ 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 a95639febf4..d01eb5455ee 100644 --- a/doc/qtcreator/src/editors/creator-only/creator-clang-codemodel.qdoc +++ b/doc/qtcreator/src/editors/creator-only/creator-clang-codemodel.qdoc @@ -114,6 +114,14 @@ \li To process precompiled headers, deselect the \uicontrol {Ignore precompiled headers} check box. + \li When you select \uicontrol {Show Preprocessed Source} in the code + editor context menu, the built-in preprocessor is used to show the + pre-processed source file in the editor. To invoke the actual + compiler for showing the code, deselect the + \uicontrol {Use built-in preprocessor to show pre-processed files} + check box. For more information, see + \l {Inspecting Preprocessed C++ Code}. + \li To avoid out-of-memory crashes caused by indexing huge source files that are typically auto-generated by scripts or code, the size of files to index is limited to 5MB by default. To adjust the limit, @@ -132,6 +140,11 @@ re-scanning is incremental, so nothing is lost by closing and re-starting \QC. + By default, \QC runs one clangd process per project. If you have created + \l{Managing Sessions}{sessions} that contain related projects, you can + specify that the projects in the session should be managed by a single + clangd process. + The document outline in the \l{Viewing Defined Types and Symbols} {Outline} view is backed by clangd's document symbol support, which makes the results more reliable than before. @@ -144,11 +157,11 @@ \image qtcreator-options-clangd.png "clangd preferences" \li In \uicontrol {Path to executable}, enter the path to clangd version 14, or later. - \li For more accurate results during global symbol searches, select - \uicontrol {Enable background indexing}. However, this increases the - CPU load the first time you open the project. If clangd background - indexing is disabled, \QC falls back to a faster, but less accurate - built-in indexer. + \li In the \uicontrol {Background indexing} field, select \uicontrol Off + to use a faster, but less accurate built-in indexer than the one used + by default. You can set the indexing priority depending on whether + the accuracy of results or speed is more important to you during + global symbol searches. \li By default, clangd attempts to use all unused cores. You can set a fixed number of cores to use in \uicontrol {Worker thread count}. Background indexing also uses this many worker threads. @@ -164,10 +177,12 @@ \li Select \uicontrol {Ignore files greater than} to make parsing faster by ignoring big files. Specify the maximum size of files to parse in the field next to the check box. - \li The \uicontrol {Diagnostic Configuration} field shows the Clang + \li The \uicontrol {Diagnostic configuration} field shows the Clang checks to perform. Click the value of the field to open the \uicontrol {Diagnostic Configurations} dialog, where you can select and edit the checks to perform. + \li Select \uicontrol Add to select sessions that should use a single + clangd process for indexing. \endlist \section1 Clang Checks diff --git a/doc/qtcreator/src/projects/creator-only/creator-projects-settings-code-style.qdoc b/doc/qtcreator/src/projects/creator-only/creator-projects-settings-code-style.qdoc index 58b2ddcc14e..1a57d2bdb9a 100644 --- a/doc/qtcreator/src/projects/creator-only/creator-projects-settings-code-style.qdoc +++ b/doc/qtcreator/src/projects/creator-only/creator-projects-settings-code-style.qdoc @@ -38,9 +38,15 @@ To specify global code style settings sets for C++ files, select \uicontrol Edit > \uicontrol Preferences > \uicontrol C++. + \image qtcreator-code-style-settings-edit-cpp.png "Edit Code Style Settings dialog" + To specify global code style settings sets for QML files, select \uicontrol Edit > \uicontrol Preferences > \uicontrol {Qt Quick}. + \image qtcreator-code-style-settings-edit-qtquick.png "Edit Code Style Settings view" + + Only \uicontrol General settings are available for QML files. + To configure the editor behavior for the current project: \list 1 @@ -58,12 +64,6 @@ \li Click \uicontrol Edit to specify code style settings for the project. - \image qtcreator-code-style-settings-edit-cpp.png "Edit Code Style Settings dialog" - - \note Only \uicontrol General settings are available for QML files. - - \image qtcreator-code-style-settings-edit-qtquick.png "Edit Code Style Settings view" - \endlist For more information about the settings, see \l{Indenting Text or Code}.