diff --git a/.github/workflows/build_cmake.yml b/.github/workflows/build_cmake.yml index 416223c75af..d866f1f6d70 100644 --- a/.github/workflows/build_cmake.yml +++ b/.github/workflows/build_cmake.yml @@ -7,7 +7,7 @@ on: - 'doc/**' env: - QT_VERSION: 6.5.2 + QT_VERSION: 6.6.0 MACOS_DEPLOYMENT_TARGET: 10.15 CLANG_VERSION: 17.0.1 ELFUTILS_VERSION: 0.175 @@ -201,7 +201,7 @@ jobs: set(url_os "linux_x64") set(qt_package_arch_suffix "gcc_64") set(qt_dir_prefix "${qt_version}/gcc_64") - set(qt_package_suffix "-Linux-RHEL_8_4-GCC-Linux-RHEL_8_4-X86_64") + set(qt_package_suffix "-Linux-RHEL_8_6-GCC-Linux-RHEL_8_6-X86_64") elseif ("${{ runner.os }}" STREQUAL "macOS") set(url_os "mac_x64") set(qt_package_arch_suffix "clang_64") diff --git a/coin/instructions/common_environment.yaml b/coin/instructions/common_environment.yaml index ea72589c1df..0f651d187a8 100644 --- a/coin/instructions/common_environment.yaml +++ b/coin/instructions/common_environment.yaml @@ -10,7 +10,7 @@ instructions: variableValue: https://ci-files02-hki.ci.qt.io/packages/jenkins/qtcreator_libclang/libclang-release_17.0.1-based - type: EnvironmentVariable variableName: QTC_QT_BASE_URL - variableValue: "https://ci-files02-hki.ci.qt.io/packages/jenkins/archive/qt/6.5/6.5.2-released/Qt" + variableValue: "https://ci-files02-hki.ci.qt.io/packages/jenkins/archive/qt/6.6/6.6.0-released/Qt" - type: EnvironmentVariable variableName: QTC_QT_MODULES variableValue: "qt5compat qtbase qtdeclarative qtimageformats qtquick3d qtquickcontrols2 qtquicktimeline qtserialport qtshadertools qtsvg qttools qttranslations qtwebengine" @@ -39,7 +39,7 @@ instructions: instructions: - type: EnvironmentVariable variableName: QTC_QT_POSTFIX - variableValue: "-Linux-RHEL_8_4-GCC-Linux-RHEL_8_4-X86_64.7z" + variableValue: "-Linux-RHEL_8_6-GCC-Linux-RHEL_8_6-X86_64.7z" - type: EnvironmentVariable variableName: QTC_SDKTOOL_QT_EXT variableValue: ".tar.xz" diff --git a/dist/changelog/changes-12.0.0.md b/dist/changelog/changes-12.0.0.md index 0c5f7d211e6..8ab1abf9cc2 100644 --- a/dist/changelog/changes-12.0.0.md +++ b/dist/changelog/changes-12.0.0.md @@ -66,9 +66,11 @@ General `Edit > Preferences > Environment > Locator` to keep the sorting from the tool used for the file system index locator filter ([QTCREATORBUG-27789](https://bugreports.qt.io/browse/QTCREATORBUG-27789)) -* Added the `View > Show Menubar` option to hide the menu bar on platforms + ([Documentation](https://doc-snapshots.qt.io/qtcreator-12.0/creator-editor-locator.html#locating-files-from-global-file-system-index)) +* Added the `View > Show Menu Bar` option to hide the menu bar on platforms without a unified menu bar ([QTCREATORBUG-29498](https://bugreports.qt.io/browse/QTCREATORBUG-29498)) + ([Documentation](https://doc-snapshots.qt.io/qtcreator-12.0/creator-how-to-show-and-hide-main-menu.html)) * Fixed an issue with growing session files Help @@ -77,13 +79,17 @@ Help * Added the `Edit > Preferences > Help > General > Antialias` check box for setting the anti-aliasing of text ([QTCREATORBUG-12177](https://bugreports.qt.io/browse/QTCREATORBUG-12177)) + ([Documentation](https://doc-snapshots.qt.io/qtcreator-12.0/creator-how-to-get-help.html#change-the-font)) Editing ------- * Added the count of selected characters to line and column information + on the `Edit` mode toolbar ([QTCREATORBUG-29381](https://bugreports.qt.io/browse/QTCREATORBUG-29381)) + ([Documentation](https://doc-snapshots.qt.io/qtcreator-12.0/creator-coding-navigating.html#navigating-between-open-files-and-symbols)) * Added an indenter, auto-brace and auto-quote for JSON + ([Documentation](https://doc-snapshots.qt.io/qtcreator-12.0/creator-enclose-code-in-characters.html)) * Fixed that the historical order of open documents was not restored * Fixed that suggestions were rendered with the wrong tab size ([QTCREATORBUG-29483](https://bugreports.qt.io/browse/QTCREATORBUG-29483)) @@ -93,11 +99,15 @@ Editing * Updated to LLVM 17.0.1 * Added `Tools > C++ > Fold All Comment Blocks` and `Unfold All Comment Blocks` ([QTCREATORBUG-2449](https://bugreports.qt.io/browse/QTCREATORBUG-2449)) -* Added a refactoring action for converting comments between C++-style and + ([Documentation](https://doc-snapshots.qt.io/qtcreator-12.0/creator-highlighting.html#folding-blocks)) +* Added the `Convert Comment to C Style` and `Convert Comment to C++ Style` + refactoring actions for converting comments between C++-style and C-style ([QTCREATORBUG-27501](https://bugreports.qt.io/browse/QTCREATORBUG-27501)) -* Added a refactoring action for moving documentation between function - declaration and definition + ([Documentation](https://doc-snapshots.qt.io/qtcreator-12.0/creator-editor-quick-fixes.html#refactoring-c-code)) +* Added the `Move Function Documentation to Declaration` and + `Move Function Documentation to Definition` refactoring actions for moving + documentation between function declaration and definition ([QTCREATORBUG-13877](https://bugreports.qt.io/browse/QTCREATORBUG-13877)) * Extended the application of renaming operations to documentation comments ([QTCREATORBUG-12051](https://bugreports.qt.io/browse/QTCREATORBUG-12051), @@ -130,13 +140,15 @@ Editing ### Language Server Protocol -* Added support for Language servers that request creating, renaming or deleting of files +* Added support for Language servers that request creating, renaming, or deleting + of files ([QTCREATORBUG-29542](https://bugreports.qt.io/browse/QTCREATORBUG-29542)) ### Copilot * Added support for proxies ([QTCREATORBUG-29485](https://bugreports.qt.io/browse/QTCREATORBUG-29485)) + ([Documentation](https://doc-snapshots.qt.io/qtcreator-12.0/creator-copilot.html)) ### TODO @@ -145,6 +157,7 @@ Editing ### Markdown * Added buttons and configurable shortcuts for text styles + ([Documentation](https://doc-snapshots.qt.io/qtcreator-12.0/creator-markdown-editor.html)) ### Images @@ -159,7 +172,9 @@ Projects * Project specific settings * Added C++ file naming settings ([QTCREATORBUG-22033](https://bugreports.qt.io/browse/QTCREATORBUG-22033)) + ([Documentation](https://doc-snapshots.qt.io/qtcreator-12.0/creator-how-to-set-cpp-file-naming.html)) * Added documentation comment settings + ([Documentation](https://doc-snapshots.qt.io/qtcreator-12.0/creator-how-to-document-code.html)) * Added an option for the Doxygen command prefix ([QTCREATORBUG-8096](https://bugreports.qt.io/browse/QTCREATORBUG-8096)) * Improved performance of filtering the target setup page diff --git a/doc/config/macros.qdocconf b/doc/config/macros.qdocconf index f806b1dff18..f881062d136 100644 --- a/doc/config/macros.qdocconf +++ b/doc/config/macros.qdocconf @@ -39,6 +39,7 @@ macro.QOI = "Qt Online Installer" macro.QMT = "Qt Maintenance Tool" macro.qtcversion = $QTC_VERSION macro.param = "\\e" +macro.preferences = "\\l{Find preferences}{Preferences}" macro.raisedaster.HTML = "*" macro.rarrow.HTML = "→" macro.reg.HTML = "®" diff --git a/doc/qtcreator/images/qtcreator-markdown-editor.webp b/doc/qtcreator/images/qtcreator-markdown-editor.webp index 0943d90fb3b..37debd47c7c 100644 Binary files a/doc/qtcreator/images/qtcreator-markdown-editor.webp and b/doc/qtcreator/images/qtcreator-markdown-editor.webp differ diff --git a/doc/qtcreator/images/qtcreator-options-clangd.png b/doc/qtcreator/images/qtcreator-options-clangd.png deleted file mode 100644 index a4251e7be8f..00000000000 Binary files a/doc/qtcreator/images/qtcreator-options-clangd.png and /dev/null differ diff --git a/doc/qtcreator/images/qtcreator-preferences-clangd.webp b/doc/qtcreator/images/qtcreator-preferences-clangd.webp new file mode 100644 index 00000000000..6d363c02f93 Binary files /dev/null and b/doc/qtcreator/images/qtcreator-preferences-clangd.webp differ diff --git a/doc/qtcreator/images/qtcreator-preferences-copilot.webp b/doc/qtcreator/images/qtcreator-preferences-copilot.webp index b98f74e43df..48df99f87b1 100644 Binary files a/doc/qtcreator/images/qtcreator-preferences-copilot.webp and b/doc/qtcreator/images/qtcreator-preferences-copilot.webp differ diff --git a/doc/qtcreator/images/qtcreator-preferences-environment-interface.webp b/doc/qtcreator/images/qtcreator-preferences-environment-interface.webp index d6d5098bc63..a03cb3d5794 100644 Binary files a/doc/qtcreator/images/qtcreator-preferences-environment-interface.webp and b/doc/qtcreator/images/qtcreator-preferences-environment-interface.webp differ diff --git a/doc/qtcreator/images/qtcreator-projects-settings-cpp-file-naming.webp b/doc/qtcreator/images/qtcreator-projects-settings-cpp-file-naming.webp new file mode 100644 index 00000000000..9e222cc6e91 Binary files /dev/null and b/doc/qtcreator/images/qtcreator-projects-settings-cpp-file-naming.webp differ diff --git a/doc/qtcreator/src/analyze/cpu-usage-analyzer.qdoc b/doc/qtcreator/src/analyze/cpu-usage-analyzer.qdoc index ddcdd551ca4..07dd1128a17 100644 --- a/doc/qtcreator/src/analyze/cpu-usage-analyzer.qdoc +++ b/doc/qtcreator/src/analyze/cpu-usage-analyzer.qdoc @@ -104,7 +104,7 @@ \section1 Specifying Performance Analyzer Settings To specify global settings for the Performance Analyzer, select - \uicontrol Edit > \uicontrol Preferences > \uicontrol Analyzer > + \preferences > \uicontrol Analyzer > \uicontrol {CPU Usage}. For each run configuration, you can also use specialized settings. Select \uicontrol Projects > \uicontrol Run, and then select \uicontrol Details next to diff --git a/doc/qtcreator/src/analyze/creator-axivion.qdoc b/doc/qtcreator/src/analyze/creator-axivion.qdoc index 244991c7834..610fee09b3f 100644 --- a/doc/qtcreator/src/analyze/creator-axivion.qdoc +++ b/doc/qtcreator/src/analyze/creator-axivion.qdoc @@ -59,7 +59,7 @@ To connect to Axivion: \list 1 - \li Select \uicontrol Edit > \uicontrol Preferences > \uicontrol Axivion. + \li Select \preferences > \uicontrol Axivion. \image qtcreator-preferences-axivion.webp {General tab in Axivion Preferences} \li Select \uicontrol Edit to create a connection to the Axivion dashboard server. diff --git a/doc/qtcreator/src/analyze/creator-clang-static-analyzer.qdoc b/doc/qtcreator/src/analyze/creator-clang-static-analyzer.qdoc index 06f5e6275b7..ea2f73b844d 100644 --- a/doc/qtcreator/src/analyze/creator-clang-static-analyzer.qdoc +++ b/doc/qtcreator/src/analyze/creator-clang-static-analyzer.qdoc @@ -111,7 +111,7 @@ \list 1 - \li Select \uicontrol Edit > \uicontrol Preferences > \uicontrol Analyzer > + \li Select \preferences > \uicontrol Analyzer > \uicontrol {Clang Tools}. \image qtcreator-clang-tools-options.png {Clang Tools preferences} diff --git a/doc/qtcreator/src/analyze/creator-coco.qdoc b/doc/qtcreator/src/analyze/creator-coco.qdoc index 0818e9a5b92..b95c1901fb8 100644 --- a/doc/qtcreator/src/analyze/creator-coco.qdoc +++ b/doc/qtcreator/src/analyze/creator-coco.qdoc @@ -75,8 +75,8 @@ \section1 Changing Fonts and Colors - To change the default fonts and colors, select \uicontrol Edit > - \uicontrol Preferences > \uicontrol {Text Editor} > \uicontrol {Font & Colors}. + To change the default fonts and colors, select \preferences > + \uicontrol {Text Editor} > \uicontrol {Font & Colors}. Create your own color scheme and select new fonts and colors for the following results: diff --git a/doc/qtcreator/src/analyze/creator-cppcheck.qdoc b/doc/qtcreator/src/analyze/creator-cppcheck.qdoc index a77c8dfe7f9..324f747da47 100644 --- a/doc/qtcreator/src/analyze/creator-cppcheck.qdoc +++ b/doc/qtcreator/src/analyze/creator-cppcheck.qdoc @@ -72,6 +72,6 @@ marks or annotations. To specify the settings above for the automatically run checks, - select \uicontrol Edit > \uicontrol Preferences > \uicontrol Analyzer + select \preferences > \uicontrol Analyzer > \uicontrol Cppcheck. */ diff --git a/doc/qtcreator/src/analyze/creator-heob.qdoc b/doc/qtcreator/src/analyze/creator-heob.qdoc index 3fbd2d62285..449d3cc86ab 100644 --- a/doc/qtcreator/src/analyze/creator-heob.qdoc +++ b/doc/qtcreator/src/analyze/creator-heob.qdoc @@ -92,7 +92,7 @@ In the \uicontrol {Handle exceptions} list, select \uicontrol Off to use the standard exception handler and have the debugger automatically attached if the application crashes. This works only if you register \QC is as a - post-mortem debugger by selecting \uicontrol Edit > \uicontrol Preferences > + post-mortem debugger by selecting \preferences > \uicontrol Debugger > \uicontrol General > \uicontrol {Use Qt Creator for post-mortem debugging}. diff --git a/doc/qtcreator/src/analyze/creator-valgrind-overview.qdoc b/doc/qtcreator/src/analyze/creator-valgrind-overview.qdoc index 9a2f914648f..bd3d21f7516 100644 --- a/doc/qtcreator/src/analyze/creator-valgrind-overview.qdoc +++ b/doc/qtcreator/src/analyze/creator-valgrind-overview.qdoc @@ -36,8 +36,8 @@ For more information about analyzing applications for which you do not have a project, see \l{Running Valgrind Tools on External Applications}. - To set preferences for the Valgrind tools, select \uicontrol Edit > - \uicontrol Preferences > \uicontrol Analyzer. You can override the general + To set preferences for the Valgrind tools, select \preferences > + \uicontrol Analyzer. You can override the general settings for each project in the \uicontrol {Run Settings} for the project. The following sections describe how to use the Valgrind tools: diff --git a/doc/qtcreator/src/analyze/creator-valgrind.qdoc b/doc/qtcreator/src/analyze/creator-valgrind.qdoc index 9ccfa45c409..537f1acfea6 100644 --- a/doc/qtcreator/src/analyze/creator-valgrind.qdoc +++ b/doc/qtcreator/src/analyze/creator-valgrind.qdoc @@ -81,18 +81,17 @@ separately for each project in the \l{Specifying Run Settings}{run settings} of the project. - To specify global settings for Valgrind, select \uicontrol Edit > - \uicontrol Preferences > \uicontrol Analyzer. The \uicontrol - {Memcheck Memory Analysis Options} group has Memcheck options. + To specify global settings for Valgrind, select \preferences > + \uicontrol Analyzer. The \uicontrol {Memcheck Memory Analysis Options} + group has Memcheck options. In \uicontrol {Extra Memcheck arguments}, specify additional arguments for launching the executable. Stack traces can get quite large and confusing, and therefore, reading them from the bottom up can help. If the stack trace is not big enough or it is - too big, select \uicontrol Edit > \uicontrol Preferences > \uicontrol Analyzer - and define the length of the stack trace in the - \uicontrol {Backtrace frame count} field. + too big, select \preferences > \uicontrol Analyzer and define the length of + the stack trace in the \uicontrol {Backtrace frame count} field. \image qtcreator-valgrind-memcheck-options.png "Memory Analysis options" @@ -268,9 +267,9 @@ separately for each project in the \l{Specifying Run Settings}{run settings} of the project. - To specify global settings for Valgrind, select \uicontrol Edit > - \uicontrol Preferences > \uicontrol Analyzer. The \uicontrol - {Callgrind Profiling Options} group has Callgrind options. + To specify global settings for Valgrind, select \preferences > + \uicontrol Analyzer. The \uicontrol {Callgrind Profiling Options} + group has Callgrind options. \image qtcreator-valgrind-callgrind-options.png "Valgrind options" diff --git a/doc/qtcreator/src/android/androiddev.qdoc b/doc/qtcreator/src/android/androiddev.qdoc index d16d9a31fd3..c16c80d4e70 100644 --- a/doc/qtcreator/src/android/androiddev.qdoc +++ b/doc/qtcreator/src/android/androiddev.qdoc @@ -55,10 +55,7 @@ To set up the development environment for Android: \list 1 - \li Select \uicontrol Edit > \uicontrol Preferences > \uicontrol Devices > - \uicontrol Android on Windows and Linux or \uicontrol {\QC} > - \uicontrol Preferences > \uicontrol Devices > \uicontrol Android on - \macos. + \li Select \preferences > \uicontrol Devices > \uicontrol Android. \image qtcreator-options-android-main.png {Android preferences} \li In the \uicontrol {JDK location} field, set the path to the JDK. \QC checks the JDK installation and reports errors. @@ -142,10 +139,8 @@ \section2 Managing Android NDK Packages - To view the installed \l{Android NDK} versions, select \uicontrol Edit > - \uicontrol Preferences > \uicontrol Devices > \uicontrol Android on Windows and - Linux or \uicontrol {\QC} > \uicontrol Preferences > \uicontrol Devices > - \uicontrol Android on \macos. + To view the installed \l{Android NDK} versions, select \preferences > + \uicontrol Devices > \uicontrol Android. \image qtcreator-options-android-sdk-tools.png {Android NDK and SDK checks} @@ -172,11 +167,8 @@ installing, updating, and removing SDK packages. You can still use \c sdkmanager for advanced SDK management. - To view the installed Android SDK packages, select \uicontrol Edit > - \uicontrol Preferences > \uicontrol Devices > \uicontrol Android > - \uicontrol {SDK Manager} on Windows and Linux or \uicontrol {\QC} > - \uicontrol Preferences > \uicontrol Devices > \uicontrol Android > - \uicontrol {SDK Manager} on \macos. + To view the installed Android SDK packages, select \preferences > + \uicontrol Devices > \uicontrol Android > \uicontrol {SDK Manager}. \image qtcreator-android-sdk-manager.webp {Android SDK Manager} @@ -200,10 +192,8 @@ \section1 Managing Android Virtual Devices (AVD) - To view the available AVDs, select \uicontrol Edit > \uicontrol Preferences - > \uicontrol Devices on Windows and Linux or \uicontrol {\QC} > - \uicontrol Preferences > \uicontrol Devices > on \macos. You can add more - AVDs. + To view the available AVDs, select \preferences > \uicontrol Devices. + You can add more AVDs. \image qtcreator-android-avd-manager.png {Android device in Devices} @@ -239,10 +229,8 @@ To create new virtual devices: \list 1 - \li Select \uicontrol Edit > \uicontrol Preferences > \uicontrol Devices > - \uicontrol Add > \uicontrol {Android Device} on Windows and Linux - or \uicontrol {\QC} > \uicontrol Preferences > \uicontrol Devices > - \uicontrol Add > \uicontrol {Android Device} on \macos to open the + \li Select \preferences > \uicontrol Devices > + \uicontrol Add > \uicontrol {Android Device} to open the \uicontrol {Create New AVD} dialog. \image qtcreator-android-create-avd.png {Create New AVD dialog} \li Set the name, definition, architecture, target API level, and diff --git a/doc/qtcreator/src/baremetal/creator-baremetal-dev.qdoc b/doc/qtcreator/src/baremetal/creator-baremetal-dev.qdoc index 45740b650dc..d49d947ff34 100644 --- a/doc/qtcreator/src/baremetal/creator-baremetal-dev.qdoc +++ b/doc/qtcreator/src/baremetal/creator-baremetal-dev.qdoc @@ -70,7 +70,7 @@ \section1 Specifying Settings for Debug Server Providers To create connections to bare metal devices using a debug server provider, - select \uicontrol Edit > \uicontrol Preferences > \uicontrol Devices + select \preferences > \uicontrol Devices > \uicontrol {Bare Metal} > \uicontrol Add > \uicontrol Default. The available settings depend on the debug server provider. @@ -251,7 +251,7 @@ \list 1 - \li Select \uicontrol Edit > \uicontrol Preferences > \uicontrol Devices + \li Select \preferences > \uicontrol Devices > \uicontrol Add > \uicontrol {Bare Metal Device} > \uicontrol {Start Wizard}. @@ -265,7 +265,7 @@ \section1 Building for and Running on Bare Metal Devices To add a kit for building applications and running them on bare metal - devices, select \uicontrol Edit > \uicontrol Preferences > \uicontrol Kits + devices, select \preferences > \uicontrol Kits > \uicontrol Add. For more information, see \l{Add kits}. \image qtcreator-baremetal-kit.png "Kit preferences for Bare Metal" diff --git a/doc/qtcreator/src/cmake/creator-projects-cmake-building.qdoc b/doc/qtcreator/src/cmake/creator-projects-cmake-building.qdoc index 2c302e5fcc5..2ef8d2e107c 100644 --- a/doc/qtcreator/src/cmake/creator-projects-cmake-building.qdoc +++ b/doc/qtcreator/src/cmake/creator-projects-cmake-building.qdoc @@ -137,9 +137,8 @@ To view all variables, select the \uicontrol Advanced check box. - To view all variables by default, select \uicontrol Edit > - \uicontrol Preferences > \uicontrol CMake > \uicontrol General > - \uicontrol {Show advanced options by default}. + To view all variables by default, select \preferences > \uicontrol CMake > + \uicontrol General > \uicontrol {Show advanced options by default}. \image qtcreator-preferences-cmake-general.webp "General tab in CMake Preferences" @@ -152,8 +151,8 @@ stored in the CMakeLists.txt.user file, so deleting a build directory does not delete the initial configuration. - To be asked before \QC resets the changes, select \uicontrol Edit > - \uicontrol Preferences > \uicontrol CMake > \uicontrol General > + To be asked before \QC resets the changes, select \preferences > + \uicontrol CMake > \uicontrol General > \uicontrol {Ask before re-configuring with initial parameters}. \section1 Viewing CMake Output @@ -230,7 +229,7 @@ \QC can automatically set up the \l {Setting Up Conan} {Conan package manager} for use with CMake. - Select \uicontrol Edit > \uicontrol Preferences > \uicontrol CMake + Select \preferences > \uicontrol CMake \uicontrol General > \uicontrol {Package manager auto setup} to set the value of the \c CMAKE_PROJECT_INCLUDE_BEFORE variable to the path to a CMake script that installs dependencies from a \c conanfile.txt, diff --git a/doc/qtcreator/src/cmake/creator-projects-cmake-presets.qdoc b/doc/qtcreator/src/cmake/creator-projects-cmake-presets.qdoc index 12b5d61ba7b..3a51034199e 100644 --- a/doc/qtcreator/src/cmake/creator-projects-cmake-presets.qdoc +++ b/doc/qtcreator/src/cmake/creator-projects-cmake-presets.qdoc @@ -141,7 +141,7 @@ \endcode This example assumes that the CMake executable path is set in - \uicontrol Edit > \uicontrol Preferences > \uicontrol CMake > + \preferences > \uicontrol CMake > \uicontrol Tools. \section1 MSVC Example diff --git a/doc/qtcreator/src/cmake/creator-projects-cmake.qdoc b/doc/qtcreator/src/cmake/creator-projects-cmake.qdoc index 4491afb9d72..999d58c67bc 100644 --- a/doc/qtcreator/src/cmake/creator-projects-cmake.qdoc +++ b/doc/qtcreator/src/cmake/creator-projects-cmake.qdoc @@ -39,9 +39,8 @@ \QC automatically runs CMake to refresh project information when you edit a \c CMakeLists.txt configuration file in a project. Project information is also automatically refreshed when you build the project. To disable this - behavior, select \uicontrol Edit > \uicontrol Preferences > \uicontrol CMake - > \uicontrol General, and then deselect the \uicontrol {Autorun CMake} - check box. + behavior, select \preferences > \uicontrol CMake > \uicontrol General, and + then deselect the \uicontrol {Autorun CMake} check box. \image qtcreator-projects-view-edit.png {CMake project in Projects view} @@ -54,8 +53,8 @@ The \uicontrol Projects view shows the names of the subfolders where the source files are located. To hide the subfolder names and arrange the files - only according to their source group, select \uicontrol Edit > - \uicontrol Preferences > \uicontrol CMake > \uicontrol General, and then + only according to their source group, select \preferences > + \uicontrol CMake > \uicontrol General, and then deselect the \uicontrol {Show subfolders inside source group folders} check box. The change takes effect after you select \uicontrol Build > \uicontrol {Run CMake}. @@ -89,8 +88,7 @@ \list 1 - \li Select \uicontrol Edit > \uicontrol Preferences > \uicontrol CMake > - \uicontrol Tools. + \li Select \preferences > \uicontrol CMake > \uicontrol Tools. \image qtcreator-preferences-cmake-tools.webp {Tools tab in CMake Preferences} @@ -118,8 +116,8 @@ To remove the selected CMake executable from the list, select \uicontrol Remove. - To add the CMake tool to a build and run kit, select \uicontrol Edit > - \uicontrol Preferences > \uicontrol Kits. + To add the CMake tool to a build and run kit, select \preferences > + \uicontrol Kits. The kit also specifies the CMake generator that is used for producing project files for \QC and the initial configuration parameters: @@ -169,8 +167,7 @@ To automatically format CMake files upon file save: \list 1 - \li Select \uicontrol Edit > \uicontrol Preferences > \uicontrol CMake > - \uicontrol Formatter. + \li Select \preferences > \uicontrol CMake > \uicontrol Formatter. \image qtcreator-preferences-cmake-formatter.webp {Formatter tab in CMake Preferences} \li In \uicontrol {CMakeFormat command}, enter the path to \c {cmake-format.exe}. diff --git a/doc/qtcreator/src/debugger/creator-debug-views.qdoc b/doc/qtcreator/src/debugger/creator-debug-views.qdoc index 8dfed8b2212..149ac127a8c 100644 --- a/doc/qtcreator/src/debugger/creator-debug-views.qdoc +++ b/doc/qtcreator/src/debugger/creator-debug-views.qdoc @@ -218,9 +218,8 @@ \if defined(qtcreator) \section1 Specifying Breakpoint Settings - You can specify settings for breakpoints in \uicontrol Edit > - \uicontrol Preferences > \uicontrol Debugger. For more information, - see \l{Debugger Preferences}. + You can specify settings for breakpoints in \preferences > + \uicontrol Debugger. For more information, see \l{Debugger Preferences}. \image qtcreator-debugger-general-options.png {General tab in Debugger preferences} diff --git a/doc/qtcreator/src/debugger/creator-only/creator-debugger-settings.qdoc b/doc/qtcreator/src/debugger/creator-only/creator-debugger-settings.qdoc index ab0aff0f548..06b8d05bc52 100644 --- a/doc/qtcreator/src/debugger/creator-only/creator-debugger-settings.qdoc +++ b/doc/qtcreator/src/debugger/creator-only/creator-debugger-settings.qdoc @@ -8,9 +8,9 @@ \title Debugger Preferences - To specify settings for managing debugger processes, select \uicontrol Edit - > \uicontrol Preferences > \uicontrol Debugger. In the \uicontrol General tab, - you can specify settings that are common to all debuggers. + To specify settings for managing debugger processes, select \preferences > + \uicontrol Debugger. In the \uicontrol General tab,you can specify settings + that are common to all debuggers. \image qtcreator-debugger-general-options.png "Debugger General preferences" @@ -50,8 +50,8 @@ \section1 Specifying GDB Settings - To specify settings for managing the GDB process, select \uicontrol Edit > - \uicontrol Preferences > \uicontrol Debugger > \uicontrol GDB. + To specify settings for managing the GDB process, select \preferences > + \uicontrol Debugger > \uicontrol GDB. \image qtcreator-gdb-options.png "GDB preferences" @@ -136,8 +136,8 @@ \section1 Specifying CDB Settings - To specify settings for managing the CDB process, select \uicontrol Edit > - \uicontrol Preferences > \uicontrol Debugger > \uicontrol CDB. + To specify settings for managing the CDB process, select \preferences > + \uicontrol Debugger > \uicontrol CDB. \image qtcreator-cdb-options.png "CDB preferences" @@ -187,8 +187,7 @@ to the symbol search path of the debugger: \list 1 - \li Select \uicontrol Edit > \uicontrol Preferences > \uicontrol Debugger > - \uicontrol {CDB Paths}. + \li Select \preferences > \uicontrol Debugger > \uicontrol {CDB Paths}. \image qtcreator-debugger-cdb-paths.png \li In the \uicontrol {Symbol Paths} group, select \uicontrol Insert. \li Select the directory where you want to store the cached information. diff --git a/doc/qtcreator/src/debugger/creator-only/creator-debugger-setup.qdoc b/doc/qtcreator/src/debugger/creator-only/creator-debugger-setup.qdoc index 3de58c59ebc..39fd8013715 100644 --- a/doc/qtcreator/src/debugger/creator-only/creator-debugger-setup.qdoc +++ b/doc/qtcreator/src/debugger/creator-only/creator-debugger-setup.qdoc @@ -18,7 +18,7 @@ The main debugger preferences are associated with the \l{Kits}{kit} you build and run your project with. To specify the debugger and compiler to use for each kit, select - \uicontrol Edit > \uicontrol Preferences > \uicontrol Kits. + \preferences > \uicontrol Kits. \image qtcreator-kits.png {Kits preferences} @@ -30,13 +30,13 @@ installed replacement instead. To change the debugger in an automatically detected kit, select - \uicontrol Edit > \uicontrol Preferences > \uicontrol Kits > + \preferences > \uicontrol Kits > \uicontrol Clone to create a copy of the kit, and change the parameters in the cloned kit. Make sure to enable the cloned kit for your project. If the debugger you want to use is not automatically detected, select - \uicontrol Edit > \uicontrol Preferences > \uicontrol Kits > + \preferences > \uicontrol Kits > \uicontrol Debuggers > \uicontrol Add to add it. \image qtcreator-preferences-kits-debuggers.webp {Debuggers tab in Kits preferences} diff --git a/doc/qtcreator/src/debugger/creator-only/creator-debugger.qdoc b/doc/qtcreator/src/debugger/creator-only/creator-debugger.qdoc index 1c1f64d419c..fe61cd19eae 100644 --- a/doc/qtcreator/src/debugger/creator-only/creator-debugger.qdoc +++ b/doc/qtcreator/src/debugger/creator-only/creator-debugger.qdoc @@ -133,19 +133,18 @@ \QC checks whether the compiled application is up-to-date, and rebuilds and deploys it if you set the \uicontrol {Build before deploying} field to - build the whole project or the application to run and select he - \uicontrol {Always deploy before running} check box in - \uicontrol Edit > \uicontrol Preferences > \uicontrol {Build & Run} > - \uicontrol General. To debug the application without deploying - it, select \uicontrol Debug > \uicontrol {Start Debugging} > - \uicontrol {Start Debugging Without Deployment}. + build the whole project or the application to run and select the + \uicontrol {Always deploy before running} check box in \preferences > + \uicontrol {Build & Run} > \uicontrol General. To debug the application + without deploying it, select \uicontrol Debug > \uicontrol {Start Debugging} + > \uicontrol {Start Debugging Without Deployment}. The debugger then takes over and starts the application with suitable parameters. When using GDB or CDB as debug backend, you can specify additional commands to execute before and after the backend and debugged application are started or - attached in \uicontrol Edit > \uicontrol Preferences > \uicontrol Debugger > + attached in \preferences > \uicontrol Debugger > \uicontrol GDB and \uicontrol CDB. For more information, see \l{Debugger Preferences}. @@ -210,7 +209,7 @@ If a console application does not start up properly in the configured console and the subsequent attach fails, you can diagnose the issue by - using CDB's native console. Select \uicontrol Edit > \uicontrol Preferences > + using CDB's native console. Select \preferences > \uicontrol Debugger > \uicontrol CDB > \uicontrol {Use CDB console} to override the console set in the Windows system environment variables. Note that the native console does not prompt on application exit. @@ -364,7 +363,7 @@ The \QC installation program asks you whether you want to register \QC as a post-mortem debugger. To change the setting, select - \uicontrol Edit > \uicontrol Preferences > \uicontrol Debugger > + \preferences > \uicontrol Debugger > \uicontrol General > \uicontrol {Use \QC for post-mortem debugging}. You can launch the debugger in the post-mortem mode if an application @@ -487,7 +486,7 @@ By default, a non-responsive GDB process is terminated after 20 seconds. To increase the timeout in the \uicontrol {GDB timeout} field, select - \uicontrol Edit > \uicontrol Preferences > \uicontrol Debugger > + \preferences > \uicontrol Debugger > \uicontrol GDB. For more information about settings that you can specify to manage the GDB process, see \l{Specifying GDB Settings}. @@ -560,9 +559,9 @@ \endlist - To specify settings for managing the CDB process, select \uicontrol Edit > - \uicontrol Preferences > \uicontrol Debugger > \uicontrol CDB. For more - information, see \l{Specifying CDB Settings}. + To specify settings for managing the CDB process, select \preferences > + \uicontrol Debugger > \uicontrol CDB. For more information, see + \l{Specifying CDB Settings}. */ @@ -706,8 +705,7 @@ \section1 Customizing Debug Views To change the appearance and behavior of the debug views, set preferences - in \uicontrol Edit > \uicontrol Preferences > \uicontrol Debugger > - \uicontrol General. + in \preferences > \uicontrol Debugger > \uicontrol General. \image qtcreator-debugger-general-options.png {General tab in Debugger preferences} @@ -800,8 +798,8 @@ select \uicontrol {Close Editor Tooltips} in the context menu in the \uicontrol Locals or \uicontrol Expressions view. - To disable tooltips for performance reasons, select \uicontrol Edit > - \uicontrol Preferences > \uicontrol Debugger > \uicontrol General > + To disable tooltips for performance reasons, select \preferences > + \uicontrol Debugger > \uicontrol General > \uicontrol {Use tooltips in main editor when debugging}. \section1 Examining Complex Values in Debug Views @@ -848,9 +846,8 @@ classes in a useful way. To change the number of array elements that are - requested when expanding entries, select \uicontrol Edit > - \uicontrol Preferences > \uicontrol {Debugger} > - \uicontrol {Locals & Expressions} > \uicontrol {Default array size}. + requested when expanding entries, select \preferences > \uicontrol {Debugger} + > \uicontrol {Locals & Expressions} > \uicontrol {Default array size}. \section1 Stepping Through Code @@ -948,9 +945,8 @@ value display format. The available options depend on the type of the current items, and are provided by the debugging helpers. - To force a plain C-like display of structures, select - \uicontrol Edit > \uicontrol Preferences > \uicontrol Debugger > - \uicontrol {Locals & Expressions}, and then deselect the + To force a plain C-like display of structures, select \preferences > + \uicontrol Debugger > \uicontrol {Locals & Expressions}, and then deselect the \uicontrol {Use Debugging Helpers} check box. This still uses the Python scripts, but generates more basic output. To force the plain display for a single object or for all objects of a given type, select @@ -990,9 +986,8 @@ If an instance of a class is derived from QObject, you can find all other objects connected to this object's slots with Qt's signals and slots - mechanism. Select \uicontrol Edit > \uicontrol Preferences - > \uicontrol {Debugger} > \uicontrol {Locals & Expressions} > - \uicontrol {Use Debugging Helpers}. + mechanism. Select \preferences > \uicontrol {Debugger} > + \uicontrol {Locals & Expressions} > \uicontrol {Use Debugging Helpers}. \image qtcreator-debugging-helper-options.webp {Locals & Expressions preferences} @@ -1006,9 +1001,8 @@ switch off the debugging helpers to make low-level structures visible. To switch off the debugging helpers, deselect - \uicontrol {Use Debugging Helpers} in \uicontrol Edit > - \uicontrol Preferences > \uicontrol Debugger > - \uicontrol {Locals & Expressions}. + \uicontrol {Use Debugging Helpers} in \preferences > + \uicontrol Debugger > \uicontrol {Locals & Expressions}. \omit \section2 Creating Snapshots @@ -1112,8 +1106,8 @@ When using CDB as debug backend, you can specify that the debugger should break when application modules are loaded or unloaded. To enable breaking - for the specified modules, select \uicontrol Edit > \uicontrol Preferences > - \uicontrol Debugger > \uicontrol CDB. + for the specified modules, select \preferences > \uicontrol Debugger > + \uicontrol CDB. \image qtcreator-cdb-options.png {CDB tab in Debugger preferences} @@ -1150,8 +1144,7 @@ To enable the debugger to step into the code and display the source code when using a copy of the source tree at a location different from the one at which the libraries were built, you can map source paths to target - paths in \uicontrol Edit > \uicontrol Preferences > \uicontrol Debugger > - \uicontrol General: + paths in \preferences > \uicontrol Debugger > \uicontrol General: \image qtcreator-debugger-general-options.png {General tab in Debugger preferences} @@ -1264,8 +1257,8 @@ \image qtcreator-debugger-log-view.webp {Debugger Log view} - If debug output is sent to the system log, select \uicontrol Edit > - \uicontrol Preferences > \uicontrol Debugger > \uicontrol General > + If debug output is sent to the system log, select \preferences > + \uicontrol Debugger > \uicontrol General > \uicontrol {Force logging to console} check box. Right-click the view to select the following actions: @@ -1315,7 +1308,7 @@ \image qtcreator-debugger-disassembler-view.webp {Disassembler view} By default, GDB shows AT&T style disassembly. To switch to the Intel style, - select \uicontrol Edit > \uicontrol Preferences > \uicontrol Debugger > + select \preferences > \uicontrol Debugger > \uicontrol GDB > \uicontrol {Use Intel style disassembly}. To open the \uicontrol Disassembler view: @@ -1371,7 +1364,7 @@ least one of the three supported backends is available. To use the default GDB pretty printers installed in your system or linked - to the libraries your application uses, select \uicontrol Preferences > + to the libraries your application uses, select \preferences > \uicontrol Debugger > \uicontrol GDB > \uicontrol {Load system GDB pretty printers}. For more information, see \l{Specifying GDB Settings}. @@ -1381,9 +1374,9 @@ You can have commands executed after built-in debugging helpers have been loaded and fully initialized. To load additional debugging helpers or - modify existing ones, select \uicontrol Edit > \uicontrol Preferences > - \uicontrol Debugger > \uicontrol {Locals & Expressions}, and enter the - commands in the \uicontrol {Debugging Helper Customization} field. + modify existing ones, select \preferences > \uicontrol Debugger > + \uicontrol {Locals & Expressions}, and enter the commands in the + \uicontrol {Debugging Helper Customization} field. \image qtcreator-debugging-helper-options.webp {Locals & Expressions preferences} @@ -1403,9 +1396,8 @@ \endcode To display a message box as soon as your application receives a signal - during debugging, select \uicontrol Edit > \uicontrol Preferences > - \uicontrol Debugger > \uicontrol GDB > \uicontrol {Show a message box - when receiving a signal}. + during debugging, select \preferences > \uicontrol Debugger > \uicontrol GDB > + \uicontrol {Show a message box when receiving a signal}. \section2 Adding Custom Debugging Helpers @@ -1416,8 +1408,8 @@ To add debugging helpers for custom types, add debugging helper implementations to the startup file of the native debuggers (for example, \c{~/.gdbinit} or \c{~/.lldbinit}) or specify them directly in the - \uicontrol {Additional Startup Commands} in \uicontrol Edit > - \uicontrol Preferences > \uicontrol Debugger > \uicontrol GDB. + \uicontrol {Additional Startup Commands} in \preferences > + \uicontrol Debugger > \uicontrol GDB. To get started with implementing debugging helpers for your own data types, you can put their implementation into the file @@ -1450,9 +1442,8 @@ update your \QC installation (when updating your Qt installation, for example), copy it to a safe location outside the \QC installation in your file system and specify the location in - \uicontrol Edit > \uicontrol Preferences > \uicontrol Debugger > - \uicontrol {Locals & Expressions} > - \uicontrol {Extra Debugging Helper}. + \preferences > \uicontrol Debugger > \uicontrol {Locals & Expressions} + > \uicontrol {Extra Debugging Helper}. \endlist The custom debugging helpers will be automatically picked up from @@ -1593,7 +1584,7 @@ common situations. When using CDB as debugger backend, you can enable the Python dumper by - selecting \uicontrol Edit > \uicontrol Preferences > \uicontrol Debugger > + selecting \preferences > \uicontrol Debugger > \uicontrol CDB > \uicontrol {Use Python dumper}. \image qtcreator-cdb-options.png {CDB preferences} @@ -2042,9 +2033,8 @@ When using GDB as backend, you can automatically save a copy of its symbol index in a cache on disk and retrieve it from there - when loading the same binary in the future. Select \uicontrol Edit - > \uicontrol Preferences > \uicontrol Debugger > \uicontrol GDB > - \uicontrol {Use automatic symbol cache}. + when loading the same binary in the future. Select \preferences > + \uicontrol Debugger > \uicontrol GDB > \uicontrol {Use automatic symbol cache}. \image qtcreator-gdb-options.png {GDB preferences} diff --git a/doc/qtcreator/src/debugger/qtquick-debugging.qdoc b/doc/qtcreator/src/debugger/qtquick-debugging.qdoc index 739095b5a03..29589073f9a 100644 --- a/doc/qtcreator/src/debugger/qtquick-debugging.qdoc +++ b/doc/qtcreator/src/debugger/qtquick-debugging.qdoc @@ -91,9 +91,8 @@ \section2 Using Default Values - You can enable or disable QML debugging globally in \uicontrol Edit > - \uicontrol Preferences > \uicontrol {Build & Run} > - \uicontrol {Default Build Properties}. + You can enable or disable QML debugging globally in \preferences > + \uicontrol {Build & Run} > \uicontrol {Default Build Properties}. \image qtcreator-build-settings-default.png "Default Build Properties tab in Build & Run Preferences" @@ -120,7 +119,7 @@ \QC, it will be kept as you want it. There are some known issues in the interaction between the global setting - in \uicontrol Edit > \uicontrol Preferences > \uicontrol {Build & Run} > + in \preferences > \uicontrol {Build & Run} > \uicontrol {Default Build Properties} and the build configuration. For example, for qmake the global setting only affects build configurations that are automatically created when enabling a kit. Also, CMake ignores the diff --git a/doc/qtcreator/src/docker/creator-docker.qdoc b/doc/qtcreator/src/docker/creator-docker.qdoc index c109aca5f94..ae1dced8cea 100644 --- a/doc/qtcreator/src/docker/creator-docker.qdoc +++ b/doc/qtcreator/src/docker/creator-docker.qdoc @@ -33,7 +33,7 @@ To add a Docker image as a device: \list 1 - \li Select \uicontrol Edit > \uicontrol Preferences > \uicontrol Devices + \li Select \preferences > \uicontrol Devices > \uicontrol Docker and enter the path to the Docker CLI in the \uicontrol Command field. \image qtcreator-preferences-devices-docker.webp "Docker tab in Devices preferences" @@ -145,7 +145,7 @@ \section1 Editing Docker Device Kits - Select \uicontrol Edit > \uicontrol Preferences > \uicontrol Kits to check + Select \preferences > \uicontrol Kits to check that the automatically generated kits point to the appropriate kit items. To specify build settings: diff --git a/doc/qtcreator/src/editors/creator-code-completion.qdoc b/doc/qtcreator/src/editors/creator-code-completion.qdoc index 409855ab73d..b3d1830640b 100644 --- a/doc/qtcreator/src/editors/creator-code-completion.qdoc +++ b/doc/qtcreator/src/editors/creator-code-completion.qdoc @@ -28,8 +28,8 @@ \section1 Specifying Completion Settings - To specify settings for code completion, select \uicontrol Edit > - \uicontrol Preferences > \uicontrol {Text Editor} > \uicontrol Completion. + To specify settings for code completion, select \preferences > + \uicontrol {Text Editor} > \uicontrol Completion. \image qtcreator-preferences-texteditor-completion.webp "Text Editor Completion preferences" @@ -153,7 +153,7 @@ Code snippets specify code constructs. You can add, modify, and remove snippets in the snippet editor. To open the editor, select - \uicontrol Edit > \uicontrol Preferences > \uicontrol {Text Editor} > + \preferences > \uicontrol {Text Editor} > \uicontrol Snippets. \if defined(qtcreator) @@ -296,7 +296,7 @@ completion. To use Nimsuggest, you must install it on the development PC. Then select - \uicontrol Edit > \uicontrol Preferences > \uicontrol Nim > \uicontrol Tools, + \preferences > \uicontrol Nim > \uicontrol Tools, and enter the path to the tool executable in the \uicontrol Path field. \sa {Document code} diff --git a/doc/qtcreator/src/editors/creator-code-indentation.qdoc b/doc/qtcreator/src/editors/creator-code-indentation.qdoc index aaf37d64b9c..6dcb32a4aa6 100644 --- a/doc/qtcreator/src/editors/creator-code-indentation.qdoc +++ b/doc/qtcreator/src/editors/creator-code-indentation.qdoc @@ -43,9 +43,9 @@ \section1 Automatically fix indentation To automatically fix indentation according to the indentation settings - when you save the file, select \uicontrol Edit > \uicontrol Preferences > - \uicontrol {Text Editor} > \uicontrol Behavior > - \uicontrol {Clean whitespace} > \uicontrol {Clean indentation}. Select + when you save the file, select \preferences > \uicontrol {Text Editor} > + \uicontrol Behavior > \uicontrol {Clean whitespace} > + \uicontrol {Clean indentation}. Select the \uicontrol {Skip clean whitespace for file types} check box to exclude the specified file types. @@ -53,8 +53,8 @@ \section1 Show whitespace in editor - To visualize whitespace in the editor, select \uicontrol Edit > - \uicontrol Preferences > \uicontrol {Text Editor} > \uicontrol Display > + To visualize whitespace in the editor, select \preferences > + \uicontrol {Text Editor} > \uicontrol Display > \uicontrol {Visualize whitespace}. To visualize indentation, select \uicontrol {Visualize Indent}. To adjust the diff --git a/doc/qtcreator/src/editors/creator-code-refactoring.qdoc b/doc/qtcreator/src/editors/creator-code-refactoring.qdoc index a9ff5a20b5e..37f45c5b259 100644 --- a/doc/qtcreator/src/editors/creator-code-refactoring.qdoc +++ b/doc/qtcreator/src/editors/creator-code-refactoring.qdoc @@ -22,7 +22,7 @@ \l{Applying Refactoring Actions}. By default, the refactored files are saved automatically. To disable - this feature, deselect \uicontrol Edit > \uicontrol Preferences > + this feature, deselect \preferences > \uicontrol Environment > \uicontrol System > \uicontrol {Auto-save files after refactoring}. \if defined(qtcreator) diff --git a/doc/qtcreator/src/editors/creator-code-syntax.qdoc b/doc/qtcreator/src/editors/creator-code-syntax.qdoc index 61a6a91b4ef..22f9721b5c2 100644 --- a/doc/qtcreator/src/editors/creator-code-syntax.qdoc +++ b/doc/qtcreator/src/editors/creator-code-syntax.qdoc @@ -39,7 +39,7 @@ of the line annotations. To modify the colors used for underlining errors and warnings, select - \uicontrol Edit > \uicontrol Preferences > \uicontrol {Text Editor} > + \preferences > \uicontrol {Text Editor} > \uicontrol {Font & Colors} > \uicontrol Copy, and select new colors for \uicontrol Error and \uicontrol Warning. @@ -55,7 +55,7 @@ \section1 Specifying Line Annotation Positions To specify the position where the annotations are displayed, select - \uicontrol Edit > \uicontrol Preferences > \uicontrol {Text Editor} > + \preferences > \uicontrol {Text Editor} > \uicontrol Display > \uicontrol {Line annotations}, and then select whether to display the annotations directly next to the code, aligned to the right of the code, or in the right margin. Showing annotations @@ -701,9 +701,9 @@ \section1 Enabling and Disabling Messages - To enable and disable QML and JavaScript messages, select \uicontrol Edit > - \uicontrol Preferences > \uicontrol {Qt Quick} > \uicontrol {QML/JS Editing} - > \uicontrol {Use customized static analyzer}. + To enable and disable QML and JavaScript messages, select \preferences > + \uicontrol {Qt Quick} > \uicontrol {QML/JS Editing} > + \uicontrol {Use customized static analyzer}. \image qtcreator-preferences-qtquick-qmljs-editing.webp {QML/JS Editing tab in Qt Quick preferences} @@ -739,8 +739,8 @@ \section1 Automatically Formatting QML/JS Files - To automatically format QML/JS files upon saving, select \uicontrol Edit > - \uicontrol Preferences > \uicontrol {Qt Quick} > \uicontrol {QML/JS Editing} > + To automatically format QML/JS files upon saving, select \preferences > + \uicontrol {Qt Quick} > \uicontrol {QML/JS Editing} > \uicontrol {Enable auto format on file save}. To only format files that belong to the current project, select \uicontrol {Restrict to files contained in the current project}. @@ -763,9 +763,8 @@ 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. + box in \preferences > \uicontrol C++ > \uicontrol {Code Model}, this action + also expands all \c {"#include "} statements to their actual contents. \image qtcreator-preferences-code-model.webp {C++ Code Model preferences} diff --git a/doc/qtcreator/src/editors/creator-diff-editor.qdoc b/doc/qtcreator/src/editors/creator-diff-editor.qdoc index 2cc78bbfbaf..92e25c5dcac 100644 --- a/doc/qtcreator/src/editors/creator-diff-editor.qdoc +++ b/doc/qtcreator/src/editors/creator-diff-editor.qdoc @@ -100,7 +100,7 @@ \section1 Changing the Colors - To change the default colors, select \uicontrol Edit > \uicontrol Preferences > + To change the default colors, select \preferences > \uicontrol {Text Editor} > \uicontrol {Font & Colors}. Create your own color scheme and select new colors for the following items: diff --git a/doc/qtcreator/src/editors/creator-editors-options-text.qdoc b/doc/qtcreator/src/editors/creator-editors-options-text.qdoc index e4779703627..a9352a5bc36 100644 --- a/doc/qtcreator/src/editors/creator-editors-options-text.qdoc +++ b/doc/qtcreator/src/editors/creator-editors-options-text.qdoc @@ -23,9 +23,8 @@ \endif Set the font preferences and apply color schemes for syntax highlighting, - diff editor, and code analysis results in \uicontrol Edit > - \uicontrol Preferences > \uicontrol {Text Editor} > - \uicontrol {Font & Colors}. + diff editor, and code analysis results in \preferences > + \uicontrol {Text Editor} > \uicontrol {Font & Colors}. \image qtcreator-font-colors.png "Text editor preferences" @@ -35,9 +34,8 @@ percentage for viewing the text. You can also zoom in or out by pressing \key {Ctrl++} or \key {Ctrl+-}, or by pressing \key Ctrl and rolling the mouse button up or down. To disable the mouse wheel function, select - \uicontrol Edit > \uicontrol Preferences > \uicontrol {Text Editor} > - \uicontrol Behavior and deselect the - \uicontrol {Enable scroll wheel zooming} check box. + \preferences > \uicontrol {Text Editor} > \uicontrol Behavior and deselect + the \uicontrol {Enable scroll wheel zooming} check box. To improve the readability of text in the editor, adjust the line spacing in the \uicontrol {Line spacing} field. @@ -55,9 +53,8 @@ \list 1 - \li Select \uicontrol Edit > \uicontrol Preferences > - \uicontrol {Text Editor} > \uicontrol {Fonts & Color} > - \uicontrol Copy. + \li Select \preferences > \uicontrol {Text Editor} > + \uicontrol {Fonts & Color} > \uicontrol Copy. \li Enter a name for the color scheme and click \uicontrol OK. @@ -86,7 +83,7 @@ \section2 Exporting and Importing Color Schemes To share color schemes with others, export and import them as XML files. - To export a color scheme, select \uicontrol Edit > \uicontrol Preferences > + To export a color scheme, select \preferences > \uicontrol {Text Editor} > \uicontrol {Fonts & Color} > \uicontrol Export, and then select the filename and location for the XML file. @@ -101,8 +98,8 @@ \section2 File Encoding - To define the default file encoding, select \uicontrol Edit > - \uicontrol Preferences > \uicontrol {Text Editor} > \uicontrol Behavior, and + To define the default file encoding, select \preferences > + \uicontrol {Text Editor} > \uicontrol Behavior, and then select a suitable option in \uicontrol {Default encoding}. \image qtcreator-options-texteditor-behavior-file-encodings.png "File encoding preferences" diff --git a/doc/qtcreator/src/editors/creator-editors-options.qdoc b/doc/qtcreator/src/editors/creator-editors-options.qdoc index d56f130c122..595c79b81c3 100644 --- a/doc/qtcreator/src/editors/creator-editors-options.qdoc +++ b/doc/qtcreator/src/editors/creator-editors-options.qdoc @@ -19,7 +19,7 @@ \title Configuring the Editor You can configure the text editor to suit your specific needs by selecting - \uicontrol Edit > \uicontrol Preferences > \uicontrol{Text Editor}. + \preferences > \uicontrol{Text Editor}. \image qtcreator-font-colors.png "Text Editor preferences" @@ -57,9 +57,8 @@ \li Set \l{Indent text or code}{tabs, indentation, the handling of whitespace, and mouse operations} in \uicontrol Behavior. - \li Set various display properties, such as - \l{Highlighting and folding blocks} - {highlighting and folding blocks} or text + \li Set various display properties, such as \l{Highlighting Blocks} + {highlighting} or \l{Folding Blocks}{folding} blocks or text wrapping in \uicontrol Display. \li Add, modify, and remove \l{Editing Code Snippets}{code snippets} in diff --git a/doc/qtcreator/src/editors/creator-locator.qdoc b/doc/qtcreator/src/editors/creator-locator.qdoc index f26024a6864..44cdc361bc7 100644 --- a/doc/qtcreator/src/editors/creator-locator.qdoc +++ b/doc/qtcreator/src/editors/creator-locator.qdoc @@ -231,8 +231,7 @@ \list 1 - \li Select \uicontrol Edit > \uicontrol Preferences > - \uicontrol Environment > \uicontrol Locator > + \li Select \preferences > \uicontrol Environment > \uicontrol Locator > \uicontrol {Web Search} > \uicontrol Edit. \li Select \uicontrol Add to add a new entry to the list. @@ -307,8 +306,7 @@ \list 1 - \li Select \uicontrol Edit > \uicontrol Preferences > - \uicontrol Environment > \uicontrol Locator. + \li Select \preferences > \uicontrol Environment > \uicontrol Locator. \li In \uicontrol {Refresh interval}, define new time in minutes. diff --git a/doc/qtcreator/src/editors/creator-only/creator-beautifier.qdoc b/doc/qtcreator/src/editors/creator-only/creator-beautifier.qdoc index d994a175e35..20a04c003f0 100644 --- a/doc/qtcreator/src/editors/creator-only/creator-beautifier.qdoc +++ b/doc/qtcreator/src/editors/creator-only/creator-beautifier.qdoc @@ -52,14 +52,14 @@ \uicontrol Beautifier to enable the plugin. \note Since \QC 10.0.0, the ClangFormat plugin is enabled by - default. Select \uicontrol Edit > \uicontrol Preferences > + default. Select \preferences > \uicontrol {C++} > \uicontrol {Formatting mode} > \uicontrol Disable to turn off ClangFormat if you enable Beautifier because combining them can lead to unexpected results. \li Select \uicontrol {Restart Now} to restart \QC and load the plugin. - \li Select \uicontrol Edit > \uicontrol Preferences > + \li Select \preferences > \uicontrol Beautifier to specify settings for beautifying files. \li Select the \uicontrol {Enable auto format on file save} check box to @@ -148,7 +148,7 @@ \endlist - \li Select \uicontrol Edit > \uicontrol Preferences > \uicontrol Beautifier + \li Select \preferences > \uicontrol Beautifier > \uicontrol {Artistic Style}, \uicontrol ClangFormat, or \uicontrol Uncrustify > \uicontrol {Format Current File} to format the currently open file. 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 a0b5a416980..0edfdcc22c7 100644 --- a/doc/qtcreator/src/editors/creator-only/creator-clang-codemodel.qdoc +++ b/doc/qtcreator/src/editors/creator-only/creator-clang-codemodel.qdoc @@ -82,7 +82,7 @@ \endlist - To use the built-in code model instead, select \uicontrol Edit > \uicontrol Preferences > + To use the built-in code model instead, select \preferences > \uicontrol C++ > \uicontrol clangd, and deselect the \uicontrol {Use clangd} check box. This setting also exists on the project level, so that you can have the clang-based services generally enabled, but switch them off for certain projects, or vice versa. @@ -100,7 +100,7 @@ \list 1 - \li Select \uicontrol Edit > \uicontrol Preferences > \uicontrol C++ > + \li Select \preferences > \uicontrol C++ > \uicontrol {Code Model}. \image qtcreator-preferences-code-model.webp {C++ Code Model preferences} @@ -159,9 +159,9 @@ To specify settings for clangd: \list 1 - \li Select \uicontrol Edit > \uicontrol Preferences > \uicontrol C++ > + \li Select \preferences > \uicontrol C++ > \uicontrol Clangd > \uicontrol {Use clangd}. - \image qtcreator-options-clangd.png "clangd preferences" + \image qtcreator-preferences-clangd.webp "Clangd preferences" \li In \uicontrol {Path to executable}, enter the path to clangd version 14, or later. \li In the \uicontrol {Background indexing} field, select \uicontrol Off @@ -169,15 +169,25 @@ 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 In \uicontrol {Header/source switch mode}, select the C/C++ + backend for switching between header and source files. While the + clangd implementation has more capabilities than the built-in + code model, it tends to find false positives. \uicontrol {Try Both} + uses clangd if the built-in code model does not find anything. \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. - \li Select \uicontrol {Insert header files on completion} to allow - clangd to insert header files as part of symbol completion. \li Set the number of \uicontrol {Completion results} if you regularly miss important results during code completion. Set it to 0 to remove the limit on the number of completion results. Setting this to 0 or a very high number can make code completion slow. + \li In \uicontrol {Completion ranking model}, select the clangd model to + use for ranking completion suggestions. This determines their order + in the selection list. The \uicontrol {Decision Forest} model + (\uicontrol Default) results from pre-trained machine learning + and usually provides better results than the hand-crafted + \uicontrol Heuristic model. Select the latter if the completion + suggestions stray too much from your expectations for your code base. \li In \uicontrol {Document update threshold}, specify the amount of time \QC waits before sending document changes to the server. If the document changes again while waiting, this timeout is reset. diff --git a/doc/qtcreator/src/editors/creator-only/creator-code-pasting.qdoc b/doc/qtcreator/src/editors/creator-only/creator-code-pasting.qdoc index e12c5e29fdf..7e77b016b4c 100644 --- a/doc/qtcreator/src/editors/creator-only/creator-code-pasting.qdoc +++ b/doc/qtcreator/src/editors/creator-only/creator-code-pasting.qdoc @@ -23,8 +23,7 @@ To specify settings for the code pasting service: \list 1 - \li Select \uicontrol Edit > \uicontrol Preferences > - \uicontrol {Code Pasting}. + \li Select \preferences > \uicontrol {Code Pasting}. \image qtcreator-code-pasting-options.png "Code Pasting preferences" \li In the \uicontrol {Default protocol} field, select a code pasting service to use by default. diff --git a/doc/qtcreator/src/editors/creator-only/creator-coding-edit-mode.qdoc b/doc/qtcreator/src/editors/creator-only/creator-coding-edit-mode.qdoc index 4596447924d..6a649e96db7 100644 --- a/doc/qtcreator/src/editors/creator-only/creator-coding-edit-mode.qdoc +++ b/doc/qtcreator/src/editors/creator-only/creator-coding-edit-mode.qdoc @@ -17,8 +17,8 @@ \image qtcreator-editortoolbar-symbols.webp {Edit mode toolbar} - To add more space around the toolbar items, select \uicontrol Edit > - \uicontrol Preferences > \uicontrol Environment > \uicontrol Interface, and + To add more space around the toolbar items, select \preferences > + \uicontrol Environment > \uicontrol Interface, and then select \uicontrol Relaxed in the \uicontrol {Toolbar style} field. \image qtcreator-preferences-environment-interface.webp {Interface tab in Environment preferences} @@ -81,7 +81,7 @@ \section2 Changing Text Encoding To show the file encoding of the current file on the editor toolbar (5), - select \uicontrol Edit > \uicontrol Preferences > \uicontrol {Text Editor} > + select \preferences > \uicontrol {Text Editor} > \uicontrol Display > \uicontrol {Display file encoding}. To change the text encoding, click it on the toolbar and select new @@ -97,11 +97,11 @@ To switch between Windows line endings (CRLF) and Unix line endings (LF), select the ending style on the editor toolbar (6). To hide this field, - select \uicontrol Edit > \uicontrol Preferences > \uicontrol {Text Editor} + select \preferences > \uicontrol {Text Editor} > \uicontrol Display, and deselect \uicontrol {Display file line ending}. To set the line endings to use for all projects by default, select - \uicontrol Edit > \uicontrol Preferences > \uicontrol {Text Editor} > + \preferences > \uicontrol {Text Editor} > \uicontrol Behavior, and then select the ending style in the \uicontrol {Default line endings} field. @@ -269,9 +269,8 @@ splits opened, you can open the link in the next split by holding \key Ctrl and \key Alt while clicking the symbol. - To enable this moving function, select \uicontrol Edit > - \uicontrol Preferences > \uicontrol {Text Editor} > \uicontrol Behavior > - \uicontrol {Enable mouse navigation}. + To enable this moving function, select \preferences > \uicontrol {Text Editor} + > \uicontrol Behavior > \uicontrol {Enable mouse navigation}. There are several additional ways of moving between symbol definitions and declarations. All the functions described below are also available from the @@ -307,8 +306,8 @@ split, prepend \key {Ctrl+E} to the shortcut. For example, press \key {Ctrl+E,F2} to follow the symbol in the next split. If necessary, the view is automatically split. To change the default behavior, select - \uicontrol Edit > \uicontrol Preferences > \uicontrol {Text Editor} > - \uicontrol Display > \uicontrol {Always open links in another split}. + \preferences > \uicontrol {Text Editor} > \uicontrol Display > + \uicontrol {Always open links in another split}. Additional symbols are displayed and switching between definition and declaration is done in another split. If you change the default behavior, the shortcuts for opening diff --git a/doc/qtcreator/src/editors/creator-only/creator-copilot.qdoc b/doc/qtcreator/src/editors/creator-only/creator-copilot.qdoc index 76dc97baabb..1f30da9120e 100644 --- a/doc/qtcreator/src/editors/creator-only/creator-copilot.qdoc +++ b/doc/qtcreator/src/editors/creator-only/creator-copilot.qdoc @@ -26,9 +26,9 @@ \list \li An active \l{https://docs.github.com/en/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot} {GitHub Copilot subscription}. - \li GitHub Copilot Neovim plugin installed, as described in - \l{https://docs.github.com/en/copilot/getting-started-with-github-copilot?tool=neovim} - {About GitHub Copilot and Neovim}. + \li GitHub Copilot Neovim plugin installed (requires Node.js), as described in + \l{https://github.com/github/copilot.vim/blob/release/README.md} + {Copilot.vim/Readme.md}. \endlist \section1 Enabling the Copilot Plugin @@ -36,8 +36,9 @@ To enable the Copilot plugin: \list 1 - \li Select \uicontrol Help > \uicontrol {About Plugins} > - \uicontrol Utilities > \uicontrol Copilot to enable the plugin. + \li Select \uicontrol Help (or \uicontrol {\QC} on \macos) > + \uicontrol {About Plugins} > \uicontrol Utilities > + \uicontrol Copilot to enable the plugin. \li Select \uicontrol {Restart Now} to restart \QC and load the plugin. \endlist @@ -46,8 +47,7 @@ To set preferences for using Copilot: \list 1 - \li Select \uicontrol Edit > \uicontrol Preferences > - \uicontrol Copilot. + \li Select \preferences > \uicontrol Copilot. \image qtcreator-preferences-copilot.webp {Copilot tab in Preferences} \li Select the \uicontrol {Enable Copilot} check box to use Copilot. \li Select \uicontrol {Sign In} to sign into your subscription, activate @@ -57,17 +57,33 @@ \li In the \uicontrol {Node.js path} field, enter the full path to the Node.js executable. \li In the \uicontrol {Path to agent.js} field, enter the path to - agent.js in the Copilot Neovim plugin. - \li Select the \uicontrol {Request completions automatically} checkbox to - receive suggestions for the current text cursor position when you - make changes. + agent.js in the Copilot Neovim plugin installation folder. + \li Select the \uicontrol {Auto request} check box to receive suggestions + for the current text cursor position when you make changes. + \li Select the \uicontrol {Use proxy} check box to use a proxy server to + connect to Copilot servers. + \li In the \uicontrol {Proxy host} field, enter the host name of the + proxy server. + \li In the \uicontrol {Proxy port} field, enter the port number of the + proxy server. + \li Select the \uicontrol {Reject unauthorized} check box to prevent the + security risk presented by accepting unauthorized certificates from + the proxy server. + \li In the \uicontrol {Proxy user} field, enter the user name to + authenticate to the proxy server. + \li Select the \uicontrol {Save proxy password} check box to save the + password to authenticate to the proxy server. + \note The password is saved insecurely. + \li In the \uicontrol {Proxy password} field, enter the password to save. + To see the password as you type, select the \inlineimage icons/original-size.png + button. \endlist \section1 Receiving Suggestions When you write code in the \l {Working in Edit Mode}{Edit} mode and - \uicontrol {Request completions automatically} is enabled, Copilot - automatically makes suggestions when you type. + \uicontrol {Auto request} is enabled, Copilot automatically makes + suggestions when you type. \image qtcreator-copilot.gif {Receiving suggestions from Copilot in the editor} @@ -95,8 +111,7 @@ To enable or disable Copilot suggestions globally, select the \inlineimage icons/copilot.png (\uicontrol {Toggle Copilot}) button. This also sets the value of the - \uicontrol {Enable Copilot} check box in \uicontrol Edit > - \uicontrol Preferences accordingly. + \uicontrol {Enable Copilot} check box in \preferences accordingly. To enable or disable Copilot suggestions for a particular project, select \uicontrol Projects > \uicontrol {Project Settings} > diff --git a/doc/qtcreator/src/editors/creator-only/creator-fakevim.qdoc b/doc/qtcreator/src/editors/creator-only/creator-fakevim.qdoc index c366cf82a4b..59c613a8fbe 100644 --- a/doc/qtcreator/src/editors/creator-only/creator-fakevim.qdoc +++ b/doc/qtcreator/src/editors/creator-only/creator-fakevim.qdoc @@ -93,7 +93,7 @@ \section2 Plugin Emulation FakeVim also emulates some popular vim plugins. To enable plugin emulation - for particular plugins, select \uicontrol Edit > \uicontrol Preferences > + for particular plugins, select \preferences > \uicontrol FakeVim > \uicontrol General > \uicontrol {Plugin Emulation}. \image qtcreator-fakevim-options-general-plugin-emulation.png "FakeVim Plugin Emulation preferences" @@ -269,8 +269,8 @@ \section1 Mapping FakeVim Commands To map commands entered on the \uicontrol FakeVim command line to - \QC functions, select \uicontrol Edit > \uicontrol Preferences > - \uicontrol FakeVim > \uicontrol {Ex Command Mapping}. + \QC functions, select \preferences > \uicontrol FakeVim > + \uicontrol {Ex Command Mapping}. Enter a string in the \uicontrol Filter field to search for a specific \QC function. @@ -284,17 +284,17 @@ To reset the trigger expressions for all functions, select \uicontrol {Reset All}. - To map \e {user commands} to keyboard shortcuts, select \uicontrol Edit > - \uicontrol Preferences > \uicontrol FakeVim > - \uicontrol {User Command Mapping}. The user command mapped to the shortcut - is executed by FakeVim as if you were typing it (as when replaying a macro). + To map \e {user commands} to keyboard shortcuts, select \preferences > + \uicontrol FakeVim > \uicontrol {User Command Mapping}. The user command + mapped to the shortcut is executed by FakeVim as if you were typing it + (as when replaying a macro). \image qtcreator-fakevim-options-user-command-mapping.png "FakeVim User Command Mapping preferences" \section1 Setting FakeVim Preferences - To make changes to the Vim-style settings, select \uicontrol Edit > - \uicontrol Preferences > \uicontrol FakeVim > \uicontrol General. + To make changes to the Vim-style settings, select \preferences > + \uicontrol FakeVim > \uicontrol General. \image qtcreator-fakevim-options.png "FakeVim preferences" @@ -304,13 +304,13 @@ select \uicontrol {Set Plain Style}. You can then change any of the preselected settings. - To use a Vim-style color scheme, select \uicontrol Edit > - \uicontrol Preferences > \uicontrol {Text Editor} > \uicontrol {Fonts & Color}. + To use a Vim-style color scheme, select \preferences > + \uicontrol {Text Editor} > \uicontrol {Fonts & Color}. In the \uicontrol {Color Scheme} list, select \uicontrol {Vim (dark)}. \section1 Quitting FakeVim Mode - To quit the FakeVim mode, deselect \uicontrol Edit > \uicontrol Preferences > + To quit the FakeVim mode, deselect \preferences > \uicontrol FakeVim > \uicontrol {Use FakeVim} or press \key {Alt+V,Alt+V}. You can temporarily escape FakeVim mode to access the normal \QC keyboard diff --git a/doc/qtcreator/src/editors/creator-only/creator-language-server.qdoc b/doc/qtcreator/src/editors/creator-only/creator-language-server.qdoc index 9ca34ea7b31..aca41d7c835 100644 --- a/doc/qtcreator/src/editors/creator-only/creator-language-server.qdoc +++ b/doc/qtcreator/src/editors/creator-only/creator-language-server.qdoc @@ -18,8 +18,7 @@ \li \l{Completing Code}{Code completion} \li Sending document formatting requests to the language server to automatically format documents using the settings specified in - \uicontrol Edit > \uicontrol Preferences > \uicontrol {Text Editor} - > \uicontrol Behavior + \preferences > \uicontrol {Text Editor} > \uicontrol Behavior \li Highlighting the symbol under cursor \li \l{View function tooltips} \li \l{Semantic Highlighting}{Semantic highlighting}, as defined in @@ -62,10 +61,8 @@ server is added by default and you can edit its preferences. For other languages, you can add generic stdIO language servers. - To add language servers, select \uicontrol Edit > \uicontrol Preferences > - \uicontrol {Language Client} > \uicontrol Add (or \uicontrol {Qt Creator} > - \uicontrol Preferences > \uicontrol {Language Client} > \uicontrol Add - on \macos). + To add language servers, select \preferences > + \uicontrol {Language Client} > \uicontrol Add. To enable a language server, select the check box next to the language server name and set server preferences. @@ -77,9 +74,8 @@ To add a generic language server: \list 1 - \li Select \uicontrol Edit > \uicontrol Preferences > - \uicontrol {Language Client} > \uicontrol Add > - \uicontrol {Generic StdIO Language Server} + \li Select \preferences > \uicontrol {Language Client} > + \uicontrol Add > \uicontrol {Generic StdIO Language Server} to add a generic language server. \image qtcreator-language-server-generic-stdio.png \li In the \uicontrol Name field, enter a name for the language server. @@ -110,9 +106,9 @@ To add a Java language server: \list 1 - \li Select \uicontrol Edit > \uicontrol Preferences > - \uicontrol {Language Client} > \uicontrol Add > - \uicontrol {Java Language Server} to add a Java language server. + \li Select \preferences > \uicontrol {Language Client} > + \uicontrol Add > \uicontrol {Java Language Server} to add + a Java language server. \image qtcreator-language-client-options-java.png "Java language server preferences" \li In the \uicontrol Name field, enter a name for the language server. Select the \inlineimage icons/replace.png @@ -130,8 +126,8 @@ To set preferences for Python language servers: \list 1 - \li Select \uicontrol Edit > \uicontrol Preferences > - \uicontrol Python > \uicontrol {Language Server Configuration} to + \li Select \preferences> \uicontrol Python > + \uicontrol {Language Server Configuration} to select the Python language server plugins to use. \image qtcreator-python-plugins.png "Python Language Server Configuration" \li Select \uicontrol Advanced to configure the plugins. @@ -149,7 +145,7 @@ Since Qt 6.4, the \c qmlls language server offers code completion and issues warnings for QML. To enable QML language server support, select - \uicontrol Edit > \uicontrol Preferences > \uicontrol {Qt Quick} > + \preferences > \uicontrol {Qt Quick} > \uicontrol {QML/JS Editing} > \uicontrol {Use qmlls (EXPERIMENTAL!)}. To use the latest version of the language server installed on your system, select the \uicontrol {Always use latest qmlls} check box. diff --git a/doc/qtcreator/src/editors/creator-only/creator-markdown-editor.qdoc b/doc/qtcreator/src/editors/creator-only/creator-markdown-editor.qdoc index 9a3d2444e61..95b31c2fd15 100644 --- a/doc/qtcreator/src/editors/creator-only/creator-markdown-editor.qdoc +++ b/doc/qtcreator/src/editors/creator-only/creator-markdown-editor.qdoc @@ -19,4 +19,10 @@ To hide and show the views, select \uicontrol {Show Preview} and \uicontrol {Show Editor}. To swap the places of the views, select \uicontrol {Swap Views}. + + \section1 Formatting Text + + Use the buttons on the editor toolbar to format text as italic (i), bold (b), + or inline code (`), and to create links to web sites + (\inlineimage icons/linkicon.png). */ diff --git a/doc/qtcreator/src/editors/creator-only/creator-mime-types.qdoc b/doc/qtcreator/src/editors/creator-only/creator-mime-types.qdoc index 662b3c0fa20..4e66db714c1 100644 --- a/doc/qtcreator/src/editors/creator-only/creator-mime-types.qdoc +++ b/doc/qtcreator/src/editors/creator-only/creator-mime-types.qdoc @@ -46,7 +46,7 @@ \list 1 - \li Select \uicontrol Edit > \uicontrol Preferences > + \li Select \preferences > \uicontrol Environment > \uicontrol {MIME Types}. \image qtcreator-mime-types.png "MIME Types" diff --git a/doc/qtcreator/src/editors/creator-only/creator-preferences-cpp-code-style.qdoc b/doc/qtcreator/src/editors/creator-only/creator-preferences-cpp-code-style.qdoc index b8e9d5e38b6..44622426af8 100644 --- a/doc/qtcreator/src/editors/creator-only/creator-preferences-cpp-code-style.qdoc +++ b/doc/qtcreator/src/editors/creator-only/creator-preferences-cpp-code-style.qdoc @@ -18,7 +18,7 @@ To specify global indentation settings for the C++ editor: \list 1 - \li Select \uicontrol Edit > \uicontrol Preferences > \uicontrol {C++}. + \li Select \preferences > \uicontrol {C++}. \image qtcreator-code-style-clang-format-global.webp {Code Style preferences} \li In \uicontrol {Formatting mode}, select: \list diff --git a/doc/qtcreator/src/editors/creator-only/creator-preferences-nim.qdoc b/doc/qtcreator/src/editors/creator-only/creator-preferences-nim.qdoc index e1d5d185087..a72320b71fe 100644 --- a/doc/qtcreator/src/editors/creator-only/creator-preferences-nim.qdoc +++ b/doc/qtcreator/src/editors/creator-only/creator-preferences-nim.qdoc @@ -14,7 +14,7 @@ To specify settings for the Nim editor (experimental): \list 1 - \li Select \uicontrol Edit > \uicontrol Preferences > \uicontrol Nim. + \li Select \preferences > \uicontrol Nim. \li In the \uicontrol {Current settings} field, select the settings to modify and click \uicontrol Copy. \image qtcreator-options-code-style-nim.png {Nim Code Style preferences} @@ -29,6 +29,6 @@ To specify different settings for a particular project, select \uicontrol Projects > \uicontrol {Code Style}. - \sa {Find a particular preference}, {Indent text or code}, + \sa {Find preferences}, {Indent text or code}, {Specify code style}, {Setting Up Nimble} */ diff --git a/doc/qtcreator/src/editors/creator-only/creator-text-editing-macros.qdoc b/doc/qtcreator/src/editors/creator-only/creator-text-editing-macros.qdoc index 6687e0241ae..1ea89d69d8f 100644 --- a/doc/qtcreator/src/editors/creator-only/creator-text-editing-macros.qdoc +++ b/doc/qtcreator/src/editors/creator-only/creator-text-editing-macros.qdoc @@ -24,12 +24,12 @@ \uicontrol {Text Editing Macros} > \uicontrol {Save Last Macro}. To assign a keyboard shortcut to a text editing macro, select - \uicontrol Edit > \uicontrol Preferences > \uicontrol Environment > + \preferences > \uicontrol Environment > \uicontrol Keyboard. For more information, see \l{Assign keyboard shortcuts}. You can also use the \c rm locator filter to run a macro. For more information, see \l{Searching with the Locator}. - To view and remove saved macros, select \uicontrol Edit > - \uicontrol Preferences > \uicontrol {Text Editor} > \uicontrol Macros. + To view and remove saved macros, select \preferences > + \uicontrol {Text Editor} > \uicontrol Macros. */ diff --git a/doc/qtcreator/src/editors/creator-preferences-text-editor-behavior.qdoc b/doc/qtcreator/src/editors/creator-preferences-text-editor-behavior.qdoc index 440d9a9e239..aeaf45def30 100644 --- a/doc/qtcreator/src/editors/creator-preferences-text-editor-behavior.qdoc +++ b/doc/qtcreator/src/editors/creator-preferences-text-editor-behavior.qdoc @@ -17,8 +17,8 @@ \brief Set preferences for the behavior of the text editor. To specify indentation settings for text files that do not have C++ or - QML code (such as Python code files), select \uicontrol Edit > - \uicontrol Preferences > \uicontrol {Text Editor} > \uicontrol Behavior. + QML code (such as Python code files), select \preferences > + \uicontrol {Text Editor} > \uicontrol Behavior. \image qtcreator-indentation.png {Text Editor Behavior preferences} @@ -64,7 +64,7 @@ When you type text or code, it is indented automatically according to the selected text editor or code style preferences. To set typing preferences, - select \uicontrol Edit > \uicontrol Preferences > \uicontrol {Text Editor} > + select \preferences > \uicontrol {Text Editor} > \uicontrol Behavior > \uicontrol Typing. To disable automatic indentation, deselect the @@ -89,7 +89,7 @@ commenting out a selection, select \uicontrol {Prefer single line comments}. \if defined(qtcreator) - \sa {Find a particular preference}, {C++ Code Style}, {Nim} + \sa {Find preferences}, {C++ Code Style}, {Nim} \endif \sa {Indent text or code}, {Qt Quick Code Style} diff --git a/doc/qtcreator/src/editors/creator-quick-fixes.qdoc b/doc/qtcreator/src/editors/creator-quick-fixes.qdoc index 88fddf01514..ed482dfcedc 100644 --- a/doc/qtcreator/src/editors/creator-quick-fixes.qdoc +++ b/doc/qtcreator/src/editors/creator-quick-fixes.qdoc @@ -83,8 +83,7 @@ You can specify settings for the refactoring actions either globally for all projects or separately for each project. To specify global options, - select \uicontrol Edit > \uicontrol Preferences > \uicontrol C++ > - \uicontrol {Quick Fixes}. + select \preferences > \uicontrol C++ > \uicontrol {Quick Fixes}. To specify custom settings for a particular project, select \uicontrol Projects > \uicontrol {Project Settings} > @@ -728,7 +727,7 @@ By default, \QC uses the \c auto variable type when creating the variable. To label the variable with its actual type, select - \uicontrol Edit > \uicontrol Preferences > \uicontrol C++ > + \preferences > \uicontrol C++ > \uicontrol {Quick Fixes}, and then deselect the \uicontrol {Use type "auto" when creating new variables} check box. diff --git a/doc/qtcreator/src/editors/creator-search.qdoc b/doc/qtcreator/src/editors/creator-search.qdoc index 904452fbe39..f01e547e8d3 100644 --- a/doc/qtcreator/src/editors/creator-search.qdoc +++ b/doc/qtcreator/src/editors/creator-search.qdoc @@ -95,7 +95,7 @@ The locations of search hits, breakpoints, and bookmarks in your document are highlighted on the editor scroll bar. To turn highlighting off, select - \uicontrol Edit > \uicontrol Preferences > \uicontrol {Text Editor} > + \preferences > \uicontrol {Text Editor} > \uicontrol Display > \uicontrol {Highlight search results on the scrollbar}. To search using more advanced options, select \uicontrol Advanced. @@ -243,11 +243,9 @@ \li If Silver Searcher is not found, you might have installed it in a location that is not found via the \c{PATH} environment variable. - Select \uicontrol Edit > \uicontrol Preferences > \uicontrol Environment > - \uicontrol System (or \uicontrol {\QC} > \uicontrol Preferences > - \uicontrol Environment > \uicontrol System on macOS), then select - \uicontrol Change in the \uicontrol Environment field and add an entry - \c{PATH=/path/to/bin:${PATH}}. + Select \preferences > \uicontrol Environment > \uicontrol System, + then select \uicontrol Change in the \uicontrol Environment field, + and add the entry \c{PATH=/path/to/bin:${PATH}}. \endlist \endif diff --git a/doc/qtcreator/src/editors/creator-semantic-highlighting.qdoc b/doc/qtcreator/src/editors/creator-semantic-highlighting.qdoc index 41e8c1ea961..23dfc01a4f0 100644 --- a/doc/qtcreator/src/editors/creator-semantic-highlighting.qdoc +++ b/doc/qtcreator/src/editors/creator-semantic-highlighting.qdoc @@ -24,8 +24,7 @@ \endlist To specify the color scheme to use for semantic highlighting, select - \uicontrol Edit > \uicontrol Preferences > \uicontrol {Text Editor} > - \uicontrol {Fonts & Color}. + \preferences > \uicontrol {Text Editor} > \uicontrol {Fonts & Color}. \QC supports syntax highlighting also for other types of files than C++, QML, or JavaScript. @@ -48,7 +47,7 @@ If more than one highlight definition is available for the file that you open for editing, the editor asks you to select the one to use. To save the selection, select \uicontrol {Remember My Choice}. To reset the - remembered definitions, select \uicontrol Edit > \uicontrol Preferences > + remembered definitions, select \preferences > \uicontrol {Text Editor} > \uicontrol {Generic Highlighter} > \uicontrol {Reset Remembered Definitions}. @@ -58,10 +57,9 @@ To view information about the downloaded files, open the \l{View output} {General Messages} view. - To suppress the message for a particular file pattern, select - \uicontrol Edit > \uicontrol Preferences > \uicontrol {Text Editor} - > \uicontrol {Generic Highlighter} and add the pattern to the - \uicontrol {Ignored file patterns} field. + To suppress the message for a particular file pattern, select \preferences > + \uicontrol {Text Editor} > \uicontrol {Generic Highlighter} and add the + pattern to the \uicontrol {Ignored file patterns} field. \image qtcreator-syntax-highlighter.png "Generic Highlighter preferences" @@ -71,7 +69,7 @@ apply the changes you make to the definition files, select \uicontrol {Reload Definitions}. - \section1 Highlighting and Folding Blocks + \section1 Highlighting Blocks Use block highlighting to visually separate parts of the code that belong together. For example, when you place the cursor within the braces, the code @@ -79,24 +77,36 @@ \image qtcreator-blockhighlighting.png - To enable block highlighting, select \uicontrol Edit > - \uicontrol Preferences > \uicontrol {Text Editor} > \uicontrol Display > - \uicontrol {Highlight blocks}. + To enable block highlighting, select \preferences > \uicontrol {Text Editor} + > \uicontrol Display > \uicontrol {Highlight blocks}. + + \section1 Folding Blocks Use the folding markers to collapse and expand blocks of code within braces. Click the folding marker to collapse or expand a block. In the figure above, the folding markers are located between the line number and the text pane. - To show the folding markers, select \uicontrol Edit > \uicontrol Preferences > + To show the folding markers, select \preferences > \uicontrol {Text Editor} > \uicontrol Display > \uicontrol {Display folding markers}. This option is enabled by default. \image qtcreator-options-text-editor-display.png "Text Editor Display preferences" - When the cursor is on a brace, the matching brace is animated by default. To - turn off the animation and just highlight the block and the braces, select - \uicontrol Edit > \uicontrol Preferences > \uicontrol {Text Editor} > - \uicontrol Display and deselect \uicontrol {Animate matching parentheses}. + \section2 Folding All Comment Blocks + + To fold all comment blocks, select \uicontrol Tools > \uicontrol C++ > + \uicontrol {Fold All Comment Blocks}. To unfold all comment blocks, select + \uicontrol {Unfold All Comment Blocks}. + + \section1 Animating Matching Braces + + When the cursor is on a brace, the matching brace is animated by default. + + To turn off the animation and just highlight the block and the braces, select + \preferences > \uicontrol {Text Editor} > \uicontrol Display and deselect + \uicontrol {Animate matching parentheses}. + + \section1 Moving Between Blocks You can use keyboard shortcuts to move within and between blocks. To go to block end, press \key {Ctrl+]} and to go to block start, press @@ -104,11 +114,15 @@ or beginning of the block, press \key {Ctrl+Shift+]} and \key {Ctrl+Shift+[}, respectively. + \section1 Selecting the Current Block + To select the current block, press \key Ctrl+U. A second key press extends the selection to the parent block. To undo the last selection, press - \key {Ctrl+Alt+Shift+U}. To enable smart block selection, select - \uicontrol Edit > \uicontrol Preferences > \uicontrol {Text Editor} > - \uicontrol Behavior > \uicontrol {Enable smart selection changing}. + \key {Ctrl+Alt+Shift+U}. + + To enable smart block selection, select \preferences + > \uicontrol {Text Editor} > \uicontrol Behavior > + \uicontrol {Enable smart selection changing}. \image qtcreator-options-text-editor-behavior.png "Text Editor Behavior preferences" */ diff --git a/doc/qtcreator/src/howto/creator-external-tools.qdoc b/doc/qtcreator/src/howto/creator-external-tools.qdoc index 79e0599c3c3..53ba24a3f4b 100644 --- a/doc/qtcreator/src/howto/creator-external-tools.qdoc +++ b/doc/qtcreator/src/howto/creator-external-tools.qdoc @@ -31,7 +31,7 @@ \section1 Configure external tools You can change the configuration of preconfigured tools and configure - additional tools in \QC \uicontrol Preferences. + additional tools in \QC \preferences. \image qtcreator-external-tools.png @@ -90,7 +90,7 @@ To globally change the system environment from the one in which - \QC is started, select \uicontrol Edit > \uicontrol Preferences > + \QC is started, select \preferences > \uicontrol Environment > \uicontrol System, and then select \uicontrol Change in the \uicontrol Environment field. \if defined(qtcreator) diff --git a/doc/qtcreator/src/howto/creator-help.qdoc b/doc/qtcreator/src/howto/creator-help.qdoc index 005153cb13c..434ee6fe9b2 100644 --- a/doc/qtcreator/src/howto/creator-help.qdoc +++ b/doc/qtcreator/src/howto/creator-help.qdoc @@ -36,7 +36,7 @@ space, in the fullscreen \uicontrol Help mode. \li To select and configure how the documentation is displayed in the - \uicontrol Help mode, select \uicontrol Edit > \uicontrol Preferences > \uicontrol Help. + \uicontrol Help mode, select \preferences > \uicontrol Help. \endlist The following image displays the context sensitive help in the \uicontrol Edit @@ -47,8 +47,8 @@ \section1 Change the font If the help HTML file does not use a style sheet, you can change the font - family, style, and size in \uicontrol Edit > \uicontrol Preferences > - \uicontrol Help > \uicontrol General. + family, style, and size in \preferences > \uicontrol Help > + \uicontrol General. \image qtcreator-preferences-help-general.webp {General tab in Help preferences} @@ -74,8 +74,8 @@ \section1 View function tooltips - To hide function tooltips by default, select \uicontrol Edit > - \uicontrol Preferences > \uicontrol {Text Editor} > \uicontrol Behavior > + To hide function tooltips by default, select \preferences > + \uicontrol {Text Editor} > \uicontrol Behavior > \uicontrol {Show help tooltips using the mouse} > \uicontrol {On Shift+Mouseover}. You can still view the tooltips by pressing and holding down the \key Shift key. @@ -108,9 +108,8 @@ By default, \QC registers only the latest available version of the documentation for each installed Qt module. To register all installed - documentation, select \uicontrol Edit > \uicontrol Preferences > - \uicontrol Kits > \uicontrol {Qt Versions} > - \uicontrol {Register documentation}. + documentation, select \preferences > \uicontrol Kits > + \uicontrol {Qt Versions} > \uicontrol {Register documentation}. \image qtcreator-qt-versions.png {Register documentation field in Qt Versions tab in Kit Preferences} @@ -174,9 +173,9 @@ \section1 Import and export bookmarks - To import and export bookmarks, select \uicontrol Edit > \uicontrol Preferences - > \uicontrol Help > \uicontrol General > \uicontrol {Import Bookmarks} or - \uicontrol {Export Bookmarks}. + To import and export bookmarks, select \preferences > + \uicontrol Help > \uicontrol General > \uicontrol {Import Bookmarks} or + \uicontrol {Export Bookmarks}. \sa {Find information in Qt documentation} */ @@ -260,7 +259,7 @@ For information on how to prepare your documentation and create a .qch file, see \l{The Qt Help Framework}. - \li To add the .qch file to \QC, select \uicontrol Edit > \uicontrol Preferences > + \li To add the .qch file to \QC, select \preferences > \uicontrol Help > \uicontrol Documentation > \uicontrol Add. \image qtcreator-preferences-help-documentation.webp {Documentation tab in Help Preferences} @@ -289,8 +288,8 @@ \image qtcreator-context-sensitive-help.png {Context-sensitive help in Edit mode} To specify that the help always opens in full-screen mode or - is detached to an external window, select \uicontrol Edit > - \uicontrol Preferences > \uicontrol Help > \uicontrol General. + is detached to an external window, select \preferences > \uicontrol Help > + \uicontrol General. \image qtcreator-preferences-help-general.webp {General tab in Help preferences} @@ -317,8 +316,8 @@ \title Select the help start page You can select the page to display when you open the \uicontrol Help mode in the - \uicontrol Edit > \uicontrol Preferences > \uicontrol Help > \uicontrol General - > \uicontrol {On help start} field. + \preferences > \uicontrol Help > \uicontrol General > + \uicontrol {On help start} field. \image qtcreator-preferences-help-general.webp {General tab in Help preferences} @@ -367,8 +366,7 @@ \list 1 - \li Select \uicontrol Edit > \uicontrol Preferences > \uicontrol Help > - \uicontrol Filters. + \li Select \preferences > \uicontrol Help > \uicontrol Filters. \image qtcreator-help-filter-attributes.png {Filters tab in Help preferences} diff --git a/doc/qtcreator/src/howto/creator-how-to-find-preferences.qdoc b/doc/qtcreator/src/howto/creator-how-to-find-preferences.qdoc new file mode 100644 index 00000000000..a39f64963d9 --- /dev/null +++ b/doc/qtcreator/src/howto/creator-how-to-find-preferences.qdoc @@ -0,0 +1,33 @@ +// Copyright (C) 2023 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only + +/*! + \page creator-how-to-find-preferences.html + \if defined(qtcreator) + \previouspage creator-how-tos.html + \else + \previouspage creator-quick-tour.html + \endif + + \ingroup creator-how-to-ui + \ingroup studio-how-to + + \title Find preferences + + \QC uses standard names and locations on Linux, \macos, and Windows for + standard features, such as \e preferences. + + \table + \header + \li Linux and Windows + \li \macos + \row + \li \uicontrol Edit > \uicontrol Preferences + \li \uicontrol {\QC} > \uicontrol Preferences + \endtable + + To find a particular preference, use the filter located at the top left of + the \uicontrol Preferences dialog. + + \image qtcreator-preferences.webp {Filtering preferences} +*/ diff --git a/doc/qtcreator/src/howto/creator-how-to-macos.qdoc b/doc/qtcreator/src/howto/creator-how-to-macos.qdoc deleted file mode 100644 index 30e5815efd9..00000000000 --- a/doc/qtcreator/src/howto/creator-how-to-macos.qdoc +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (C) 2023 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only - -/*! - \page creator-how-to-macos.html - \if defined(qtcreator) - \previouspage creator-how-tos.html - \else - \previouspage creator-quick-tour.html - \endif - - \ingroup creator-how-to-ui - \ingroup studio-how-to - - \title Find menu items on \macos - - \QC uses standard names and locations for standard features, such as - \e preferences. In this manual, the names and locations on - Windows and Linux are usually used to keep the instructions short. Here are - some places to check if you cannot find a function, dialog, or keyboard - shortcut on \macos when following the instructions: - - \table - \header - \li For - \li Look In - \row - \li \uicontrol Edit > \uicontrol Preferences - \li \uicontrol {\QC} > \uicontrol Preferences - \row - \li \uicontrol Help > \uicontrol {About Plugins} - \li \uicontrol {\QC} > \uicontrol {About Plugins} - \row - \li Keyboard shortcuts - \li \uicontrol {\QC} > \uicontrol Preferences > \uicontrol Environment > - \uicontrol Keyboard - \endtable -*/ diff --git a/doc/qtcreator/src/howto/creator-how-to-set-high-dpi-scaling.qdoc b/doc/qtcreator/src/howto/creator-how-to-set-high-dpi-scaling.qdoc index 2beda1e8f5d..103565ef95d 100644 --- a/doc/qtcreator/src/howto/creator-how-to-set-high-dpi-scaling.qdoc +++ b/doc/qtcreator/src/howto/creator-how-to-set-high-dpi-scaling.qdoc @@ -15,27 +15,30 @@ \title Set high DPI scaling The operating systems that \QC supports implement high dots-per-inch (DPI) - scaling at varying levels. Therefore, \QC handles high DPI scaling - differently on different operating systems: + scaling at varying levels. Therefore, \QC handles \l{High DPI}{high DPI} + scaling differently on different operating systems: \list \li On \macos, \QC forces high DPI scaling, which means that it allows Qt to use the system scaling factor as the \QC scaling factor. - \li On Windows, if you do not set \l{High DPI} - {scaling environment variables}, \QC instructs Qt to detect the - scaling factor and use it as the \QC scaling factor. \li On Linux, \QC leaves it to the user to enable high DPI scaling because the process varies so much on different distributions and windowing systems that it cannot be reliably done automatically. \endlist - To override the default approach and always enable high DPI scaling: + Setting the scale factor or DPI to the exact physical display DPI may not + give good visual results due to the fractional scaling involved. + \l {Qt::HighDpiScaleFactorRoundingPolicy}{Rounding} the scale factor to 25% + increments can improve the results. + + To set the DPI rounding policy: \list 1 - \li Select \uicontrol Edit > \uicontrol Preferences > + \li Select \preferences > \uicontrol Environment > \uicontrol Interface. \image qtcreator-preferences-environment-interface.webp {Interface tab in Environment preferences} - \li Select \uicontrol {Enable high DPI scaling}. + \li In \uicontrol {DPI rounding policy}, select an option to round + DPI up or down. \li Restart \QC to have the change take effect. \endlist */ diff --git a/doc/qtcreator/src/howto/creator-how-to-switch-ui-themes.qdoc b/doc/qtcreator/src/howto/creator-how-to-switch-ui-themes.qdoc index 69272441a38..41146ea2c62 100644 --- a/doc/qtcreator/src/howto/creator-how-to-switch-ui-themes.qdoc +++ b/doc/qtcreator/src/howto/creator-how-to-switch-ui-themes.qdoc @@ -20,7 +20,7 @@ To switch themes: \list 1 - \li Select \uicontrol Edit > \uicontrol Preferences > + \li Select \preferences > \uicontrol Environment > \uicontrol Interface. \image qtcreator-preferences-environment-interface.webp {Interface preferences} \li In \uicontrol Theme, select a theme. diff --git a/doc/qtcreator/src/howto/creator-keyboard-shortcuts.qdoc b/doc/qtcreator/src/howto/creator-keyboard-shortcuts.qdoc index 910e89dd97a..7dd3457be45 100644 --- a/doc/qtcreator/src/howto/creator-keyboard-shortcuts.qdoc +++ b/doc/qtcreator/src/howto/creator-keyboard-shortcuts.qdoc @@ -24,8 +24,7 @@ \QC has various keyboard shortcuts that speed up your development process. To view all \QC functions in and their keyboard shortcuts, select - \uicontrol Edit > \uicontrol Preferences > \uicontrol Environment > - \uicontrol Keyboard. + \preferences > \uicontrol Environment > \uicontrol Keyboard. \image qtcreator-keyboard-shortcuts.png @@ -47,7 +46,7 @@ To override the platform default value that determines whether keyboard shortcuts are shown in the labels of context menu items, - select \uicontrol Edit > \uicontrol Preferences > \uicontrol Environment > + select \preferences > \uicontrol Environment > \uicontrol Interface. The label of the \uicontrol {Show keyboard shortcuts in context menus} check box indicates whether the platform default value is \c on or \c off. @@ -218,8 +217,8 @@ By default, \QC exits without asking for confirmation, unless there are unsaved changes in open files. To always be asked, select the \uicontrol {Ask for confirmation before exiting} - check box in \uicontrol Edit > \uicontrol Preferences > - \uicontrol Environment > \uicontrol System. + check box in \preferences > \uicontrol Environment > + \uicontrol System. \li Ctrl+Q \endtable @@ -316,9 +315,8 @@ \li Select the current block The second press extends the selection to the parent block. To - enable this behavior, select \uicontrol Edit > - \uicontrol Preferences > \uicontrol {Text Editor} > - \uicontrol Behavior > + enable this behavior, select \preferences > + \uicontrol {Text Editor} > \uicontrol Behavior > \uicontrol {Enable smart selection changing}. \li Ctrl+U \row @@ -819,8 +817,7 @@ \list 1 - \li Select \uicontrol Edit > \uicontrol Preferences > \uicontrol Environment - > \uicontrol Keyboard. + \li Select \preferences > \uicontrol Environment > \uicontrol Keyboard. \image qtcreator-keyboard-shortcuts.png {Keyboard preferences} \li Select a command from the list. @@ -877,8 +874,7 @@ To look up keyboard shortcuts: \list 1 - \li Select uicontrol Edit > \uicontrol Preferences > - \uicontrol Environment > \uicontrol Keyboard. + \li Select \preferences > \uicontrol Environment > \uicontrol Keyboard. \image qtcreator-keyboard-shortcuts.png {Keyboard preferences} \li Start typing the name of a function or shortcut in the \uicontrol Filter field. @@ -909,8 +905,7 @@ \list 1 - \li Select uicontrol Edit > \uicontrol Preferences > - \uicontrol Environment > \uicontrol Keyboard. + \li Select \preferences > \uicontrol Environment > \uicontrol Keyboard. \image qtcreator-keyboard-shortcuts.png {Keyboard preferences} \li To import a keyboard shortcut mapping scheme, click \uicontrol Import diff --git a/doc/qtcreator/src/howto/creator-only/creator-autotest.qdoc b/doc/qtcreator/src/howto/creator-only/creator-autotest.qdoc index dab584171bc..47611d26c3f 100644 --- a/doc/qtcreator/src/howto/creator-only/creator-autotest.qdoc +++ b/doc/qtcreator/src/howto/creator-only/creator-autotest.qdoc @@ -39,7 +39,7 @@ By default, \QC does not handle build system based tests to avoid interference with code based parsers. To enable build system based tests, - select the respective test tool in \uicontrol Preferences > \uicontrol Testing + select the respective test tool in \preferences > \uicontrol Testing > \uicontrol General. The detection of tests is usually much faster for build system based @@ -341,8 +341,8 @@ with the build system. If a test takes more than a minute to execute, the default timeout might - stop the test execution. To increase the timeout, select \uicontrol Edit > - \uicontrol Preferences > \uicontrol {Testing} > \uicontrol General. + stop the test execution. To increase the timeout, select \preferences > + \uicontrol {Testing} > \uicontrol General. \section2 Selecting Tests to Run @@ -389,8 +389,7 @@ \section1 Specifying Test Settings To customize the handling of tests, test frameworks, and test tools, select - \uicontrol Edit > \uicontrol Preferences > \uicontrol {Testing} > - \uicontrol General. + \preferences > \uicontrol {Testing} > \uicontrol General. \image qtcreator-preferences-testing-general.webp {General tab in Testing preferences} @@ -444,8 +443,8 @@ The code inside a benchmark test is measured, and possibly also repeated several times in order to get an accurate measurement. This depends on the measurement back-end that you can select in the - \uicontrol {Benchmark Metrics} group in \uicontrol Edit > - \uicontrol Preferences > \uicontrol {Testing} > \uicontrol {Qt Test}: + \uicontrol {Benchmark Metrics} group in \preferences > \uicontrol {Testing} > + \uicontrol {Qt Test}: walltime, CPU tick counter, event counter, Valgrind Callgrind, and Linux Perf. For more information, see \l{Creating a Benchmark}. @@ -472,8 +471,8 @@ \section2 Specifying Settings for Running Google Tests - To specify settings for running Google tests, select \uicontrol Edit > - \uicontrol Preferences > \uicontrol {Testing} > \uicontrol {Google Test}. + To specify settings for running Google tests, select \preferences > + \uicontrol {Testing} > \uicontrol {Google Test}. \image qtcreator-preferences-testing-googletest.webp {Gooble Test tab in Testing preferences} @@ -500,9 +499,8 @@ \section2 Specifying Settings for Running Boost Tests \list 1 - \li To specify settings for running Boost tests, select \uicontrol Edit - > \uicontrol Preferences > \uicontrol {Testing} > - \uicontrol {Boost Test}. + \li To specify settings for running Boost tests, select \preferences > + \uicontrol {Testing} > \uicontrol {Boost Test}. \image qtcreator-preferences-testing-boosttest.webp {Boost Test tab in Testing preferences} \li In the \uicontrol {Log format} field, select the error report format to specify the type of events to record in the @@ -526,8 +524,7 @@ \section2 Specifying Settings for Running Catch2 Tests \list 1 \li To specify settings for running Catch2 tests, select - \uicontrol Edit > \uicontrol Preferences > \uicontrol {Testing} > - \uicontrol {Catch Test}. + \preferences > \uicontrol {Testing} > \uicontrol {Catch Test}. \image qtcreator-preferences-testing-catchtest.webp {Catch Test tab in Testing preferences} \li Select the \uicontrol {Show success} check box to show succeeding expressions as well. By default Catch2 will print only fails. @@ -557,8 +554,7 @@ \section2 Specifying Settings for Running CTest-Based Tests \list 1 \li To specify settings for running CTest-based tests, select - \uicontrol Edit > \uicontrol Preferences > \uicontrol {Testing} > - \uicontrol {CTest}. + \preferences > \uicontrol {Testing} > \uicontrol {CTest}. \image qtcreator-preferences-testing-ctest.webp {CTest tab in Testing preferences} \li Select the \uicontrol {Output on failure} check box to show test specific output if a test fails. Contrary to the CTest default @@ -595,8 +591,8 @@ the lost information when viewing the results as plain text. To view the - results of Qt and Qt Quick tests as plain text, select \uicontrol Edit > - \uicontrol Preferences > \uicontrol {Testing} > \uicontrol {Qt Test}, and + results of Qt and Qt Quick tests as plain text, select \preferences > + \uicontrol {Testing} > \uicontrol {Qt Test}, and then deselect the \uicontrol {Use XML output} check box. Then select the \inlineimage icons/text.png (\uicontrol {Switch Between Visual and Text Display}) button in diff --git a/doc/qtcreator/src/howto/creator-only/creator-how-to-document-code.qdoc b/doc/qtcreator/src/howto/creator-only/creator-how-to-document-code.qdoc index 3050f4a9a4e..d56a1f288cb 100644 --- a/doc/qtcreator/src/howto/creator-only/creator-how-to-document-code.qdoc +++ b/doc/qtcreator/src/howto/creator-only/creator-how-to-document-code.qdoc @@ -20,7 +20,7 @@ \image qtcreator-preferences-documentation-comments.webp {Documentation Comments settings} - To set global preferences, select \uicontrol Edit > \uicontrol Preferences > + To set global preferences, select \preferences > \uicontrol {Text Editor} > \uicontrol {Documentation Comments}. \sa {Configuring Projects} diff --git a/doc/qtcreator/src/howto/creator-only/creator-how-to-record-screens.qdoc b/doc/qtcreator/src/howto/creator-only/creator-how-to-record-screens.qdoc index e12aebd6188..c8a624622d3 100644 --- a/doc/qtcreator/src/howto/creator-only/creator-how-to-record-screens.qdoc +++ b/doc/qtcreator/src/howto/creator-only/creator-how-to-record-screens.qdoc @@ -106,8 +106,7 @@ To set up screen recording: \list 1 - \li Select \uicontrol Edit > \uicontrol Preferences > \uicontrol Help > - \uicontrol {Screen Recording}. + \li Select \preferences > \uicontrol Help > \uicontrol {Screen Recording}. \image qtcreator-preferences-screen-recording.webp {Screen Recording preferences} \li In \uicontrol {ffmpeg tool}, set the path to the FFmpeg executable. \li In \uicontrol {ffprobe tool}, set the path to the FFprobe executable. diff --git a/doc/qtcreator/src/howto/creator-only/creator-how-tos.qdoc b/doc/qtcreator/src/howto/creator-only/creator-how-tos.qdoc index 025c2bd2ef1..fb9bccd529c 100644 --- a/doc/qtcreator/src/howto/creator-only/creator-how-tos.qdoc +++ b/doc/qtcreator/src/howto/creator-only/creator-how-tos.qdoc @@ -95,20 +95,6 @@ \endlist */ -/*! - \page creator-how-to-find-preferences.html - \previouspage creator-how-tos.html - - \ingroup creator-how-to-ui - - \title Find a particular preference - - To find a particular preference in \uicontrol Edit > \uicontrol Preferences, - use the filter located at the top left of the \uicontrol Preferences dialog. - - \image qtcreator-preferences.webp {Filtering preferences} -*/ - /*! \page creator-how-to-run-from-cli.html \previouspage creator-how-tos.html @@ -208,7 +194,7 @@ create your own locator filters. That way you can locate files in a directory structure you have defined. - To create locator filters, select \uicontrol Edit > \uicontrol Preferences > + To create locator filters, select \preferences > \uicontrol Environment > \uicontrol Locator > \uicontrol Add. \image qtcreator-locator-customize.webp "Locator preferences" @@ -253,9 +239,8 @@ \title Add a license header template for C++ code - Specify a file that has a license header for C++ in \uicontrol Edit > - \uicontrol Preferences > \uicontrol C++ > \uicontrol {File Naming} > - \uicontrol {License template}. + Specify a file that has a license header for C++ in \preferences > + \uicontrol C++ > \uicontrol {File Naming} > \uicontrol {License template}. \image qtcreator-options-cpp-files.png "File Naming preferences" @@ -321,8 +306,7 @@ \endlist To specify whether to automatically insert matching characters, - select \uicontrol Edit > \uicontrol Preferences > - \uicontrol {Text Editor} > \uicontrol Completion. + select \preferences > \uicontrol {Text Editor} > \uicontrol Completion. \image qtcreator-preferences-texteditor-completion.webp "Completion preferences" @@ -349,8 +333,8 @@ \title Add code snippets to the auto-complete menu Add, modify, and remove snippets in the snippet editor. - To open the editor, select \uicontrol Edit > \uicontrol Preferences - > \uicontrol {Text Editor} > \uicontrol Snippets. + To open the editor, select \preferences > \uicontrol {Text Editor} > + \uicontrol Snippets. \image qtcreator-snippet-modifiers.png "Snippets preferences" @@ -398,8 +382,7 @@ \uicontrol {Recent Files}: \list 1 - \li Select \uicontrol Edit > \uicontrol Preferences > - \uicontrol Environment > \uicontrol System. + \li Select \preferences > \uicontrol Environment > \uicontrol System. \image qtcreator-options-environment-system.png {System preferences} \li In \uicontrol {Maximum number of entries in "Recent Files"}, set the number of files to show. diff --git a/doc/qtcreator/src/howto/creator-only/creator-squish.qdoc b/doc/qtcreator/src/howto/creator-only/creator-squish.qdoc index 25b2d54dad5..c931fd98ed4 100644 --- a/doc/qtcreator/src/howto/creator-only/creator-squish.qdoc +++ b/doc/qtcreator/src/howto/creator-only/creator-squish.qdoc @@ -57,7 +57,7 @@ To specify a Squish Server to run: \list 1 - \li Select \uicontrol Edit > \uicontrol Preferences > \uicontrol Squish. + \li Select \preferences > \uicontrol Squish. \image qtcreator-squish-preferences.png "Squish general preferences" \li In the \uicontrol {Squish path} field, specify the path to the Squish installation directory. diff --git a/doc/qtcreator/src/howto/creator-only/creator-vcpkg.qdoc b/doc/qtcreator/src/howto/creator-only/creator-vcpkg.qdoc index 456e793aa01..fb013f4fd36 100644 --- a/doc/qtcreator/src/howto/creator-only/creator-vcpkg.qdoc +++ b/doc/qtcreator/src/howto/creator-only/creator-vcpkg.qdoc @@ -31,15 +31,13 @@ \section1 Setting vcpkg Preferences By default, vcpkg is automatically set up for use with CMake. To disable - automatic setup, select \uicontrol Edit > \uicontrol Preferences > - \uicontrol CMake > \uicontrol General > - \uicontrol {Package manager auto setup}. + automatic setup, select \preferences > \uicontrol CMake > \uicontrol General + > \uicontrol {Package manager auto setup}. \image qtcreator-preferences-cmake-general.webp {General tab in CMake Preferences} To set the \uicontrol Path to the directory where you installed vcpkg, select - \uicontrol Edit > \uicontrol Preferences > \uicontrol CMake > - \uicontrol Vcpkg. + \preferences > \uicontrol CMake > \uicontrol Vcpkg. \image qtcreator-preferences-cmake-vcpkg.webp {Vcpkg tab in CMake Preferences} diff --git a/doc/qtcreator/src/howto/creator-only/qtcreator-faq.qdoc b/doc/qtcreator/src/howto/creator-only/qtcreator-faq.qdoc index 25172cf94d3..beadc0eb86a 100644 --- a/doc/qtcreator/src/howto/creator-only/qtcreator-faq.qdoc +++ b/doc/qtcreator/src/howto/creator-only/qtcreator-faq.qdoc @@ -34,7 +34,7 @@ compiler. What should I do?} Make sure that the application is in your system PATH when starting \QC. - Also select \uicontrol Edit > \uicontrol Preferences to check the settings + Also select \preferences to check the settings specified for the application. Many plugins specify either the path to the tool they need or the environment they run in. @@ -45,7 +45,7 @@ \QC has been localized into several languages. If the system language is one of the supported languages, it is automatically selected. - To change the language, select \uicontrol Edit > \uicontrol Preferences > + To change the language, select \preferences > \uicontrol Environment and select a language in the \uicontrol Language field. Select \uicontrol {Restart Now} to restart \QC and have the change take effect. @@ -145,7 +145,7 @@ \uicontrol Help mode. To view the documentation that is available and to add documentation, - select \uicontrol Edit > \uicontrol Preferences > \uicontrol Help > + select \preferences > \uicontrol Help > \uicontrol Documentation. For more information, see \l{Add external documentation}. @@ -232,9 +232,9 @@ For console applications that require input, select \uicontrol Projects > \uicontrol {Run Settings} > \uicontrol {Run in terminal}. To specify the - terminal to use, select \uicontrol Edit > \uicontrol Preferences > + terminal to use, select \preferences > \uicontrol Environment > \uicontrol System. To use an \l{Terminal} - {internal terminal}, select \uicontrol Edit > \uicontrol Preferences + {internal terminal}, select \preferences > \uicontrol Terminal > \uicontrol {Use internal terminal}. \b {On Windows:} Output is displayed differently for \e{console diff --git a/doc/qtcreator/src/howto/creator-telemetry.qdoc b/doc/qtcreator/src/howto/creator-telemetry.qdoc index 128d358910b..058e6cfbebe 100644 --- a/doc/qtcreator/src/howto/creator-telemetry.qdoc +++ b/doc/qtcreator/src/howto/creator-telemetry.qdoc @@ -90,7 +90,7 @@ To determine what data is transmitted to the backend storage: \list 1 - \li Select \uicontrol Edit > \uicontrol Preferences > \uicontrol Telemetry + \li Select \preferences > \uicontrol Telemetry > \uicontrol {Usage Statistics}. \image qtcreator-telemetry-settings.png "Telemetry settings" \li In the \uicontrol {Telemetry mode} list, select the mode that diff --git a/doc/qtcreator/src/linux-mobile/b2qtdev.qdoc b/doc/qtcreator/src/linux-mobile/b2qtdev.qdoc index 00bc24e1224..def1727a1fc 100644 --- a/doc/qtcreator/src/linux-mobile/b2qtdev.qdoc +++ b/doc/qtcreator/src/linux-mobile/b2qtdev.qdoc @@ -34,7 +34,7 @@ \section1 Adding Boot2Qt Devices If \QC does not automatically detect a device you connected with USB, select - \uicontrol Edit > \uicontrol Preferences > \uicontrol Devices > + \preferences > \uicontrol Devices > \uicontrol Devices > \uicontrol Add > \uicontrol {Boot2Qt Device} to create either a network connection or a USB connection to it. @@ -49,7 +49,7 @@ \l{https://doc.qt.io/Boot2Qt/b2qt-requirements-x11.html#setting-up-usb-access-to-embedded-devices} {Boot2Qt: Setting Up USB Access to Embedded Devices}. - You can edit the settings later in \uicontrol Edit > \uicontrol Preferences > + You can edit the settings later in \preferences > \uicontrol Devices > \uicontrol Devices. To reboot the selected device, select \uicontrol {Reboot Device}. @@ -74,7 +74,7 @@ need to enter the password upon every connection to the device, or if caching is enabled, at every \QC restart. If you frequently run into the timeout, consider using key-based authentication. On \macos and Linux, you - can also select \uicontrol Preferences > \uicontrol Devices > \uicontrol SSH + can also select \preferences > \uicontrol Devices > \uicontrol SSH and increase the time (in minutes) to use the same SSH connection in the \uicontrol {Connection sharing timeout} field. Windows does not support shared connections. @@ -97,10 +97,9 @@ \list 1 \li Check that you can reach the IP address of the device, or use USB to connect it. - \li Select \uicontrol Edit > \uicontrol Preferences > \uicontrol Kits > - \uicontrol {Qt Versions} > \uicontrol Add to add the Qt version - for Boot2Qt. - \li Select \uicontrol Edit > \uicontrol Preferences > \uicontrol Kits > + \li Select \preferences > \uicontrol Kits > \uicontrol {Qt Versions} > + \uicontrol Add to add the Qt version for Boot2Qt. + \li Select \preferences > \uicontrol Kits > \uicontrol Compilers > \uicontrol Add to add the compiler for building the applications. \li Select \uicontrol Tools > \uicontrol {Flash Boot to Qt Device} @@ -109,16 +108,15 @@ parameters for connecting to the devices over the network (\QC automatically detects devices connected with USB): \list 1 - \li Select \uicontrol Edit > \uicontrol Preferences > - \uicontrol Devices > \uicontrol Devices > \uicontrol Add > - \uicontrol Boot2Qt. + \li Select \preferences > \uicontrol Devices > + \uicontrol Devices > \uicontrol Add > \uicontrol Boot2Qt. \image qtcreator-devices-boot2qt.png {Boot2Qt Network Device Setup wizard} \li In the \uicontrol {Device name} field, enter a name for the connection. \li In the \uicontrol {Device address} field, enter the host name or IP address of the device. This value will be available in the \c %{Device:HostAddress} variable. - \li Click > \uicontrol {Finish} to test the connection and + \li Click \uicontrol {Finish} to test the connection and add the device. You can edit the connection parameters in the @@ -131,7 +129,7 @@ \uicontrol {Boot2Qt Device} in the pull-down menu of the \uicontrol Add button. \endlist - \li Select \uicontrol Edit > \uicontrol Preferences > \uicontrol Kits > + \li Select \preferences > \uicontrol Kits > \uicontrol Add to add a kit for building applications for the device. Select the Qt version, compiler, and device that you added above, and choose \uicontrol Boot2Qt as the device type. diff --git a/doc/qtcreator/src/linux-mobile/linuxdev-keys.qdocinc b/doc/qtcreator/src/linux-mobile/linuxdev-keys.qdocinc index 172c4a74feb..f3582f23736 100644 --- a/doc/qtcreator/src/linux-mobile/linuxdev-keys.qdocinc +++ b/doc/qtcreator/src/linux-mobile/linuxdev-keys.qdocinc @@ -19,8 +19,8 @@ development PC. To tell \QC where it can find the tools, specify the paths to the - directories where the tools are installed in \uicontrol Edit > - \uicontrol Preferences > \uicontrol Devices > \uicontrol SSH: + directories where the tools are installed in \preferences > + \uicontrol Devices > \uicontrol SSH: \image qtcreator-ssh-options.png "SSH preferences" @@ -60,7 +60,7 @@ \list 1 - \li Select \uicontrol Edit > \uicontrol Preferences > \uicontrol Devices + \li Select \preferences > \uicontrol Devices > \uicontrol Devices > \uicontrol {Create New}. \image qtcreator-ssh-key-configuration.png "SSH Key Configuration dialog" diff --git a/doc/qtcreator/src/linux-mobile/linuxdev-processes.qdocinc b/doc/qtcreator/src/linux-mobile/linuxdev-processes.qdocinc index 2992d6b2ecc..1c9c2d0a4ab 100644 --- a/doc/qtcreator/src/linux-mobile/linuxdev-processes.qdocinc +++ b/doc/qtcreator/src/linux-mobile/linuxdev-processes.qdocinc @@ -7,7 +7,7 @@ \section2 Managing Device Processes You can view processes running on devices and kill them. Select - \uicontrol Edit > \uicontrol Preferences > \uicontrol Devices > + \preferences > \uicontrol Devices > \uicontrol Devices > \uicontrol {Show Running Processes}. You can filter the processes by name or ID in the diff --git a/doc/qtcreator/src/linux-mobile/linuxdev.qdoc b/doc/qtcreator/src/linux-mobile/linuxdev.qdoc index 41820632d36..401fdbd8c1e 100644 --- a/doc/qtcreator/src/linux-mobile/linuxdev.qdoc +++ b/doc/qtcreator/src/linux-mobile/linuxdev.qdoc @@ -22,7 +22,7 @@ {kit}. You use a wizard to create the connections. You can edit the settings later - in \uicontrol Edit > \uicontrol Preferences > \uicontrol Devices > + in \preferences > \uicontrol Devices > \uicontrol Devices. \image qtcreator-preferences-devices-remote-linux.webp "Remote Linux Device in the Devices tab" @@ -49,11 +49,11 @@ \li Make sure that your device can be reached via an IP address. - \li Select \uicontrol Edit > \uicontrol Preferences > \uicontrol Kits > + \li Select \preferences > \uicontrol Kits > \uicontrol {Qt Versions} > \uicontrol Add to add the Qt version for embedded Linux. - \li Select \uicontrol Edit > \uicontrol Preferences > \uicontrol Kits > + \li Select \preferences > \uicontrol Kits > \uicontrol Compilers > \uicontrol Add to add the compiler for building the applications. @@ -62,7 +62,7 @@ \list a - \li Select \uicontrol Edit > \uicontrol Preferences > + \li Select \preferences > \uicontrol Devices > \uicontrol Devices > \uicontrol Add > \uicontrol {Remote Linux Device} > \uicontrol {Start Wizard}. @@ -111,7 +111,7 @@ \uicontrol {Add Remote Linux Device} in the pull-down menu of the \uicontrol Add button. - \li Select \uicontrol Edit > \uicontrol Preferences > \uicontrol Kits > + \li Select \preferences > \uicontrol Kits > \uicontrol Add to add a kit for building for the device. Select the Qt version, compiler, and device that you added above, and select \uicontrol {Remote Linux Device} in \uicontrol {Run device type}. diff --git a/doc/qtcreator/src/mcu/creator-mcu-dev.qdoc b/doc/qtcreator/src/mcu/creator-mcu-dev.qdoc index f2ad72b6402..65fba314e28 100644 --- a/doc/qtcreator/src/mcu/creator-mcu-dev.qdoc +++ b/doc/qtcreator/src/mcu/creator-mcu-dev.qdoc @@ -60,8 +60,7 @@ \section2 Specifying MCU Settings To configure a connection between \QC and your MCU board, select - \uicontrol Edit > \uicontrol Preferences > \uicontrol Devices > - \uicontrol MCU: + \preferences > \uicontrol Devices > \uicontrol MCU: \image qtcreator-mcu-options.png "MCU preferences" @@ -121,9 +120,8 @@ \image qtcreator-mcu-device.png "MCU devices" - To add MCU devices, select \uicontrol Edit > \uicontrol Preferences > - \uicontrol Devices > \uicontrol Add > \uicontrol {MCU Device} > - \uicontrol {Start Wizard}: + To add MCU devices, select \preferences > \uicontrol Devices > \uicontrol Add + > \uicontrol {MCU Device} > \uicontrol {Start Wizard}: \list 1 \li In the \uicontrol Name field, give the device a name. @@ -141,8 +139,7 @@ \image qtcreator-mcu-kit.png "MCU kits" - You can edit and/or remove individual kits in \uicontrol Edit > - \uicontrol Preferences > \uicontrol Kits. + You can edit and/or remove individual kits in \preferences > \uicontrol Kits. However, for adding new kits you should use the \uicontrol {Create Kit} button in the {\QMCU} settings tab. This method adds the paths to diff --git a/doc/qtcreator/src/meson/creator-projects-meson.qdoc b/doc/qtcreator/src/meson/creator-projects-meson.qdoc index e38e820bef6..43a15c65782 100644 --- a/doc/qtcreator/src/meson/creator-projects-meson.qdoc +++ b/doc/qtcreator/src/meson/creator-projects-meson.qdoc @@ -35,7 +35,7 @@ \list 1 - \li Select \uicontrol Edit > \uicontrol Preferences > \uicontrol Meson > + \li Select \preferences > \uicontrol Meson > \uicontrol Tools > \uicontrol Add. \image qtcreator-mesonexecutable.png @@ -50,7 +50,7 @@ \endlist Select the - \uicontrol Edit > \uicontrol Preferences > \uicontrol Kits > \uicontrol Kits + \preferences > \uicontrol Kits > \uicontrol Kits tab to add the Meson and Ninja tools to a build and run kit: \image qtcreator-kits-meson.png "Setting Meson executable in Kit preferences" diff --git a/doc/qtcreator/src/overview/creator-only/creator-configuring.qdoc b/doc/qtcreator/src/overview/creator-only/creator-configuring.qdoc index 41991eebbde..e891bd8ce89 100644 --- a/doc/qtcreator/src/overview/creator-only/creator-configuring.qdoc +++ b/doc/qtcreator/src/overview/creator-only/creator-configuring.qdoc @@ -45,22 +45,21 @@ available in \QC. If it does not, you must add the kits yourself to tell \QC where everything is. - To add kits, select \uicontrol Edit > \uicontrol Preferences > - \uicontrol Kits > \uicontrol Add. + To add kits, select \preferences > \uicontrol Kits > \uicontrol Add. For more information, see \l{Add kits}. Each kit consists of a set of values that define one environment, such as a - \l{glossary-device}{device}, compiler, and Qt version. If \uicontrol Edit > - \uicontrol Preferences > \uicontrol Kits > \uicontrol {Qt Versions} does not - show all the installed Qt versions, select \uicontrol {Link with Qt}. + \l{glossary-device}{device}, compiler, and Qt version. If \preferences > + \uicontrol Kits > \uicontrol {Qt Versions} does not show all the installed + Qt versions, select \uicontrol {Link with Qt}. If \uicontrol Auto-detected still does not show the Qt version, select \uicontrol {Add} to add it manually. For more information, see \l{Add Qt versions}. - Also check that \uicontrol Edit > \uicontrol Preferences > \uicontrol Kits > + Also check that \preferences > \uicontrol Kits > \uicontrol {Compilers} shows your compiler. For more information, see \l{Add compilers}. @@ -71,8 +70,8 @@ over a WLAN. You must also configure a connection between \QC and the development PC and specify the device in a kit. - To add devices, select \uicontrol Edit > \uicontrol Preferences > - \uicontrol Devices > \uicontrol Devices > \uicontrol Add. + To add devices, select \preferences > \uicontrol Devices > + \uicontrol Devices > \uicontrol Add. For more information, see \l{Connecting Devices}. @@ -81,7 +80,8 @@ You can use \QC with your favorite keyboard shortcuts. To view and edit all keyboard shortcuts defined in \QC, select - \uicontrol Edit > \uicontrol Preferences > \uicontrol Environment > + \preferences > + \uicontrol Environment > \uicontrol Keyboard. For more information, see \l{Keyboard Shortcuts}. \section1 Changing Color Schemes @@ -89,9 +89,8 @@ Themes enable you to customize the appearance of the \QC UI: widgets, colors, and icons. - To switch themes, select \uicontrol Edit > \uicontrol Preferences > - \uicontrol Environment, and then select a theme - in the \uicontrol Theme field. + To switch themes, select \preferences > \uicontrol Environment, and then + select a theme in the \uicontrol Theme field. You can use the \QC text and code editors with your favorite color scheme that defines how to highlight code elements and which background color to @@ -99,7 +98,7 @@ ones. The color schemes apply to highlighting C++ files, QML files, and generic files. - To change the color scheme, select \uicontrol Edit > \uicontrol Preferences > + To change the color scheme, select \preferences > \uicontrol {Text Editor} > \uicontrol {Fonts & Color}. For more information, see \l{Defining Color Schemes}. @@ -109,8 +108,8 @@ highlighting engine for Kate syntax definitions. \QC comes with most of the commonly used syntax files, and you can download additional files. - To download and use highlight definition files, select \uicontrol Edit > - \uicontrol Preferences > \uicontrol {Text Editor} > \uicontrol {Generic Highlighter}. + To download and use highlight definition files, select \preferences > + \uicontrol {Text Editor} > \uicontrol {Generic Highlighter}. For more information, see \l{Generic Highlighting}. @@ -121,7 +120,7 @@ the statement currently under your cursor. You can add, modify, and remove snippets in the snippet editor. - To open the snippet editor, select \uicontrol Edit > \uicontrol Preferences > + To open the snippet editor, select \preferences > \uicontrol {Text Editor} > \uicontrol Snippets. For more information, see \l{Editing Code Snippets}. @@ -133,8 +132,8 @@ \QC. However, some configuration options are available and you can set them in - \uicontrol Edit > \uicontrol Preferences > \uicontrol {Version Control} > - \uicontrol General. + \preferences > + \uicontrol {Version Control} > \uicontrol General. For more information about the supported functions, see \l{Version Control Systems}. diff --git a/doc/qtcreator/src/overview/creator-only/creator-glossary.qdoc b/doc/qtcreator/src/overview/creator-only/creator-glossary.qdoc index ebc66b84236..ac5e1cae6b4 100644 --- a/doc/qtcreator/src/overview/creator-only/creator-glossary.qdoc +++ b/doc/qtcreator/src/overview/creator-only/creator-glossary.qdoc @@ -78,7 +78,7 @@ cross-platform development easier. Each kit consists of a set of values that define one environment, such as a \e {device}, tool chain, Qt version, and debugger command to use. Configure kits at - \uicontrol Edit > \uicontrol Preferences > \uicontrol Kits. + \preferences > \uicontrol Kits. \row \li Mode diff --git a/doc/qtcreator/src/overview/creator-only/creator-issues.qdoc b/doc/qtcreator/src/overview/creator-only/creator-issues.qdoc index 593184d22b9..db2af2c5ebf 100644 --- a/doc/qtcreator/src/overview/creator-only/creator-issues.qdoc +++ b/doc/qtcreator/src/overview/creator-only/creator-issues.qdoc @@ -74,7 +74,7 @@ \QC or the conflicting shortcut in ibus. To set another \l {Keyboard Shortcuts}{keyboard shortcut} - in \QC, select \uicontrol Edit > \uicontrol Preferences > + in \QC, select \preferences > \uicontrol Environment > \uicontrol Keyboard. To change the ibus shortcut, enter the following command on the diff --git a/doc/qtcreator/src/overview/creator-only/creator-supported-platforms.qdoc b/doc/qtcreator/src/overview/creator-only/creator-supported-platforms.qdoc index 7dc67a57bbf..5ea6d94a0cf 100644 --- a/doc/qtcreator/src/overview/creator-only/creator-supported-platforms.qdoc +++ b/doc/qtcreator/src/overview/creator-only/creator-supported-platforms.qdoc @@ -73,8 +73,7 @@ To develop for UWP using Qt 5, use \QC 7.0, or earlier. \QC automatically runs scheduled checks for updates based on the settings - specified in \uicontrol Edit > \uicontrol Preferences \uicontrol Environment > - \uicontrol Update. + specified in \preferences > \uicontrol Environment > \uicontrol Update. \sa {Desktop Platforms}, {Embedded Platforms}, {Mobile Platforms} */ diff --git a/doc/qtcreator/src/projects/creator-only/creator-build-settings-qmake.qdoc b/doc/qtcreator/src/projects/creator-only/creator-build-settings-qmake.qdoc index e0f2d11ac10..17a1b43c9c3 100644 --- a/doc/qtcreator/src/projects/creator-only/creator-build-settings-qmake.qdoc +++ b/doc/qtcreator/src/projects/creator-only/creator-build-settings-qmake.qdoc @@ -19,7 +19,7 @@ \uicontrol {Build Directory} field. To make in-source builds the default option for all projects, select - \uicontrol Edit > \uicontrol Preferences > \uicontrol {Build & Run} > + \preferences > \uicontrol {Build & Run} > \uicontrol {Default Build Properties}, and enter a period (.) in the \uicontrol {Default build directory} field. @@ -46,15 +46,13 @@ \section1 Global qmake Settings - To specify settings for all qmake builds, select \uicontrol Edit - > \uicontrol Preferences > \uicontrol {Build & Run} > - \uicontrol Qmake. + To specify settings for all qmake builds, select \preferences > + \uicontrol {Build & Run} > \uicontrol Qmake. \image qtcreator-preferences-build-run-qmake.png "Qmake tab in Build & Run Preferences" - To set the default build properties, select \uicontrol Edit - > \uicontrol Preferences > \uicontrol {Build & Run} > - \uicontrol {Default Build Properties}. + To set the default build properties, select \preferences > + \uicontrol {Build & Run} > \uicontrol {Default Build Properties}. \image qtcreator-build-settings-default.png "Default Build Properties tab in Build & Run Preferences" @@ -70,9 +68,8 @@ select \uicontrol Enable in the \uicontrol {Qt Quick Compiler} field. To use default settings, select \uicontrol {Leave at Default}. - You can specify default behavior for compiling QML code in \uicontrol Edit - > \uicontrol Preferences > \uicontrol {Build & Run} > \uicontrol Qmake > - \uicontrol {Use qmlcachegen}. + You can specify default behavior for compiling QML code in \preferences > + \uicontrol {Build & Run} > \uicontrol Qmake > \uicontrol {Use qmlcachegen}. \section1 qmake Build Steps diff --git a/doc/qtcreator/src/projects/creator-only/creator-custom-output-parser.qdoc b/doc/qtcreator/src/projects/creator-only/creator-custom-output-parser.qdoc index 37fb44ee119..d07124bf309 100644 --- a/doc/qtcreator/src/projects/creator-only/creator-custom-output-parser.qdoc +++ b/doc/qtcreator/src/projects/creator-only/creator-custom-output-parser.qdoc @@ -12,8 +12,7 @@ and warning patterns that you specify and create entries for found patterns in \l Issues. - To view or add custom output parsers, select - \uicontrol Edit > \uicontrol Preferences > + To view or add custom output parsers, select \preferences > \uicontrol {Build & Run} > \uicontrol {Custom Output Parsers}. \image qtcreator-custom-parser-list.png @@ -40,9 +39,8 @@ To create a custom output parser: \list 1 - \li Select \uicontrol Edit > \uicontrol Preferences > - \uicontrol {Build & Run} > \uicontrol {Custom Output Parsers} - > \uicontrol Add. + \li Select \preferences > \uicontrol {Build & Run} > + \uicontrol {Custom Output Parsers} > \uicontrol Add. \li In the \uicontrol {Error message capture pattern} field, specify a regular expression to define what is an error. The custom parser matches the compile output line by line against the diff --git a/doc/qtcreator/src/projects/creator-only/creator-files-creating.qdoc b/doc/qtcreator/src/projects/creator-only/creator-files-creating.qdoc index 6498f2c70dd..f1f6441ee24 100644 --- a/doc/qtcreator/src/projects/creator-only/creator-files-creating.qdoc +++ b/doc/qtcreator/src/projects/creator-only/creator-files-creating.qdoc @@ -103,19 +103,34 @@ You can also create your own project and class wizards. - \section1 Set file naming preferences + \sa {Create files}, {Set C++ file naming preferences}, {Use project wizards}, + {Custom Wizards} +*/ - The names of the header and source file are based on the class name. To - change the default suffix of a file, select \uicontrol Edit > - \uicontrol Preferences > \uicontrol {C++} > \uicontrol {File Naming}. +/*! + \page creator-how-to-set-cpp-file-naming.html + \previouspage creator-how-tos.html - \image qtcreator-options-cpp-files.png "C++ File Naming preferences" + \ingroup creator-how-to-projects + + \title Set C++ file naming preferences + + When you use the new file wizard to create a C++ header and source file for a + new class in a C++ project, the names of the header and source file are based + on the class name. To change the default suffix of a file for a project, + select \uicontrol Projects > \uicontrol {Project Settings} > + \uicontrol {C++ File Naming}. + + \image qtcreator-projects-settings-cpp-file-naming.webp {C++ File Naming settings for a project} In the \uicontrol {License template} field, enter \l{Using Variables in Wizards}{predefined wizard variables} to specify the path and filename of the license to use in the source and header files. - \sa {Create files}, {Use project wizards}, {Custom Wizards} + To globally change the preferences, select \preferences > \uicontrol {C++} > + \uicontrol {File Naming}. + + \sa {Create C++ classes}, {Use project wizards} */ /*! diff --git a/doc/qtcreator/src/projects/creator-only/creator-how-to-edit-qbs-profiles.qdoc b/doc/qtcreator/src/projects/creator-only/creator-how-to-edit-qbs-profiles.qdoc index bbe2c7ea594..a5037be5b91 100644 --- a/doc/qtcreator/src/projects/creator-only/creator-how-to-edit-qbs-profiles.qdoc +++ b/doc/qtcreator/src/projects/creator-only/creator-how-to-edit-qbs-profiles.qdoc @@ -9,8 +9,8 @@ \title Edit Qbs profiles - To view the Qbs profile associated with a kit, select \uicontrol Edit > - \uicontrol Preferences > \uicontrol Qbs > \uicontrol Profiles. + To view the Qbs profile associated with a kit, select \preferences > + \uicontrol Qbs > \uicontrol Profiles. \image creator-qbs-profiles.png "Qbs Profiles tab" @@ -22,7 +22,7 @@ To edit the Qbs profile associated with a kit: \list 1 - \li In \uicontrol Edit > \uicontrol Preferences > \uicontrol Kits, select + \li In \preferences > \uicontrol Kits, select the kit, and then select \uicontrol Change next to the \uicontrol {Additional Qbs Profile Settings} field to open the \uicontrol {Custom Properties} dialog. diff --git a/doc/qtcreator/src/projects/creator-only/creator-how-to-select-build-systems.qdoc b/doc/qtcreator/src/projects/creator-only/creator-how-to-select-build-systems.qdoc index 0dfe9178a86..b2732eae0a5 100644 --- a/doc/qtcreator/src/projects/creator-only/creator-how-to-select-build-systems.qdoc +++ b/doc/qtcreator/src/projects/creator-only/creator-how-to-select-build-systems.qdoc @@ -50,8 +50,8 @@ \section1 Set preferences for building and running To change the location of the project directory, and to specify settings - for building and running projects, select \uicontrol Edit > - \uicontrol Preferences > \uicontrol {Build & Run} > \uicontrol General. + for building and running projects, select \preferences > + \uicontrol {Build & Run} > \uicontrol General. Specify build and run settings for different target platforms, in the \uicontrol Projects mode. diff --git a/doc/qtcreator/src/projects/creator-only/creator-projects-building.qdoc b/doc/qtcreator/src/projects/creator-only/creator-projects-building.qdoc index acf362877d0..b9c95f32239 100644 --- a/doc/qtcreator/src/projects/creator-only/creator-projects-building.qdoc +++ b/doc/qtcreator/src/projects/creator-only/creator-projects-building.qdoc @@ -98,10 +98,9 @@ \section1 Building with CMake \QC automatically runs CMake when you make changes to \c {CMakeLists.txt} - files. To disable this feature, select \uicontrol Edit > - \uicontrol Preferences > \uicontrol CMake > \uicontrol General. Select the - CMake executable to edit, and then deselect the \uicontrol {Autorun CMake} - check box. + files. To disable this feature, select \preferences > \uicontrol CMake > + \uicontrol General. Select the CMake executable to edit, and then deselect + the \uicontrol {Autorun CMake} check box. \image qtcreator-preferences-cmake-tools.webp "Tools tab in CMake Preferences" @@ -111,8 +110,8 @@ To prevent failures on incremental builds, it might make sense to always run qmake before building, even though it means that - building will take more time. To enable this option, select \uicontrol Edit - > \uicontrol Preferences > \uicontrol {Build & Run} > \uicontrol Qmake > + building will take more time. To enable this option, select \preferences > + \uicontrol {Build & Run} > \uicontrol Qmake > \uicontrol {Run qmake on every build}. \image qtcreator-preferences-build-run-qmake.png "qmake tab in Build & Run Preferences" diff --git a/doc/qtcreator/src/projects/creator-only/creator-projects-builds-customizing.qdoc b/doc/qtcreator/src/projects/creator-only/creator-projects-builds-customizing.qdoc index 0a7c1df2ac6..48f1bf87611 100644 --- a/doc/qtcreator/src/projects/creator-only/creator-projects-builds-customizing.qdoc +++ b/doc/qtcreator/src/projects/creator-only/creator-projects-builds-customizing.qdoc @@ -15,8 +15,7 @@ \title Customizing the Build Process To configure how projects are built, deployed, and run, select - \uicontrol Edit > \uicontrol Preferences > \uicontrol {Build & Run} - > \uicontrol General. + \preferences > \uicontrol {Build & Run} > \uicontrol General. \image qtcreator-project-options-deploy.png "Project General preferences" diff --git a/doc/qtcreator/src/projects/creator-only/creator-projects-compilers.qdoc b/doc/qtcreator/src/projects/creator-only/creator-projects-compilers.qdoc index 0499de45f7a..b95dfa284dd 100644 --- a/doc/qtcreator/src/projects/creator-only/creator-projects-compilers.qdoc +++ b/doc/qtcreator/src/projects/creator-only/creator-projects-compilers.qdoc @@ -23,8 +23,8 @@ particular platform. \QC automatically detects the compilers that your system or \QOI - registers and lists them in \uicontrol Edit > \uicontrol Preferences > - \uicontrol Kits > \uicontrol Compilers. + registers and lists them in \preferences > \uicontrol Kits > + \uicontrol Compilers. \image qtcreator-toolchains.png @@ -51,8 +51,7 @@ To add a C or C++ compiler: \list 1 - \li Select \uicontrol Edit > \uicontrol Preferences > - \uicontrol Kits > \uicontrol Compilers. + \li Select \preferences > \uicontrol Kits > \uicontrol Compilers. \li Select \uicontrol Add to add a new compiler or \uicontrol Clone to add another version of the selected compiler. \li Select a compiler in the list. @@ -197,12 +196,11 @@ these compilers, you also specify the path to the script that sets up the command prompt in the \uicontrol Initialization field. - You specify the compiler to use for each kit in \uicontrol Edit > - \uicontrol Preferences > \uicontrol Kits. + You specify the compiler to use for each kit in \preferences > + \uicontrol Kits. To set compiler preferences according to the compiler type, select - \uicontrol Edit > \uicontrol Preferences > \uicontrol Kits > - \uicontrol Compilers: + \preferences > \uicontrol Kits > \uicontrol Compilers: \list @@ -265,10 +263,9 @@ \title Add Nim compilers - To build an application using the Nim Compiler, select \uicontrol Edit > - \uicontrol Preferences > \uicontrol Kits > \uicontrol Compilers > - \uicontrol Add > \uicontrol Nim, and specify the path to the directory where - the compiler is located. + To build an application using the Nim Compiler, select \preferences > + \uicontrol Kits > \uicontrol Compilers > \uicontrol Add > \uicontrol Nim, + and specify the path to the directory where the compiler is located. \sa {Add compilers}, {Compilers} */ @@ -281,8 +278,8 @@ \title Add custom compilers - To add a compiler that is not listed \uicontrol Edit > \uicontrol Preferences - > \uicontrol Kits > \uicontrol Compilers or to add a remote compiler, use the + To add a compiler that is not listed \preferences > + \uicontrol Kits > \uicontrol Compilers or to add a remote compiler, use the \uicontrol Custom option. Specify the paths to the directories where the compiler and make tool are located and set preferences for the compiler. @@ -292,7 +289,7 @@ \list 1 - \li Select \uicontrol Edit > \uicontrol Preferences > \uicontrol Kits > + \li Select \preferences > \uicontrol Kits > \uicontrol Compilers > \uicontrol Add > \uicontrol Custom > \uicontrol C or \uicontrol C++. diff --git a/doc/qtcreator/src/projects/creator-only/creator-projects-creating.qdoc b/doc/qtcreator/src/projects/creator-only/creator-projects-creating.qdoc index 291450cf57e..e1949ac815e 100644 --- a/doc/qtcreator/src/projects/creator-only/creator-projects-creating.qdoc +++ b/doc/qtcreator/src/projects/creator-only/creator-projects-creating.qdoc @@ -165,9 +165,9 @@ not need to navigate to \uicontrol File > \uicontrol {New File} or \uicontrol {New Project}. - Set keyboard shortcuts for wizards in \uicontrol Edit > - \uicontrol Preferences > \uicontrol Environment > \uicontrol Keyboard > - \uicontrol Wizard. All wizard actions start with \uicontrol Impl there. + Set keyboard shortcuts for wizards in \preferences > \uicontrol Environment > + \uicontrol Keyboard > \uicontrol Wizard. All wizard actions start with + \uicontrol Impl there. \sa {Assign keyboard shortcuts}, {Activate kits for a project}, {Create files}, {Creating Projects} diff --git a/doc/qtcreator/src/projects/creator-only/creator-projects-custom-wizards.qdoc b/doc/qtcreator/src/projects/creator-only/creator-projects-custom-wizards.qdoc index 8f685b728dd..3abd3a1ab6a 100644 --- a/doc/qtcreator/src/projects/creator-only/creator-projects-custom-wizards.qdoc +++ b/doc/qtcreator/src/projects/creator-only/creator-projects-custom-wizards.qdoc @@ -85,9 +85,8 @@ \QC has some actions that can improve the wizard development process. They don't have keyboard shortcuts by default, so you cannot trigger them. To - enable them, assign keyboard shortcuts in \uicontrol Edit > - \uicontrol Preferences > \uicontrol Environment > \uicontrol Keyboard > - \uicontrol Wizard. + enable them, assign keyboard shortcuts in \preferences > + \uicontrol Environment > \uicontrol Keyboard > \uicontrol Wizard. The following actions can help with wizard development: diff --git a/doc/qtcreator/src/projects/creator-only/creator-projects-debuggers.qdoc b/doc/qtcreator/src/projects/creator-only/creator-projects-debuggers.qdoc index 4594fa34251..8762a9e97b1 100644 --- a/doc/qtcreator/src/projects/creator-only/creator-projects-debuggers.qdoc +++ b/doc/qtcreator/src/projects/creator-only/creator-projects-debuggers.qdoc @@ -22,14 +22,13 @@ The debugger plugin automatically selects a suitable native debugger for each \l{glossary-buildandrun-kit}{kit} from the ones found on your system. - To override this choice, select \uicontrol Edit > \uicontrol Preferences > - \uicontrol Kits. + To override this choice, select \preferences > \uicontrol Kits. To add debuggers: \list 1 - \li Select \uicontrol Edit > \uicontrol Preferences > \uicontrol Kits > + \li Select \preferences > \uicontrol Kits > \uicontrol Debuggers > \uicontrol Add. \image qtcreator-preferences-kits-debuggers.webp {Debuggers tab in Kits preferences} diff --git a/doc/qtcreator/src/projects/creator-only/creator-projects-kits.qdoc b/doc/qtcreator/src/projects/creator-only/creator-projects-kits.qdoc index 16f14496f8d..b6967cfcc6b 100644 --- a/doc/qtcreator/src/projects/creator-only/creator-projects-kits.qdoc +++ b/doc/qtcreator/src/projects/creator-only/creator-projects-kits.qdoc @@ -43,7 +43,7 @@ \list 1 - \li Select \uicontrol Edit > \uicontrol Preferences > \uicontrol Kits. + \li Select \preferences > \uicontrol Kits. \li Select \uicontrol Add to start from an empty kit or \uicontrol Clone to clone the selected kit and edit its preferences. \image qtcreator-kits.png @@ -78,7 +78,7 @@ Typically, only a subset of the kit preferences is relevant for a particular setup. Therefore, \QC plugins register sets of relevant preferences that you - can view and modify in \uicontrol Edit > \uicontrol Preferences > + can view and modify in \preferences > \uicontrol Kits. For example, if you use CMake to build all your projects, you can hide Qbs and qmake preferences by default. diff --git a/doc/qtcreator/src/projects/creator-only/creator-projects-nimble.qdoc b/doc/qtcreator/src/projects/creator-only/creator-projects-nimble.qdoc index 1b89d7a3e22..d9e1f9bb8a9 100644 --- a/doc/qtcreator/src/projects/creator-only/creator-projects-nimble.qdoc +++ b/doc/qtcreator/src/projects/creator-only/creator-projects-nimble.qdoc @@ -32,7 +32,7 @@ To configure \QC to build Nim executables: \list 1 - \li Select \uicontrol Edit > \uicontrol Preferences > \uicontrol Kits + \li Select \preferences > \uicontrol Kits > \uicontrol Compilers > \uicontrol Add > \uicontrol Nim to specify the path to the Nim compiler. \li Select \uicontrol Apply to add the compiler. diff --git a/doc/qtcreator/src/projects/creator-only/creator-projects-opening.qdoc b/doc/qtcreator/src/projects/creator-only/creator-projects-opening.qdoc index 789dd63700c..a7290ca18cc 100644 --- a/doc/qtcreator/src/projects/creator-only/creator-projects-opening.qdoc +++ b/doc/qtcreator/src/projects/creator-only/creator-projects-opening.qdoc @@ -71,13 +71,12 @@ \endlist The \uicontrol {Configure Project} tab displays a list of kits that you - install on the development PC and configure in \uicontrol Edit > - \uicontrol Preferences > \uicontrol Kits. + install on the development PC and configure in \preferences > \uicontrol Kits. Even if you do not intend to build the project, the C++ and QML code models need a Qt version and compiler to offer code completion. To specify them, - select the \uicontrol Preferences link, or select \uicontrol Edit > - \uicontrol Preferences > \uicontrol Kits. + select the \uicontrol Preferences link, or select \preferences > + \uicontrol Kits. Qt for Python projects rely on the \l{Using Language Servers} {language server client} for code completion, highlighting, and diff --git a/doc/qtcreator/src/projects/creator-only/creator-projects-qbs.qdoc b/doc/qtcreator/src/projects/creator-only/creator-projects-qbs.qdoc index deb2041ad6a..bf88413305f 100644 --- a/doc/qtcreator/src/projects/creator-only/creator-projects-qbs.qdoc +++ b/doc/qtcreator/src/projects/creator-only/creator-projects-qbs.qdoc @@ -22,8 +22,8 @@ with the build and run kit. \QC automatically creates a Qbs profile for each kit. You can edit the build profiles by adding new keys and values. - To check which Qbs version is being used, select \uicontrol Edit > - \uicontrol Preferences > \uicontrol Qbs > \uicontrol General. + To check which Qbs version is being used, select \preferences > + \uicontrol Qbs > \uicontrol General. \section1 Building Qbs @@ -49,7 +49,7 @@ To specify settings for Qbs: \list 1 - \li Select \uicontrol Edit > \uicontrol Preferences > \uicontrol Qbs. + \li Select \preferences > \uicontrol Qbs. \image qtcreator-options-qbs.png "Qbs preferences" \li Deselect the \uicontrol {Use \QC settings directory for Qbs} check box to store Qbs profiles in the Qbs settings directory. @@ -64,7 +64,7 @@ \image creator-qbs-profiles.png "Qbs Profiles tab" \li In the \uicontrol Kit field, select a build and run kit to view the properties of the associated profile. To modify the properties, - select \uicontrol Edit > \uicontrol Preferences > \uicontrol Kits. + select \preferences > \uicontrol Kits. For more information, see \l{Edit Qbs profiles}. \endlist diff --git a/doc/qtcreator/src/projects/creator-only/creator-projects-qt-versions.qdoc b/doc/qtcreator/src/projects/creator-only/creator-projects-qt-versions.qdoc index 1e6f3abf67a..63090c65c87 100644 --- a/doc/qtcreator/src/projects/creator-only/creator-projects-qt-versions.qdoc +++ b/doc/qtcreator/src/projects/creator-only/creator-projects-qt-versions.qdoc @@ -19,8 +19,8 @@ build your projects. For example, \l{glossary-device}{device} manufacturers offer special Qt versions for developing applications for their devices. - To view the installed Qt versions, select \uicontrol Edit > - \uicontrol Preferences > \uicontrol Kits \uicontrol {Qt Versions}. + To view the installed Qt versions, select \preferences > \uicontrol Kits > + \uicontrol {Qt Versions}. \image qtcreator-qt-versions.png {Qt Versions tab in Kit preferences} @@ -42,9 +42,7 @@ To link to a Qt installation: \list 1 - \li Select \uicontrol Edit > \uicontrol Preferences > - (or \uicontrol {Qt Creator} > \uicontrol Preferences on - \macos) > \uicontrol Kits > \uicontrol {Qt Versions} > + \li Select \preferences > \uicontrol Kits > \uicontrol {Qt Versions} > \uicontrol {Link with Qt}. \image qtcreator-link-with-qt.png {Choose Qt Installation dialog} \li In the \uicontrol {Qt installation path} field, enter the path to @@ -61,8 +59,8 @@ under \uicontrol Auto-detected, set it up manually. You specify the Qt version to use for each \l{glossary-buildandrun-kit} - {kit} for building and running your projects - in \uicontrol Edit > \uicontrol Preferences > \uicontrol Kits. + {kit} for building and running your projects in \preferences > + \uicontrol Kits. \section1 Set up new Qt versions @@ -70,7 +68,7 @@ \list 1 - \li Select \uicontrol Edit > \uicontrol Preferences > \uicontrol Kits > + \li Select \preferences > \uicontrol Kits > \uicontrol {Qt Versions} > \uicontrol Add. \li Select the qmake executable for the Qt version to add. diff --git a/doc/qtcreator/src/projects/creator-only/creator-projects-settings-editor.qdoc b/doc/qtcreator/src/projects/creator-only/creator-projects-settings-editor.qdoc index 384874405a7..ba622d8b2ae 100644 --- a/doc/qtcreator/src/projects/creator-only/creator-projects-settings-editor.qdoc +++ b/doc/qtcreator/src/projects/creator-only/creator-projects-settings-editor.qdoc @@ -38,6 +38,6 @@ \sa {Configuring Fonts}, {File Encoding}, {Moving to Symbol Definition or Declaration}, {Indent text or code}, - {Highlighting and Folding Blocks}, {Selecting Line Ending Style}, + {Selecting Line Ending Style}, {Semantic Highlighting}, {View function tooltips} */ diff --git a/doc/qtcreator/src/projects/creator-only/creator-projects-settings-environment.qdoc b/doc/qtcreator/src/projects/creator-only/creator-projects-settings-environment.qdoc index 1d99a0bf650..dd3534bb904 100644 --- a/doc/qtcreator/src/projects/creator-only/creator-projects-settings-environment.qdoc +++ b/doc/qtcreator/src/projects/creator-only/creator-projects-settings-environment.qdoc @@ -19,7 +19,7 @@ based on your project requirements. To globally change the system environment from the one in which - \QC is started, select \uicontrol Edit > \uicontrol Preferences > + \QC is started, select \preferences > \uicontrol Environment > \uicontrol System, and then select \uicontrol Change in the \uicontrol Environment field. diff --git a/doc/qtcreator/src/projects/creator-only/creator-projects-settings-overview.qdoc b/doc/qtcreator/src/projects/creator-only/creator-projects-settings-overview.qdoc index 3276706a95e..ba199b27297 100644 --- a/doc/qtcreator/src/projects/creator-only/creator-projects-settings-overview.qdoc +++ b/doc/qtcreator/src/projects/creator-only/creator-projects-settings-overview.qdoc @@ -40,6 +40,7 @@ \li \l{Parsing C++ Files with the Clang Code Model}{Clangd} \li \l{Using Clang Tools}{Clang Tools} \li \l{Specify code style}{C++ Code Style} + \li \l{Set C++ file naming preferences}{C++ File Naming} \li \l{Using Custom Output Parsers}{Custom Output Parsers} \li \l{Specify dependencies}{Dependencies} \li \l{Document code}{Documentation Comments} @@ -70,7 +71,7 @@ \image qtcreator-project-kits.png - The list displays kits from \uicontrol Edit > \uicontrol Preferences > + The list displays kits from \preferences > \uicontrol Kits. Warning and error icons indicate that the kit configuration is not suitable for the project type. To view the warning and error messages, move the mouse pointer over the kit name. diff --git a/doc/qtcreator/src/projects/creator-only/creator-projects-settings-run-analyze.qdocinc b/doc/qtcreator/src/projects/creator-only/creator-projects-settings-run-analyze.qdocinc index f7adfa4cd2d..e54035966d5 100644 --- a/doc/qtcreator/src/projects/creator-only/creator-projects-settings-run-analyze.qdocinc +++ b/doc/qtcreator/src/projects/creator-only/creator-projects-settings-run-analyze.qdocinc @@ -47,8 +47,8 @@ Click \uicontrol {Restore Global} to revert to the global settings. - To specify global Valgrind settings, select \uicontrol Edit > - \uicontrol Preferences > \uicontrol Analyzer. + To specify global Valgrind settings, select \preferences > + \uicontrol Analyzer. //! [settings valgrind] */ diff --git a/doc/qtcreator/src/projects/creator-only/creator-projects-settings-run-desktop.qdocinc b/doc/qtcreator/src/projects/creator-only/creator-projects-settings-run-desktop.qdocinc index 82217c4d7a1..caadbe3b463 100644 --- a/doc/qtcreator/src/projects/creator-only/creator-projects-settings-run-desktop.qdocinc +++ b/doc/qtcreator/src/projects/creator-only/creator-projects-settings-run-desktop.qdocinc @@ -20,10 +20,9 @@ \image qtcreator-settings-run-desktop.webp {Run Settings} For console applications, check the \uicontrol{Run in terminal} check box. - To specify the terminal to use on Linux and \macos, select \uicontrol Edit - > \uicontrol Preferences > \uicontrol Environment > \uicontrol System. To use - an \l{Terminal}{internal terminal}, select \uicontrol Edit > - \uicontrol Preferences > \uicontrol Terminal > + To specify the terminal to use on Linux and \macos, select \preferences > + \uicontrol Environment > \uicontrol System. To use an \l{Terminal} + {internal terminal}, select \preferences > \uicontrol Terminal > \uicontrol {Use internal terminal}. To run with special environment variables set up, select them in the @@ -40,8 +39,8 @@ To disable library linking for the current project, deselect the \uicontrol {Add build library search path to PATH} check box. To disable - library linking for all projects, select \uicontrol Edit > - \uicontrol Preferences > \uicontrol {Build & Run}, and then deselect the + library linking for all projects, select \preferences > + \uicontrol {Build & Run}, and then deselect the \uicontrol {Add linker library search paths to run environment} check box. The \uicontrol {Use debug version of frameworks (DYLD_IMAGE_SUFFIX=_debug)} option diff --git a/doc/qtcreator/src/projects/creator-only/creator-projects-settings-run.qdoc b/doc/qtcreator/src/projects/creator-only/creator-projects-settings-run.qdoc index 2a157391d08..e574c00a4c3 100644 --- a/doc/qtcreator/src/projects/creator-only/creator-projects-settings-run.qdoc +++ b/doc/qtcreator/src/projects/creator-only/creator-projects-settings-run.qdoc @@ -24,7 +24,7 @@ \image qtcreator-settings-run.webp {Run Settings} To prevent \QC from automatically creating run configurations, select - \uicontrol Edit > \uicontrol Preferences > \uicontrol {Build & Run}, + \preferences > \uicontrol {Build & Run}, and then deselect the \uicontrol {Create suitable run configurations automatically} check box. diff --git a/doc/qtcreator/src/projects/creator-projects-running.qdoc b/doc/qtcreator/src/projects/creator-projects-running.qdoc index a6311d58d0a..81756d4a408 100644 --- a/doc/qtcreator/src/projects/creator-projects-running.qdoc +++ b/doc/qtcreator/src/projects/creator-projects-running.qdoc @@ -25,7 +25,7 @@ To run executable files without deploying them first, select \uicontrol Build > \uicontrol {Run Without Deployment}. To make this the default option, deselect the - \uicontrol Edit > \uicontrol Preferences > \uicontrol {Build & Run} > + \preferences > \uicontrol {Build & Run} > \uicontrol General > \uicontrol {Always deploy project before running it} check box. diff --git a/doc/qtcreator/src/python/creator-python-development.qdoc b/doc/qtcreator/src/python/creator-python-development.qdoc index a41cb1f777d..550172738ec 100644 --- a/doc/qtcreator/src/python/creator-python-development.qdoc +++ b/doc/qtcreator/src/python/creator-python-development.qdoc @@ -90,8 +90,7 @@ To see the available interpreters and choose another interpreter, select the current interpreter, and then select \uicontrol {Manage Python Interpreters}. - Or, select \uicontrol Edit > \uicontrol Preferences > \uicontrol Python > - \uicontrol Interpreters. + Or, select \preferences > \uicontrol Python > \uicontrol Interpreters. \image qtcreator-python-interpreters.webp {Python Interpreters in Preferences} diff --git a/doc/qtcreator/src/qnx/creator-developing-qnx.qdoc b/doc/qtcreator/src/qnx/creator-developing-qnx.qdoc index 8adb5ebe37e..d7ec1e64177 100644 --- a/doc/qtcreator/src/qnx/creator-developing-qnx.qdoc +++ b/doc/qtcreator/src/qnx/creator-developing-qnx.qdoc @@ -24,7 +24,7 @@ \section1 Add kits for QNX Devices - To view QNX device settings, select \uicontrol Edit > \uicontrol Preferences > + To view QNX device settings, select \preferences > \uicontrol Devices > \uicontrol QNX. Select the \uicontrol {Generate kits} check box to allow \QC to generate kits for QNX development. diff --git a/doc/qtcreator/src/qtquick/creator-only/qtquick-creating.qdoc b/doc/qtcreator/src/qtquick/creator-only/qtquick-creating.qdoc index 93a0b3ee5ad..09efdaec1a2 100644 --- a/doc/qtcreator/src/qtquick/creator-only/qtquick-creating.qdoc +++ b/doc/qtcreator/src/qtquick/creator-only/qtquick-creating.qdoc @@ -92,10 +92,8 @@ \li Select \l{glossary-buildandrun-kit}{kits} for the platforms that you want to build the application for. - \note Kits are listed if they have been specified in \uicontrol Edit - > \uicontrol Preferences > \uicontrol Kits (on Windows and Linux) - or in \uicontrol {\QC} > \uicontrol Preferences > - \uicontrol Kits (on \macos). + \note Kits are listed if they have been specified in \preferences > + \uicontrol Kits. For more information, see \l {Add kits} and \l {Kits}. \li Select \uicontrol Next to open the \uicontrol {Project Management} @@ -170,10 +168,8 @@ \li Select \l{glossary-buildandrun-kit}{kits} for the platforms that you want to build the application for. - \note Kits are listed if they have been specified in \uicontrol Edit - > \uicontrol Preferences > \uicontrol Kits (on Windows and Linux) - or in \uicontrol {\QC} > \uicontrol Preferences > - \uicontrol Kits (on \macos). + \note Kits are listed if they have been specified in \preferences > + \uicontrol Kits. For more information, see \l {Add kits} and \l {Kits}. \li Select \uicontrol Next to open the \uicontrol {Project Management} diff --git a/doc/qtcreator/src/qtquick/creator-only/qtquick-tutorial-create-empty-project.qdocinc b/doc/qtcreator/src/qtquick/creator-only/qtquick-tutorial-create-empty-project.qdocinc index c6c11ebb917..1abd280e56b 100644 --- a/doc/qtcreator/src/qtquick/creator-only/qtquick-tutorial-create-empty-project.qdocinc +++ b/doc/qtcreator/src/qtquick/creator-only/qtquick-tutorial-create-empty-project.qdocinc @@ -42,10 +42,8 @@ applications for mobile devices, select kits also for Android and iOS. - \note The list shows kits that you specify in \uicontrol Edit - > \uicontrol Preferences > \uicontrol Kits (on Windows and Linux) - or in \uicontrol {\QC} > \uicontrol Preferences > - \uicontrol Kits (on \macos). + \note The list shows kits that you specify in \preferences > + \uicontrol Kits. For more information, see \l {Add kits} and \l {Kits}. \li Select \uicontrol Next to open the \uicontrol {Project Management} diff --git a/doc/qtcreator/src/qtquick/creator-preferences-qtquick-code-style.qdoc b/doc/qtcreator/src/qtquick/creator-preferences-qtquick-code-style.qdoc index 6b179916457..6ea13251620 100644 --- a/doc/qtcreator/src/qtquick/creator-preferences-qtquick-code-style.qdoc +++ b/doc/qtcreator/src/qtquick/creator-preferences-qtquick-code-style.qdoc @@ -19,8 +19,7 @@ To specify QML code style globally: \list 1 - \li Select \uicontrol Edit > \uicontrol Preferences > - \uicontrol {Qt Quick}. + \li Select \preferences > \uicontrol {Qt Quick}. \li In the \uicontrol {Current settings} field, select the settings to modify and click \uicontrol Copy. \image qtcreator-options-code-style-qml.png {QML Code Style preferences} @@ -41,6 +40,6 @@ \sa {Indent text or code} \if defined(qtcreator) - \sa {Find a particular preference}, {Specify code style} + \sa {Find preferences}, {Specify code style} \endif */ diff --git a/doc/qtcreator/src/qtquick/qtquick-profiler.qdoc b/doc/qtcreator/src/qtquick/qtquick-profiler.qdoc index 61033ee685d..0fd232d8b9c 100644 --- a/doc/qtcreator/src/qtquick/qtquick-profiler.qdoc +++ b/doc/qtcreator/src/qtquick/qtquick-profiler.qdoc @@ -124,7 +124,7 @@ You can specify flushing settings for the QML Profiler either globally for all projects or separately for each project. To specify global settings, - select \uicontrol Edit > \uicontrol Preferences > \uicontrol Analyzer. + select \preferences > \uicontrol Analyzer. To specify custom QML Profiler settings for a particular project, select \uicontrol Projects > \uicontrol Run and then select \uicontrol Custom in diff --git a/doc/qtcreator/src/qtquick/qtquick-toolbars.qdoc b/doc/qtcreator/src/qtquick/qtquick-toolbars.qdoc index f5c3bafc894..2363e10a56b 100644 --- a/doc/qtcreator/src/qtquick/qtquick-toolbars.qdoc +++ b/doc/qtcreator/src/qtquick/qtquick-toolbars.qdoc @@ -24,7 +24,7 @@ . Select the icon to open the toolbar. To open toolbars immediately when you select a QML type, select - \uicontrol Edit > \uicontrol Preferences > \uicontrol {Qt Quick} > + \preferences > \uicontrol {Qt Quick} > \uicontrol {QML/JS Editing} > \uicontrol {Always show Qt Quick Toolbar}. \image qtcreator-qml-js-editing.webp {QML/JS Editing preferences} diff --git a/doc/qtcreator/src/user-interface/creator-file-system-view.qdoc b/doc/qtcreator/src/user-interface/creator-file-system-view.qdoc index e8d4eeb97e5..b76e90ec8ea 100644 --- a/doc/qtcreator/src/user-interface/creator-file-system-view.qdoc +++ b/doc/qtcreator/src/user-interface/creator-file-system-view.qdoc @@ -32,8 +32,8 @@ in the menu (1). Select \uicontrol Home to move to the user's home directory. Further, you can select a project to move to an open project or \uicontrol Projects to move to the directory specified in the - \uicontrol {Projects directory} field in \uicontrol Edit > - \uicontrol Preferences > \uicontrol {Build & Run} > \uicontrol General. + \uicontrol {Projects directory} field in \preferences > + \uicontrol {Build & Run} > \uicontrol General. The file that is currently active in the editor determines which folder to display in the \uicontrol {File System} view: @@ -62,12 +62,11 @@ \li Show the file or directory in the file explorer. \li Open a terminal window in the selected directory or in the directory that has the file. To specify the terminal to use on Linux and - \macos, select \uicontrol Edit > \uicontrol Preferences > - \uicontrol Environment > \uicontrol System. + \macos, select \preferences > \uicontrol Environment > + \uicontrol System. \if defined(qtcreator) - To use an \l{Terminal} {internal terminal}, select \uicontrol Edit > - \uicontrol Preferences > \uicontrol Terminal > - \uicontrol {Use internal terminal}. + To use an \l{Terminal} {internal terminal}, select \preferences > + \uicontrol Terminal > \uicontrol {Use internal terminal}. \endif \li Search from the selected directory. \li View file properties, such as name, path, MIME type, default editor, diff --git a/doc/qtcreator/src/user-interface/creator-how-to-view-output.qdoc b/doc/qtcreator/src/user-interface/creator-how-to-view-output.qdoc index a6e4746e7c8..b83a54dbe39 100644 --- a/doc/qtcreator/src/user-interface/creator-how-to-view-output.qdoc +++ b/doc/qtcreator/src/user-interface/creator-how-to-view-output.qdoc @@ -52,8 +52,8 @@ If the text in the output is not displayed correctly, \QC might be using a different codec from the one used by the tools that generate - the output. To specify the codec to use, select \uicontrol Edit > - \uicontrol Preferences > \uicontrol Environment > \uicontrol Interface, and + the output. To specify the codec to use, select \preferences > + \uicontrol Environment > \uicontrol Interface, and then select the codec in the \uicontrol {Text codec for tools} field. \image qtcreator-preferences-environment-interface.webp {Interface tab in Environment preferences} diff --git a/doc/qtcreator/src/user-interface/creator-only/creator-how-to-show-and-hide-main-menu.qdoc b/doc/qtcreator/src/user-interface/creator-only/creator-how-to-show-and-hide-main-menu.qdoc index 4055f0b7d45..22d57b98c27 100644 --- a/doc/qtcreator/src/user-interface/creator-only/creator-how-to-show-and-hide-main-menu.qdoc +++ b/doc/qtcreator/src/user-interface/creator-only/creator-how-to-show-and-hide-main-menu.qdoc @@ -10,7 +10,7 @@ \title Show and hide the main menu On Linux and Windows, you can hide the main menu bar to save space on the - screen. Select \uicontrol View, and deselect the \uicontrol {Show Menubar} + screen. Select \uicontrol View, and deselect the \uicontrol {Show Menu Bar} check box. \image qtcreator-without-menubar.webp {Qt Creator without the main menu} diff --git a/doc/qtcreator/src/user-interface/creator-only/creator-reference-terminal-view.qdoc b/doc/qtcreator/src/user-interface/creator-only/creator-reference-terminal-view.qdoc index abfae8ba8b2..96cecd089dc 100644 --- a/doc/qtcreator/src/user-interface/creator-only/creator-reference-terminal-view.qdoc +++ b/doc/qtcreator/src/user-interface/creator-only/creator-reference-terminal-view.qdoc @@ -15,13 +15,12 @@ application or the \uicontrol {Open Terminal} button to open a terminal, it opens as an output view. - To open the terminal in a separate window, select \uicontrol Edit > - \uicontrol Preferences > \uicontrol Terminal, and deselet the - \uicontrol {Use internal terminal} check box. + To open the terminal in a separate window, select \preferences > + \uicontrol Terminal, and deselet the \uicontrol {Use internal terminal} + check box. On Linux and \macos, you can set the terminal to open by selecting - \uicontrol Edit > \uicontrol Preferences > - \uicontrol Environment > \uicontrol System. + \preferences > \uicontrol Environment > \uicontrol System. \image qtcreator-output-terminal.webp {Terminal pane} @@ -63,9 +62,9 @@ \section1 Terminal Preferences - To set preferences for the internal terminal, select \uicontrol Edit > - \uicontrol Preferences > \uicontrol Terminal, or select the - \uicontrol Configure button in the \uicontrol Terminal pane. + To set preferences for the internal terminal, select \preferences > + \uicontrol Terminal, or select the \uicontrol Configure button in + the \uicontrol Terminal pane. \image qtcreator-preferences-terminal.webp {Terminal tab in Preferences} diff --git a/doc/qtcreator/src/user-interface/creator-only/creator-reference-to-do-entries-view.qdoc b/doc/qtcreator/src/user-interface/creator-only/creator-reference-to-do-entries-view.qdoc index da32faf7bf0..f7d1b97a428 100644 --- a/doc/qtcreator/src/user-interface/creator-only/creator-reference-to-do-entries-view.qdoc +++ b/doc/qtcreator/src/user-interface/creator-only/creator-reference-to-do-entries-view.qdoc @@ -34,7 +34,7 @@ \section1 To-Do Preferences - To add keywords, select \uicontrol Edit > \uicontrol Preferences > + To add keywords, select \preferences > \uicontrol {To-Do} > \uicontrol Add. Set an icon and a line background color for the keyword. diff --git a/doc/qtcreator/src/user-interface/creator-open-documents-view.qdoc b/doc/qtcreator/src/user-interface/creator-open-documents-view.qdoc index 0ad0967dc0c..e758c6c2b27 100644 --- a/doc/qtcreator/src/user-interface/creator-open-documents-view.qdoc +++ b/doc/qtcreator/src/user-interface/creator-open-documents-view.qdoc @@ -36,8 +36,7 @@ \section1 Setting Preferences for Opening Files To set preferences for opening files and handling open files, select - \uicontrol Edit > \uicontrol Preferences > \uicontrol Environment > - \uicontrol System: + \preferences > \uicontrol Environment > \uicontrol System: \image qtcreator-options-environment-system.png {System tab in Environment preferences} diff --git a/doc/qtcreator/src/user-interface/creator-projects-view.qdoc b/doc/qtcreator/src/user-interface/creator-projects-view.qdoc index 9c811bd2799..27984807fd0 100644 --- a/doc/qtcreator/src/user-interface/creator-projects-view.qdoc +++ b/doc/qtcreator/src/user-interface/creator-projects-view.qdoc @@ -92,12 +92,11 @@ \li Search from the selected directory. \li Open a terminal window in the project directory. To specify the - terminal to use on Linux and \macos, select \uicontrol Edit > - \uicontrol Preferences > \uicontrol Environment > \uicontrol System. + terminal to use on Linux and \macos, select \preferences > + \uicontrol Environment > \uicontrol System. \if defined(qtcreator) - To use an \l{Terminal}{internal terminal}, select \uicontrol Edit > - \uicontrol Preferences > \uicontrol Terminal > - \uicontrol {Use internal terminal}. + To use an \l{Terminal}{internal terminal}, select \preferences > + \uicontrol Terminal > \uicontrol {Use internal terminal}. \endif \li Open a terminal window in the project directory that you configured for building or running the project. @@ -106,9 +105,9 @@ \li Close all files in a project. \li Close the selected project or all projects except the selected one. By default, this closes all files in the projects. To keep - them open, deselect the \uicontrol Edit > - \uicontrol Preferences > \uicontrol {Build & Run} > \uicontrol General - > \uicontrol {Close source files along with project} check box. + them open, deselect the \preferences > \uicontrol {Build & Run} > + \uicontrol General > \uicontrol {Close source files along with project} + check box. \endlist For managing files and directories, use the same functions as in diff --git a/doc/qtcreator/src/user-interface/creator-reference-output-views.qdoc b/doc/qtcreator/src/user-interface/creator-reference-output-views.qdoc index 7fdfc296f02..523906cbc75 100644 --- a/doc/qtcreator/src/user-interface/creator-reference-output-views.qdoc +++ b/doc/qtcreator/src/user-interface/creator-reference-output-views.qdoc @@ -57,8 +57,8 @@ or press \key F6 and \key Shift+F6. By default, a new build clears the \uicontrol Issues view. To keep - the issues from the previous build rounds, deselect \uicontrol Edit > - \uicontrol Preferences > \uicontrol {Build & Run} > \uicontrol General > + the issues from the previous build rounds, deselect \preferences > + \uicontrol {Build & Run} > \uicontrol General > \uicontrol {Clear issues list on new build}. \sa {View output} @@ -133,8 +133,8 @@ To set preferences for displaying application output: \list - \li Select \uicontrol Edit > \uicontrol Preferences > - \uicontrol {Build & Run} > \uicontrol {Application Output}. + \li Select \preferences > \uicontrol {Build & Run} > + \uicontrol {Application Output}. \li Select the \inlineimage icons/settings.png (\uicontrol {Open Settings Page}) button. \endlist @@ -190,8 +190,8 @@ \li In the \uicontrol {Compile Output} view, select \inlineimage icons/settings.png (\uicontrol {Open Settings Page}). - \li Select \uicontrol Edit > \uicontrol Preferences > - \uicontrol {Build & Run} > \uicontrol {Compile Output}. + \li Select \preferences > \uicontrol {Build & Run} > + \uicontrol {Compile Output}. \endlist \image qtcreator-preferences-compile-output.webp {Compile Output tab in Preferences} \li Select the \uicontrol {Open Compile Output when building} check box. diff --git a/doc/qtcreator/src/user-interface/creator-ui.qdoc b/doc/qtcreator/src/user-interface/creator-ui.qdoc index d7cd495e515..bf4bb2c455d 100644 --- a/doc/qtcreator/src/user-interface/creator-ui.qdoc +++ b/doc/qtcreator/src/user-interface/creator-ui.qdoc @@ -103,7 +103,7 @@ To toggle the visibility of these menu items: \list 1 - \li Go to \uicontrol Edit > \uicontrol Preferences. + \li Go to \preferences. \li On the \uicontrol Environment tab, select \uicontrol{Qt Design Studio Configuration}. \li Clear the checkbox for the items that you want to be visible. @@ -118,7 +118,7 @@ The following topics describe how to customize the UI: \list - \li \l {Find menu items on \macos} + \li \l {Find preferences} \li \l {Set high DPI scaling} \li \l {Switch UI themes} \li \l {View output} diff --git a/doc/qtcreator/src/vcs/creator-only/creator-vcs-bazaar.qdoc b/doc/qtcreator/src/vcs/creator-only/creator-vcs-bazaar.qdoc index de27eee29ff..d5d2b9a06a8 100644 --- a/doc/qtcreator/src/vcs/creator-only/creator-vcs-bazaar.qdoc +++ b/doc/qtcreator/src/vcs/creator-only/creator-vcs-bazaar.qdoc @@ -46,7 +46,7 @@ \section1 Bazaar Preferences - To set Bazaar preferences, select \uicontrol Edit > \uicontrol Preferences > + To set Bazaar preferences, select \preferences > \uicontrol {Version Control} > \uicontrol Bazaar: \image qtcreator-preferences-vcs-bazaar.webp {Bazaar preferences} diff --git a/doc/qtcreator/src/vcs/creator-only/creator-vcs-clearcase.qdoc b/doc/qtcreator/src/vcs/creator-only/creator-vcs-clearcase.qdoc index 8ada90c1193..740eabe5a8b 100644 --- a/doc/qtcreator/src/vcs/creator-only/creator-vcs-clearcase.qdoc +++ b/doc/qtcreator/src/vcs/creator-only/creator-vcs-clearcase.qdoc @@ -31,8 +31,8 @@ \li Download \l{http://gnuwin32.sourceforge.net/packages/diffutils.htm} {Diffutils} and extract it to a directory in your PATH. - \li Select \uicontrol Edit > \uicontrol Preferences > - \uicontrol {Version Control} > \uicontrol ClearCase. + \li Select \preferences > \uicontrol {Version Control} > + \uicontrol ClearCase. \image qtcreator-preferences-vcs-clearcase.webp {ClearCase preferences} @@ -53,8 +53,8 @@ \uicontrol ClearCase > \uicontrol {Check Out}. If you check out files in a Unified Change Management (UCM) view, they are added to the change set of a UCM activity. By default, the activities are automatically assigned names. - To disable this functionality, select \uicontrol Edit > \uicontrol Preferences - > \uicontrol {Version Control} > \uicontrol ClearCase, and then deselect the + To disable this functionality, select \preferences > + \uicontrol {Version Control} > \uicontrol ClearCase, and then deselect the \uicontrol {Auto assign activity names} check box. To automatically check out files when you edit them, select the @@ -71,15 +71,14 @@ To create a permanent new version of the current file or all files in the versioned object base (VOB), select \uicontrol Tools > \uicontrol {ClearCase} > \uicontrol {Check In}. To confirm - that you want to check in the files, select \uicontrol Edit > - \uicontrol Preferences > \uicontrol {Version Control} > \uicontrol ClearCase, + that you want to check in the files, select \preferences > + \uicontrol {Version Control} > \uicontrol ClearCase, and then select the \uicontrol {Prompt on check-in} check box. By default, you have to enter a comment when checking files out or in. - To suppress this prompt, select \uicontrol Edit > \uicontrol Preferences > - \uicontrol {Version Control} > \uicontrol ClearCase, and then select the - \uicontrol {Do not prompt for comment during checkout or check-in} check - box. + To suppress this prompt, select \preferences > \uicontrol {Version Control} > + \uicontrol ClearCase, and then select the + \uicontrol {Do not prompt for comment during checkout or check-in} check box. If you change the read-only attribute of a file that is loaded into a snapshot view and modify the file without checking it out, you \e hijack the @@ -87,8 +86,8 @@ \uicontrol Tools > \uicontrol ClearCase > \uicontrol {Undo Hijack}. By default, the files in the VOBs are indexed for quick access to their - statuses. To disable indexing, select \uicontrol Edit > \uicontrol Preferences - > \uicontrol {Version Control} > \uicontrol ClearCase, and then select the + statuses. To disable indexing, select \preferences > + \uicontrol {Version Control} > \uicontrol ClearCase, and then select the \uicontrol {Disable indexer} check box. To only have some VOBs indexed, specify them in the \uicontrol {Index only VOBs} field. diff --git a/doc/qtcreator/src/vcs/creator-only/creator-vcs-cvs.qdoc b/doc/qtcreator/src/vcs/creator-only/creator-vcs-cvs.qdoc index f0650434bd1..54e9b67eb91 100644 --- a/doc/qtcreator/src/vcs/creator-only/creator-vcs-cvs.qdoc +++ b/doc/qtcreator/src/vcs/creator-only/creator-vcs-cvs.qdoc @@ -34,7 +34,7 @@ \section1 CVS Preferences - To set CVS preferences, select \uicontrol Edit > \uicontrol Preferences > + To set CVS preferences, select \preferences > \uicontrol {Version Control} > \uicontrol CVS: \image qtcreator-preferences-vcs-cvs.webp {CVS preferences} diff --git a/doc/qtcreator/src/vcs/creator-only/creator-vcs-fossil.qdoc b/doc/qtcreator/src/vcs/creator-only/creator-vcs-fossil.qdoc index e52c1c37b94..f8707657876 100644 --- a/doc/qtcreator/src/vcs/creator-only/creator-vcs-fossil.qdoc +++ b/doc/qtcreator/src/vcs/creator-only/creator-vcs-fossil.qdoc @@ -29,7 +29,7 @@ \li Create or designate a directory to store local Fossil repositories and remote clones. For example: \c ~/fossils/qt. - \li Select \uicontrol Edit > \uicontrol Preferences > + \li Select \preferences > \uicontrol {Version Control} > \uicontrol Fossil, and set the designated directory in the \uicontrol {Default path} field. @@ -71,7 +71,7 @@ \section1 Fossil Preferences - To set Fossil preferences, select \uicontrol Edit > \uicontrol Preferences > + To set Fossil preferences, select \preferences > \uicontrol {Version Control} > \uicontrol Fossil: \list diff --git a/doc/qtcreator/src/vcs/creator-only/creator-vcs-gitlab.qdoc b/doc/qtcreator/src/vcs/creator-only/creator-vcs-gitlab.qdoc index 2efdb151dda..154a18ebbf5 100644 --- a/doc/qtcreator/src/vcs/creator-only/creator-vcs-gitlab.qdoc +++ b/doc/qtcreator/src/vcs/creator-only/creator-vcs-gitlab.qdoc @@ -31,8 +31,8 @@ port number, as well as an access token that you create in GitLab for \QC. The permission scope of the token must be at least \c read_api or \c api. - To specify connections to GitLab servers, select \uicontrol Edit > - \uicontrol Preferences > \uicontrol {Version Control} > \uicontrol GitLab: + To specify connections to GitLab servers, select \preferences > + \uicontrol {Version Control} > \uicontrol GitLab: \image qtcreator-gitlab-preferences.png diff --git a/doc/qtcreator/src/vcs/creator-only/creator-vcs-mercurial.qdoc b/doc/qtcreator/src/vcs/creator-only/creator-vcs-mercurial.qdoc index f729c382eb9..624e00a080a 100644 --- a/doc/qtcreator/src/vcs/creator-only/creator-vcs-mercurial.qdoc +++ b/doc/qtcreator/src/vcs/creator-only/creator-vcs-mercurial.qdoc @@ -48,8 +48,8 @@ \section1 Mercurial Preferences - To set preferences for Mercurial, select \uicontrol Edit > - \uicontrol Preferences > \uicontrol {Version Control} > \uicontrol Mercurial: + To set preferences for Mercurial, select \preferences > + \uicontrol {Version Control} > \uicontrol Mercurial: \image qtcreator-preferences-vcs-mercurial.webp {Mercurial preferences} diff --git a/doc/qtcreator/src/vcs/creator-only/creator-vcs-perforce.qdoc b/doc/qtcreator/src/vcs/creator-only/creator-vcs-perforce.qdoc index 595b81bd06e..3acacf2234f 100644 --- a/doc/qtcreator/src/vcs/creator-only/creator-vcs-perforce.qdoc +++ b/doc/qtcreator/src/vcs/creator-only/creator-vcs-perforce.qdoc @@ -32,8 +32,8 @@ \section1 Configuring Perforce - To set Perforce preferences, select \uicontrol Edit > \uicontrol Preferences - > \uicontrol {Version Control} > \uicontrol Perforce: + To set Perforce preferences, select \preferences > + \uicontrol {Version Control} > \uicontrol Perforce: \image qtcreator-preferences-vcs-perforce.webp {Perforce preferences} @@ -55,8 +55,8 @@ \l {Use common VCS Functions}, you can select \uicontrol Tools > \uicontrol Perforce > \uicontrol {Edit File} to open a file for editing within the client workspace. By default, files are automatically opened for - editing. To disable this feature, select \uicontrol Edit > - \uicontrol Preferences > \uicontrol {Version Control} > \uicontrol Perforce, + editing. To disable this feature, select \preferences > + \uicontrol {Version Control} > \uicontrol Perforce, and then deselect the \uicontrol {Automatically open files when editing} check box. diff --git a/doc/qtcreator/src/vcs/creator-only/creator-vcs-preferences.qdoc b/doc/qtcreator/src/vcs/creator-only/creator-vcs-preferences.qdoc index 2cdfbc73803..2bf02fbe4c8 100644 --- a/doc/qtcreator/src/vcs/creator-only/creator-vcs-preferences.qdoc +++ b/doc/qtcreator/src/vcs/creator-only/creator-vcs-preferences.qdoc @@ -12,8 +12,8 @@ \QC uses the version control system's command-line clients to access your repositories. Make sure that the command-line clients are in the \c{PATH} environment variable, or specify the path to the command-line client - executable in the version control system specific tab in \uicontrol Edit > - \uicontrol Preferences > \uicontrol {Version Control}. + executable in the version control system specific tab in \preferences > + \uicontrol {Version Control}. \image qtcreator-preferences-vcs-bazaar.webp {Bazaar preferences} @@ -27,7 +27,7 @@ \section1 General VCS preferences - Select \uicontrol Edit > \uicontrol Preferences > \uicontrol {Version Control} + Select \preferences > \uicontrol {Version Control} > \uicontrol General to specify settings for submit messages: \image qtcreator-preferences-vcs-general.webp {General tab in Version Control preferences} diff --git a/doc/qtcreator/src/vcs/creator-only/creator-vcs-subversion.qdoc b/doc/qtcreator/src/vcs/creator-only/creator-vcs-subversion.qdoc index 30aafae0d8b..b4bbe897aaf 100644 --- a/doc/qtcreator/src/vcs/creator-only/creator-vcs-subversion.qdoc +++ b/doc/qtcreator/src/vcs/creator-only/creator-vcs-subversion.qdoc @@ -29,9 +29,8 @@ \section1 Subversion Preferences - To set Subversion preferences, select \uicontrol Edit > - \uicontrol Preferences > \uicontrol {Version Control} > - \uicontrol Subversion: + To set Subversion preferences, select \preferences > + \uicontrol {Version Control} > \uicontrol Subversion: \image qtcreator-preferences-vcs-subversion.webp {Subversion preferences} diff --git a/doc/qtcreator/src/vcs/creator-vcs-git.qdoc b/doc/qtcreator/src/vcs/creator-vcs-git.qdoc index 1b34918ba89..ee1ba25ed15 100644 --- a/doc/qtcreator/src/vcs/creator-vcs-git.qdoc +++ b/doc/qtcreator/src/vcs/creator-vcs-git.qdoc @@ -45,9 +45,8 @@ you run Git from a Windows command prompt, it looks for the SSH keys in its installation directory, and therefore, the authorization fails. - You can set the \c HOME environment variable from \QC. Select - \uicontrol Edit > \uicontrol Preferences > \uicontrol {Version Control} > - \uicontrol Git, and then select the + You can set the \c HOME environment variable from \QC. Select \preferences > + \uicontrol {Version Control} > \uicontrol Git, and then select the \uicontrol {Set "HOME" environment variable} check box. \c HOME is set to \c %HOMEDRIVE%%HOMEPATH% when the Git executable is run and authorization works as it would with \c {git bash}. @@ -93,9 +92,8 @@ The log output has the date, the commit message, and a commit identifier. - You can set the maximum number of log entries to show in \uicontrol Edit > - \uicontrol Preferences > \uicontrol {Version Control} > \uicontrol Git > - \uicontrol {Log count}. + You can set the maximum number of log entries to show in \preferences > + \uicontrol {Version Control} > \uicontrol Git > \uicontrol {Log count}. Click on the commit identifier to view commit details. @@ -144,8 +142,8 @@ \image qtcreator-git-blame.webp {Git Blame view} By default, each line is annotated in the editor when you scroll through - the file. To disable this feature, select \uicontrol Edit > - \uicontrol Preferences > \uicontrol {Version Control} > \uicontrol Git, and + the file. To disable this feature, select \preferences > + \uicontrol {Version Control} > \uicontrol Git, and deselect \uicontrol {Add instant blame annotations to editor}. To view annotations for the current line, select \uicontrol Tools > \uicontrol Git > \uicontrol {Current File} > \uicontrol {Instant Blame}. @@ -490,7 +488,7 @@ To pull changes from the remote repository, select \uicontrol Pull. If there are locally modified files, you are prompted to stash the changes. Select - \uicontrol Edit > \uicontrol Preferences > \uicontrol {Version Control} > + \preferences > \uicontrol {Version Control} > \uicontrol Git and then select the \uicontrol {Pull with rebase} check box to perform a rebase operation while pulling. @@ -579,8 +577,8 @@ To refresh the list of changes, select \uicontrol Refresh. The \uicontrol Remote field lists the remotes of the current repository that - are detected as Gerrit servers. Select \uicontrol Edit > \uicontrol Preferences - > \uicontrol {Version Control} > \uicontrol Gerrit to specify a fallback + are detected as Gerrit servers. Select \preferences > + \uicontrol {Version Control} > \uicontrol Gerrit to specify a fallback connection to a Gerrit server over SSH. The Gerrit REST interface and the \l{https://curl.haxx.se/}{curl} tool are used for HTTP connections. @@ -596,7 +594,7 @@ \note On \macos, the default Git installation does not have Git Gui. To use Git Gui, install it separately. To start Git Gui from \QC, select - \uicontrol Preferences > \uicontrol {Version Control} > \uicontrol Git, and + \preferences > \uicontrol {Version Control} > \uicontrol Git, and set the path to the environment that has Git Gui in the \uicontrol {Prepend to PATH} field. @@ -604,12 +602,11 @@ \uicontrol Git > \uicontrol {Git Tools} > \uicontrol Gitk. You can also start the tool to view commits in the current document or in the folder that has the current document. To specify arguments for running Gitk, select - \uicontrol Edit > \uicontrol Preferences > \uicontrol {Version Control} > - \uicontrol Git. + \preferences > \uicontrol {Version Control} > \uicontrol Git. To use some other application for viewing Git history, such as GitX or - QGit viewer, select \uicontrol Edit > \uicontrol Preferences > - \uicontrol {Version Control} > \uicontrol Git and specify the path to the + QGit viewer, select \preferences > \uicontrol {Version Control} > + \uicontrol Git and specify the path to the application executable in the \uicontrol {Command} field. To start the application, select \uicontrol Tools > \uicontrol Git > \uicontrol {Git Tools} > \uicontrol {Repository Browser}. diff --git a/doc/qtcreator/src/webassembly/creator-webassembly.qdoc b/doc/qtcreator/src/webassembly/creator-webassembly.qdoc index 64f8cd0e75e..7a84cc8c37d 100644 --- a/doc/qtcreator/src/webassembly/creator-webassembly.qdoc +++ b/doc/qtcreator/src/webassembly/creator-webassembly.qdoc @@ -71,15 +71,14 @@ To configure \QC for building Qt apps for the web: \list 1 - \li Select \uicontrol Edit > \uicontrol Preferences > \uicontrol Devices > - \uicontrol WebAssembly. + \li Select \preferences > \uicontrol Devices > \uicontrol WebAssembly. \li In the \uicontrol {Emscripten SDK path} field, enter the root directory where \c emsdk is installed. \li \QC configures the \uicontrol {Emscripten SDK environment} for you if the \c emsdk is supported by the Qt for WebAssembly version that you will use for developing the application. \image qtcreator-webassembly-options.png "Qt for WebAssembly device preferences" - \li Select \uicontrol Edit > \uicontrol Preferences > \uicontrol Kits. + \li Select \preferences > \uicontrol Kits. \image qtcreator-kit-webassembly.png "Qt for WebAssembly kit" \li In the \uicontrol Compiler group, \uicontrol {Emscripten Compiler} should have been automatically detected for both C++ and C. If not, @@ -92,8 +91,7 @@ to \QC. To add kits: \list 1 - \li Select \uicontrol Edit > \uicontrol Preferences > \uicontrol Kits > - \uicontrol Add. + \li Select \preferences > \uicontrol Kits > \uicontrol Add. \li In the \uicontrol Name field, specify a name for the kit. \li In the \uicontrol {Run device type} field, select \uicontrol {WebAssembly Runtime}. diff --git a/doc/qtcreator/src/widgets/qtdesigner-overview.qdoc b/doc/qtcreator/src/widgets/qtdesigner-overview.qdoc index 390db7f2b89..71e53130bc6 100644 --- a/doc/qtcreator/src/widgets/qtdesigner-overview.qdoc +++ b/doc/qtcreator/src/widgets/qtdesigner-overview.qdoc @@ -60,7 +60,7 @@ \list - \li Select \uicontrol Edit > \uicontrol Preferences > \uicontrol Designer. + \li Select \preferences > \uicontrol Designer. \li Specify embedded device profiles, that determine style, font, and screen resolution, for example, in \uicontrol{Embedded Design}. @@ -91,7 +91,7 @@ \list 1 - \li \uicontrol Edit > \uicontrol Preferences > \uicontrol Designer. + \li \preferences > \uicontrol Designer. \image qtdesigner-embedded-design.png "Qt Designer Embedded Design preferences" \li In \uicontrol {Embedded Design}, select \inlineimage icons/plus.png to open the \uicontrol {Add Profile} dialog. diff --git a/share/qtcreator/debugger/gdbbridge.py b/share/qtcreator/debugger/gdbbridge.py index b25c139f10f..d61160eed3b 100644 --- a/share/qtcreator/debugger/gdbbridge.py +++ b/share/qtcreator/debugger/gdbbridge.py @@ -1409,7 +1409,13 @@ class Dumper(DumperBase): 'file="%s",line="%s",module="%s",language="c"}') % (i, pc, functionName, fileName, line, objfile)) - frame = frame.older() + try: + # This may fail with something like + # gdb.error: DW_FORM_addr_index used without .debug_addr section + #[in module /data/dev/qt-6/qtbase/lib/libQt6Widgets.so.6] + frame = frame.older() + except: + break i += 1 self.put(']}') self.reportResult(self.takeOutput(), args) diff --git a/share/qtcreator/debugger/lldbbridge.py b/share/qtcreator/debugger/lldbbridge.py index da99546cec2..7b5c002b432 100644 --- a/share/qtcreator/debugger/lldbbridge.py +++ b/share/qtcreator/debugger/lldbbridge.py @@ -1836,11 +1836,11 @@ class Dumper(DumperBase): self.process.SetSelectedThreadByID(int(args['id'])) self.reportResult('', args) - def fetchFullBacktrace(self, _=None): + def fetchFullBacktrace(self, args): command = 'thread backtrace all' result = lldb.SBCommandReturnObject() self.debugger.GetCommandInterpreter().HandleCommand(command, result) - self.reportResult(self.hexencode(result.GetOutput()), {}) + self.reportResult('fulltrace="%s"' % self.hexencode(result.GetOutput()), args) def executeDebuggerCommand(self, args): self.reportToken(args) diff --git a/share/qtcreator/templates/wizards/files/testing/file.cpp b/share/qtcreator/templates/wizards/files/testing/file.cpp index 981fd0478e7..de5539dc022 100644 --- a/share/qtcreator/templates/wizards/files/testing/file.cpp +++ b/share/qtcreator/templates/wizards/files/testing/file.cpp @@ -24,8 +24,12 @@ BOOST_AUTO_TEST_CASE( %{TestCaseName} ) BOOST_AUTO_TEST_SUITE_END() @endif -@if "%{TestFrameWork}" == "Catch2" +@if "%{TestFrameWork}" == "Catch2" +@if "%{Catch2Version}" == "V2" #include +@else +#include +@endif TEST_CASE("Another test with Catch2", "[fancy]") { diff --git a/share/qtcreator/templates/wizards/files/testing/wizard.json b/share/qtcreator/templates/wizards/files/testing/wizard.json index 8a5bb84bf56..e15997abf0a 100644 --- a/share/qtcreator/templates/wizards/files/testing/wizard.json +++ b/share/qtcreator/templates/wizards/files/testing/wizard.json @@ -61,6 +61,26 @@ ] } }, + { + "name": "Catch2Version", + "trDisplayName": "Catch2 version:", + "visible": "%{JS: value('TestFrameWork') == 'Catch2'}", + "type": "ComboBox", + "data": { + "index": 1, + "items": + [ + { + "trKey": "2.x", + "value": "V2" + }, + { + "trKey": "3.x", + "value": "V3" + } + ] + } + }, { "name": "TestSuiteName", "trDisplayName": "Test suite name:", diff --git a/share/qtcreator/translations/qtcreator_cs.ts b/share/qtcreator/translations/qtcreator_cs.ts index 888786eba13..94bbf49d0b3 100644 --- a/share/qtcreator/translations/qtcreator_cs.ts +++ b/share/qtcreator/translations/qtcreator_cs.ts @@ -24897,8 +24897,8 @@ Vybere pro napodobovatele a přenosnĆ© cĆ­le vhodnĆ© verze Qt, jsou-li dostupnĆ© '%1' se nepodařilo spustit: %2 - A timeout occurred running '%1' - PřekročenĆ­ času při spuÅ”těnĆ­ '%1' + A timeout occurred running "%1". + PřekročenĆ­ času při spuÅ”těnĆ­ "%1". '%1' crashed. diff --git a/share/qtcreator/translations/qtcreator_da.ts b/share/qtcreator/translations/qtcreator_da.ts index d30843de390..8421c0a6242 100644 --- a/share/qtcreator/translations/qtcreator_da.ts +++ b/share/qtcreator/translations/qtcreator_da.ts @@ -751,12 +751,8 @@ Vil du afinstallere den eksisterende pakke? Handlingen krƦver indgriben fra brugeren. Brug kommandolinjevƦrktĆøjet "sdkmanager". - License command failed. - - - Licens-kommando mislykkedes. - - + License command failed. + Licens-kommando mislykkedes. Android SDK Manager @@ -807,16 +803,12 @@ Vil du afinstallere den eksisterende pakke? Vil du acceptere Android SDK-licensen? - Checking pending licenses... - - Tjekker afventende licenser... - + Checking pending licenses... + Tjekker afventende licenser... - -SDK Manager is busy. - -SDK manager er optaget. + SDK Manager is busy. + SDK manager er optaget. Android SDK Changes @@ -1295,12 +1287,8 @@ Installer en SDK af mindst API version %1. Mislykkedes. - Done - - - FƦrdig - - + Done + FƦrdig Installing @@ -7818,8 +7806,8 @@ Vil du drƦbe den? Kunne ikke starte "%1": %2 - A timeout occurred running "%1" - Timeout under kĆørsel af "%1" + A timeout occurred running "%1". + Timeout under kĆørsel af "%1". "%1" crashed. diff --git a/share/qtcreator/translations/qtcreator_de.ts b/share/qtcreator/translations/qtcreator_de.ts index 6ad0490d986..b16f1fe0ac9 100644 --- a/share/qtcreator/translations/qtcreator_de.ts +++ b/share/qtcreator/translations/qtcreator_de.ts @@ -6385,8 +6385,8 @@ Exporting assets: %2 - A timeout occurred running "%1" - Zeitüberschreitung bei Ausführung von "%1" + A timeout occurred running "%1". + Zeitüberschreitung bei Ausführung von "%1". "%1" crashed. @@ -9410,7 +9410,7 @@ Locked components cannot be modified or selected. Kommandozeilen-Werkzeug für Android-SDK ist installiert. - Android SDK Command-line Tools run. + Android SDK Command-line Tools runs. Kommandozeilen-Werkzeug für Android-SDK startet erfolgreich. @@ -10396,22 +10396,16 @@ Installieren Sie diese manuell, nachdem der aktuelle Vorgang abgeschlossen ist. - Checking pending licenses... - - Prüfe auf ausstehende Lizenzen... - + Checking pending licenses... + Prüfe auf ausstehende Lizenzen... - The installation of Android SDK packages may fail if the respective licenses are not accepted. - - Die Installation von Android-SDK-Paketen kann fehlschlagen, wenn die entsprechenden Lizenzen nicht akzeptiert werden. - + The installation of Android SDK packages may fail if the respective licenses are not accepted. + Die Installation von Android-SDK-Paketen kann fehlschlagen, wenn die entsprechenden Lizenzen nicht akzeptiert werden. - -SDK Manager is busy. - -SDK-Manager arbeitet. + SDK Manager is busy. + SDK-Manager arbeitet. Android SDK Changes @@ -10503,12 +10497,8 @@ Breche ausstehende Operationen ab... - License command failed. - - - Lizenzkommando fehlgeschlagen. - - + License command failed. + Lizenzkommando fehlgeschlagen. Updating installed packages. @@ -10519,12 +10509,8 @@ Breche ausstehende Operationen ab... Fehlgeschlagen. - Done - - - Fertig - - + Done + Fertig Installing @@ -10850,8 +10836,8 @@ Die Dateien aus dem Quellverzeichnis des Android-Pakets werden in das Verzeichni Klicken zum AuswƤhlen... - Images (*.png *.jpg *.jpeg *.webp *.svg) - Bilder (*.png *.jpg *.jpeg *.webp *.svg) + Images %1 + Bilder %1 %1 has been stopped. @@ -12315,8 +12301,8 @@ Siehe auch die Einstellungen für Google Test. Qt Test - <p>Multiple testcases inside a single executable are not officially supported. Depending on the implementation they might get executed or not, but never will be explicitly selectable.</p> - <p>Mehrere TestfƤlle in der gleichen ausführbaren Datei werden nicht offiziell unterstützt. AbhƤngig von der Implementation werden sie mƶglicherweise ausgeführt oder auch nicht, aber sie werden niemals explizit auswƤhlbar sein.</p> + Multiple testcases inside a single executable are not officially supported. Depending on the implementation they might get executed or not, but never will be explicitly selectable. + Mehrere TestfƤlle in der gleichen ausführbaren Datei werden nicht offiziell unterstützt. AbhƤngig von der Implementation werden sie mƶglicherweise ausgeführt oder auch nicht, aber sie werden niemals explizit auswƤhlbar sein. inherited @@ -12484,8 +12470,8 @@ Siehe auch die Einstellungen für Google Test. Zieltreiber: - Starting %1 ... - Starte %1 ... + Starting %1... + Starte %1... Choose the desired startup mode of the GDB server provider. @@ -16979,8 +16965,8 @@ Der Code wurde in die Zwischenablage kopiert. Anmeldung fehlgeschlagen - The login request failed: - Die Anmeldung ist fehlgeschlagen: + The login request failed: %1 + Die Anmeldung ist fehlgeschlagen: %1 Select Previous Copilot Suggestion @@ -17028,7 +17014,7 @@ Ansonsten müssen Sie den Pfad zur Datei %2 aus dem Copilot-Plugin für Neovim a Fordert VorschlƤge für die Cursorposition des aktuellen Editors von Copilot an. - Show next Copilot Suggestion + Show Next Copilot Suggestion NƤchsten Copilot-Vorschlag zeigen @@ -17036,7 +17022,7 @@ Ansonsten müssen Sie den Pfad zur Datei %2 aus dem Copilot-Plugin für Neovim a Iteriert über die VorschlƤge von Copilot und zeigt den nƤchsten verfügbaren Vorschlag. - Show previos Copilot Suggestion + Show Previous Copilot Suggestion Vorangehenden Copilot-Vorschlag zeigen @@ -17080,8 +17066,8 @@ Ansonsten müssen Sie den Pfad zur Datei %2 aus dem Copilot-Plugin für Neovim a Pfad zu Node.js - Select path to node.js executable. See https://nodejs.org/en/download/for installation instructions. - WƤhlen Sie den Pfad zur ausführbaren node.js-Datei. Siehe auch https://nodejs.org/en/download/ für eine Installationsanleitung. + Select path to node.js executable. See %1 for installation instructions. + WƤhlen Sie den Pfad zur ausführbaren node.js-Datei. Siehe auch %1 für eine Installationsanleitung. Path to agent.js: @@ -17092,8 +17078,8 @@ Ansonsten müssen Sie den Pfad zur Datei %2 aus dem Copilot-Plugin für Neovim a Pfad zu agent.js - Select path to agent.js in Copilot Neovim plugin. See https://github.com/github/copilot.vim#getting-started for installation instructions. - WƤhlen Sie den Pfad zur agent.js-Datei vom Copilot-Plugin für Neovim. Siehe auch https://github.com/github/copilot.vim#getting-started für eine Installationsanleitung. + Select path to agent.js in Copilot Neovim plugin. See %1 for installation instructions. + WƤhlen Sie den Pfad zur agent.js-Datei vom Copilot-Plugin für Neovim. Siehe auch %1 für eine Installationsanleitung. Auto Complete @@ -18005,8 +17991,8 @@ Trotzdem fortfahren? "%1" konnte nicht gestartet werden: %2 - A timeout occurred running "%1" - Zeitüberschreitung bei Ausführung von "%1" + A timeout occurred running "%1". + Zeitüberschreitung bei Ausführung von "%1". "%1" crashed. @@ -21886,9 +21872,9 @@ z.B. name = "m_test_foo_": Bestimmt, ob Clangd beim VervollstƤndigen von Symbolen Header-Dateien einfügen darf. - Defines the amount of time Qt Creator waits before sending document changes to the server. + Defines the amount of time %1 waits before sending document changes to the server. If the document changes again while waiting, this timeout resets. - Bestimmt die Zeit, die Qt Creator vor dem Senden von DokumentƤnderungen an den Server wartet. + Bestimmt die Zeit, die %1 vor dem Senden von DokumentƤnderungen an den Server wartet. Falls sich das Dokument innerhalb dieser Zeit wieder Ƥndert, wird erneut die volle Zeit gewartet. @@ -27591,8 +27577,8 @@ Versuchen Sie, das Projekt neu zu erstellen. Shell in Container ƶffnen - Docker daemon appears to be not running. Verify daemon is up and running and reset the Docker daemon in Docker device preferences or restart Qt Creator. - Der Docker-Daemon scheint nicht zu laufen. Stellen Sie sicher, dass der Daemon ausgeführt wird, und setzen Sie den Docker-Daemon in den Einstellungen des Docker-GerƤts zurück oder starten Sie Qt Creator neu. + Docker daemon appears to be not running. Verify daemon is up and running and reset the Docker daemon in Docker device preferences or restart %1. + Der Docker-Daemon scheint nicht zu laufen. Stellen Sie sicher, dass der Daemon ausgeführt wird, und setzen Sie den Docker-Daemon in den Einstellungen des Docker-GerƤts zurück oder starten Sie %1 neu. Docker Image Selection @@ -27607,10 +27593,8 @@ Versuchen Sie, das Projekt neu zu erstellen. Lade... - Running "%1" - - Führe "%1" aus - + Running "%1" + Führe "%1" aus Unexpected result: %1 @@ -27689,8 +27673,8 @@ Versuchen Sie, das Projekt neu zu erstellen. Die Liste der Quellverzeichnisse sollte nicht leer sein. - Host directories to mount into the container - Host-Verzeichnisse die in den Container eingehƤngt werden sollen + Host directories to mount into the container. + Host-Verzeichnisse die in den Container eingehƤngt werden sollen. Maps paths in this list one-to-one to the docker container. @@ -28249,12 +28233,8 @@ zu deaktivieren, deaktiviert auch die folgenden Plugins: Hilfe > Plugins - If you temporarily disable %1, the following plugins that depend on it are also disabled: %2. - - - Wenn Sie %1 vorübergehend deaktivieren, werden die folgenden Plugins, die davon abhƤngen, auch deaktiviert: %2. - - + If you temporarily disable %1, the following plugins that depend on it are also disabled: %2. + Wenn Sie %1 vorübergehend deaktivieren, werden die folgenden Plugins, die davon abhƤngen, auch deaktiviert: %2. Disable plugins permanently in %1. @@ -47127,22 +47107,16 @@ ZusƤtzlich wird die Verbindung zum GerƤt getestet. Überprüfe, ob "%1" funktioniert... - Failed to start "%1": %2 - - "%1" konnte nicht gestartet werden: %2 - + Failed to start "%1": %2 + "%1" konnte nicht gestartet werden: %2 - "%1" crashed. - - "%1" ist abgestürzt. - + "%1" crashed. + "%1" ist abgestürzt. - "%1" failed with exit code %2: %3 - - "%1" ist mit Rückgabewert %2 fehlgeschlagen: %3 - + "%1" failed with exit code %2: %3 + "%1" ist mit Rückgabewert %2 fehlgeschlagen: %3 "%1" is functional. @@ -47151,10 +47125,8 @@ ZusƤtzlich wird die Verbindung zum GerƤt getestet. - "%1" will be used for deployment, because "%2" and "%3" are not available. - - "%1" wird für das Deployment benutzt, da "%2" und "%3" nicht verfügbar sind. - + "%1" will be used for deployment, because "%2" and "%3" are not available. + "%1" wird für das Deployment benutzt, da "%2" und "%3" nicht verfügbar sind. Checking if required commands are available... @@ -47177,10 +47149,8 @@ ZusƤtzlich wird die Verbindung zum GerƤt getestet. %1 nicht gefunden. - Deployment to this device will not work out of the box. - - Deployment auf dieses GerƤt wird nicht von Anfang an funktionieren. - + Deployment to this device will not work out of the box. + Deployment auf dieses GerƤt wird nicht von Anfang an funktionieren. Checking if specified ports are available... @@ -47446,10 +47416,6 @@ Der Kontrollprozess konnte nicht gestartet werden. "%1" failed to start: %2 "%1" konnte nicht gestartet werden: %2 - - "%1" crashed. - "%1" ist abgestürzt. - "sftp" binary "%1" does not exist. Ausführbare "sftp"-Datei "%1" existiert nicht. @@ -49436,9 +49402,9 @@ Zieldatei "%1" existiert bereits. Could not merge results into single results.xml. -Failed to open file "%1" +Failed to open file "%1". Die Ergebnisse konnten nicht in einer einzelnen 'results.xml'-Datei zusammengeführt werden. -Die Datei "%1" konnte nicht geƶffnet werden +Die Datei "%1" konnte nicht geƶffnet werden. Error while parsing first test result. @@ -49715,8 +49681,8 @@ Die Datei "%1" konnte nicht geƶffnet werden Einstellungen... - Sends Esc to terminal instead of Qt Creator. - Sendet Escape zum Terminal statt zu Qt Creator. + Sends Esc to terminal instead of %1. + Sendet Escape zum Terminal statt zu %1. Press %1 to send Esc to terminal. @@ -49835,7 +49801,7 @@ Die Datei "%1" konnte nicht geƶffnet werden Escape-Taste zum Terminal senden - Sends the escape key to the terminal when pressedinstead of closing the terminal. + Sends the escape key to the terminal when pressed instead of closing the terminal. Sendet die Escape-Taste zum Terminal, anstatt das Terminal zu schliessen. @@ -52993,8 +52959,8 @@ Die Trace-Daten sind verloren. Ausschl&ussmuster: - List of comma separated wildcard filters. - Kommaseparierte Liste von Platzhalter-Filtern. + List of comma separated wildcard filters. + Kommaseparierte Liste von Platzhalter-Filtern. Files with file name or full file path matching any filter are included. @@ -58336,7 +58302,7 @@ Are you sure you want to remove the material? Vcpkg Manifest-Editor - Name: + Name: Name: diff --git a/share/qtcreator/translations/qtcreator_fr.ts b/share/qtcreator/translations/qtcreator_fr.ts index de55e61972a..673d54af1ea 100644 --- a/share/qtcreator/translations/qtcreator_fr.ts +++ b/share/qtcreator/translations/qtcreator_fr.ts @@ -6336,8 +6336,8 @@ Export des ressources : %2 Impossible de gĆ©nĆ©rer le fichier de ressource : %1 - A timeout occurred running "%1" - Un dĆ©passement de dĆ©lai s’est produit lors de l’exĆ©cution de Ā« %1 Ā» + A timeout occurred running "%1". + Un dĆ©passement de dĆ©lai s’est produit lors de l’exĆ©cution de Ā« %1 Ā». "%1" crashed. @@ -9058,22 +9058,16 @@ Installez-les manuellement aprĆØs que l'opĆ©ration en cours soit finie. L'installation du SDK Android ne contient pas certains paquets nĆ©cessaires. Souhaitez-vous installer les paquets manquants ? - Checking pending licenses... - - VĆ©rification des licences en cours… - + Checking pending licenses... + VĆ©rification des licences en cours… - The installation of Android SDK packages may fail if the respective licenses are not accepted. - - L'installation des paquets du SDK Android peut Ć©chouer si les licences respectives ne sont pas acceptĆ©es. - + The installation of Android SDK packages may fail if the respective licenses are not accepted. + L'installation des paquets du SDK Android peut Ć©chouer si les licences respectives ne sont pas acceptĆ©es. - -SDK Manager is busy. - -Le gestionnaire de SDK est occupĆ©. + SDK Manager is busy. + Le gestionnaire de SDK est occupĆ©. %n Android SDK packages shall be updated. @@ -10484,8 +10478,8 @@ Les fichiers du rĆ©pertoire source du paquet Android sont copiĆ©s dans le rĆ©per Cliquer pour sĆ©lectionner… - Images (*.png *.jpg *.jpeg *.webp *.svg) - Images (*.png *.jpg *.jpeg *.webp *.svg) + Images %1 + Images %1 Deploy to Android Device @@ -10672,12 +10666,8 @@ Les fichiers du rĆ©pertoire source du paquet Android sont copiĆ©s dans le rĆ©per Ɖchec. - Done - - - Fini - - + Done + Fini Installing @@ -10700,12 +10690,8 @@ Les fichiers du rĆ©pertoire source du paquet Android sont copiĆ©s dans le rĆ©per - License command failed. - - - Ɖchec de la commande de licence. - - + License command failed. + Ɖchec de la commande de licence. Revision @@ -11611,8 +11597,8 @@ Avertissement : l'activation de cette fonctionnalitĆ© augmente signifi MĆ©triques du benchmark - <p>Multiple testcases inside a single executable are not officially supported. Depending on the implementation they might get executed or not, but never will be explicitly selectable.</p> - <p>La prĆ©sence de plusieurs cas de tests dans un unique exĆ©cutable n'est officiellement pas supportĆ©e. Suivant l'implĆ©mentation, ils peuvent ĆŖtre exĆ©cutĆ©s ou non mais il ne seront jamais sĆ©lectionnables explicitement.</p> + Multiple testcases inside a single executable are not officially supported. Depending on the implementation they might get executed or not, but never will be explicitly selectable. + La prĆ©sence de plusieurs cas de tests dans un unique exĆ©cutable n'est officiellement pas supportĆ©e. Suivant l'implĆ©mentation, ils peuvent ĆŖtre exĆ©cutĆ©s ou non mais il ne seront jamais sĆ©lectionnables explicitement. inherited @@ -12745,8 +12731,8 @@ Avertissement : fonctionnalitĆ© expĆ©rimentale pouvant entraĆ®ner un Ć©chec Pilote cible : - Starting %1 ... - DĆ©marrage de %1 … + Starting %1... + DĆ©marrage de %1… Version @@ -16703,8 +16689,8 @@ Le code a Ć©tĆ© copiĆ© dans votre presse-papiers. Identification Ć©chouĆ©e - The login request failed: - La requĆŖte d'identification a Ć©chouĆ©e : + The login request failed: %1 + La requĆŖte d'identification a Ć©chouĆ©e : %1 Copilot @@ -16739,7 +16725,7 @@ Le code a Ć©tĆ© copiĆ© dans votre presse-papiers. RequĆŖte de suggestion Copilot Ć  la position actuelle du curseur de l'Ć©diteur. - Show next Copilot Suggestion + Show Next Copilot Suggestion Afficher la suggestion Copilot suivante @@ -16747,7 +16733,7 @@ Le code a Ć©tĆ© copiĆ© dans votre presse-papiers. Alterner parmi les suggestions Copilot reƧues pour afficher la suggestion suivante disponible. - Show previos Copilot Suggestion + Show Previous Copilot Suggestion Afficher la suggestion Copilot prĆ©cĆ©dente @@ -16787,8 +16773,8 @@ Le code a Ć©tĆ© copiĆ© dans votre presse-papiers. Chemin Node.js - Select path to node.js executable. See https://nodejs.org/en/download/for installation instructions. - SĆ©lectionner le chemin menant Ć  l'exĆ©cutable node.js. Voir https://nodejs.org/fr/download/ pour les instructions d'installation. + Select path to node.js executable. See %1 for installation instructions. + SĆ©lectionner le chemin menant Ć  l'exĆ©cutable node.js. Voir %1 pour les instructions d'installation. Path to agent.js: @@ -16799,8 +16785,8 @@ Le code a Ć©tĆ© copiĆ© dans votre presse-papiers. Chemin Agent.js - Select path to agent.js in Copilot Neovim plugin. See https://github.com/github/copilot.vim#getting-started for installation instructions. - SĆ©lectionner le chemin vers agent.js dans le plug-in Copilot Neovim Voir https://github.com/github/copilot.vim#getting-started pour les instructions d'installation. + Select path to agent.js in Copilot Neovim plugin. See %1 for installation instructions. + SĆ©lectionner le chemin vers agent.js dans le plug-in Copilot Neovim Voir %1 pour les instructions d'installation. Auto Complete @@ -20044,8 +20030,8 @@ Double-cliquez pour modifier l’élĆ©ment. Impossible de lancer Ā« %1 Ā» : %2 - A timeout occurred running "%1" - Un dĆ©passement de dĆ©lai s’est produit lors de l’exĆ©cution de Ā« %1 Ā» + A timeout occurred running "%1". + Un dĆ©passement de dĆ©lai s’est produit lors de l’exĆ©cution de Ā« %1 Ā». "%1" crashed. @@ -20295,8 +20281,8 @@ Double-cliquez pour modifier l’élĆ©ment. C++ - <p>If background indexing is enabled, global symbol searches will yield more accurate results, at the cost of additional CPU load when the project is first opened. The indexing result is persisted in the project's build directory. If you disable background indexing, a faster, but less accurate, built-in indexer is used instead. The thread priority for building the background index can be adjusted since clangd 15.</p><p>Background Priority: Minimum priority, runs on idle CPUs. May leave 'performance' cores unused.</p><p>Normal Priority: Reduced priority compared to interactive work.</p>Low Priority: Same priority as other clangd work. - <p>Si l’indexation en arriĆØre-plan est activĆ©e, les recherches globales de symboles donneront des rĆ©sultats plus prĆ©cis, au prix d’une charge de travail supplĆ©mentaire du CPU lors de la premiĆØre ouverture du projet. Le rĆ©sultat de l’indexation est conservĆ© dans le rĆ©pertoire de construction du projet. Si vous dĆ©sactivez l’indexation en arriĆØre-plan, un indexeur intĆ©grĆ© plus rapide, mais moins prĆ©cis, est utilisĆ© Ć  la place. La prioritĆ© des threads pour la construction de l’index d’arriĆØre-plan peut ĆŖtre ajustĆ©e depuis clangd 15.</p><p>PrioritĆ© d’arriĆØre-plan : prioritĆ© minimale, s’exĆ©cute sur les processeurs inactifs. Peut laisser les cœurs de Ā« performance Ā» inutilisĆ©s.</p><p>PrioritĆ© normale : prioritĆ© rĆ©duite par rapport au travail interactif.</p>PrioritĆ© basse : mĆŖme prioritĆ© que les autres travaux de clangd. + <p>If background indexing is enabled, global symbol searches will yield more accurate results, at the cost of additional CPU load when the project is first opened. The indexing result is persisted in the project's build directory. If you disable background indexing, a faster, but less accurate, built-in indexer is used instead. The thread priority for building the background index can be adjusted since clangd 15.</p><p>Background Priority: Minimum priority, runs on idle CPUs. May leave 'performance' cores unused.</p><p>Normal Priority: Reduced priority compared to interactive work.</p><p>Low Priority: Same priority as other clangd work.</p> + <p>Si l’indexation en arriĆØre-plan est activĆ©e, les recherches globales de symboles donneront des rĆ©sultats plus prĆ©cis, au prix d’une charge de travail supplĆ©mentaire du CPU lors de la premiĆØre ouverture du projet. Le rĆ©sultat de l’indexation est conservĆ© dans le rĆ©pertoire de construction du projet. Si vous dĆ©sactivez l’indexation en arriĆØre-plan, un indexeur intĆ©grĆ© plus rapide, mais moins prĆ©cis, est utilisĆ© Ć  la place. La prioritĆ© des threads pour la construction de l’index d’arriĆØre-plan peut ĆŖtre ajustĆ©e depuis clangd 15.</p><p>PrioritĆ© d’arriĆØre-plan : prioritĆ© minimale, s’exĆ©cute sur les processeurs inactifs. Peut laisser les cœurs de Ā« performance Ā» inutilisĆ©s.</p><p>PrioritĆ© normale : prioritĆ© rĆ©duite par rapport au travail interactif.</p><p>PrioritĆ© basse : mĆŖme prioritĆ© que les autres travaux de clangd.</p> <p>Which C/C++ backend to use when switching between header and source file.<p>The clangd implementation has more capabilities, but also has some bugs not present in the built-in variant.<p>When "Try Both" is selected, clangd will be employed only if the built-in variant does not find anything. @@ -20311,9 +20297,9 @@ Double-cliquez pour modifier l’élĆ©ment. ContrĆ“le si clangd peut insĆ©rer des fichiers d’en-tĆŖte dans le cadre de la complĆ©tion de symboles. - Defines the amount of time Qt Creator waits before sending document changes to the server. + Defines the amount of time %1 waits before sending document changes to the server. If the document changes again while waiting, this timeout resets. - DĆ©finit le temps d’attente de Qt Creator avant d’envoyer les modifications du document au serveur. + DĆ©finit le temps d’attente de %1 avant d’envoyer les modifications du document au serveur. Si le document est Ć  nouveau modifiĆ© pendant l’attente, ce dĆ©lai est rĆ©initialisĆ©. @@ -27336,8 +27322,8 @@ La recompilation du projet peut aider. Ouvrir un shell dans le conteneur - Docker daemon appears to be not running. Verify daemon is up and running and reset the Docker daemon in Docker device preferences or restart Qt Creator. - Le dĆ©mon Docker ne semble pas fonctionner. VĆ©rifiez que le dĆ©mon est prĆ©sent et en cours d'exĆ©cution et rĆ©initialisez le dĆ©mon docker dans les paramĆØtres du pĆ©riphĆ©rique docker ou redĆ©marrez Qt Creator. + Docker daemon appears to be not running. Verify daemon is up and running and reset the Docker daemon in Docker device preferences or restart %1. + Le dĆ©mon Docker ne semble pas fonctionner. VĆ©rifiez que le dĆ©mon est prĆ©sent et en cours d'exĆ©cution et rĆ©initialisez le dĆ©mon docker dans les paramĆØtres du pĆ©riphĆ©rique docker ou redĆ©marrez %1. Docker Image Selection @@ -27352,10 +27338,8 @@ La recompilation du projet peut aider. Chargement … - Running "%1" - - ExĆ©cution de Ā« %1 Ā» - + Running "%1" + ExĆ©cution de Ā« %1 Ā» Unexpected result: %1 @@ -27434,8 +27418,8 @@ La recompilation du projet peut aider. La liste des rĆ©pertoires sources ne doit pas ĆŖtre vide. - Host directories to mount into the container - RĆ©pertoires hĆ“tes Ć  monter dans le conteneur + Host directories to mount into the container. + RĆ©pertoires hĆ“tes Ć  monter dans le conteneur. Maps paths in this list one-to-one to the docker container. @@ -27852,12 +27836,8 @@ Raison : %3 Aide > ƀ propos des greffons - If you temporarily disable %1, the following plugins that depend on it are also disabled: %2. - - - Si vous dĆ©sactivez temporairement %1, les greffons suivants qui en dĆ©pendent seront Ć©galement dĆ©sactivĆ©s : %2. - - + If you temporarily disable %1, the following plugins that depend on it are also disabled: %2. + Si vous dĆ©sactivez temporairement %1, les greffons suivants qui en dĆ©pendent seront Ć©galement dĆ©sactivĆ©s : %2. Disable plugins permanently in %1. @@ -46947,34 +46927,20 @@ Le processus de contrĆ“le n'a pas pu dĆ©marrer. - Failed to start "%1": %2 - - Ɖchec du dĆ©marrage de Ā« %1 Ā» : %2 - + Failed to start "%1": %2 + Ɖchec du dĆ©marrage de Ā« %1 Ā» : %2 - "%1" crashed. - - Ā« %1 Ā» a plantĆ©. - + "%1" failed with exit code %2: %3 + Ā« %1 Ā» a Ć©chouĆ© avec le code de sortie %2 : %3 - "%1" failed with exit code %2: %3 - - Ā« %1 Ā» a Ć©chouĆ© avec le code de sortie %2 : %3 - + "%1" will be used for deployment, because "%2" and "%3" are not available. + Ā« %1 Ā» sera utilisĆ© pour le dĆ©ploiement, car Ā« %2 Ā» et Ā« %3 Ā» ne sont pas disponibles. - "%1" will be used for deployment, because "%2" and "%3" are not available. - - Ā« %1 Ā» sera utilisĆ© pour le dĆ©ploiement, car Ā« %2 Ā» et Ā« %3 Ā» ne sont pas disponibles. - - - - Deployment to this device will not work out of the box. - - Le dĆ©ploiement vers ce pĆ©riphĆ©rique ne fonctionnera pas directement. - + Deployment to this device will not work out of the box. + Le dĆ©ploiement vers ce pĆ©riphĆ©rique ne fonctionnera pas directement. %1... @@ -49104,9 +49070,9 @@ Le fichier de destination Ā« %1 Ā» existe dĆ©jĆ . Could not merge results into single results.xml. -Failed to open file "%1" +Failed to open file "%1". Impossible de fusionner les rĆ©sultats dans un unique fichier results.xml. -Impossible d'ouvrir le fichier Ā« %1 Ā» +Impossible d'ouvrir le fichier Ā« %1 Ā». Error while parsing first test result. @@ -49383,8 +49349,8 @@ Impossible d'ouvrir le fichier Ā« %1 Ā» Configurer… - Sends Esc to terminal instead of Qt Creator. - Envoie Ɖchap au terminal au lieu d'Ć  Qt Creator. + Sends Esc to terminal instead of %1. + Envoie Ɖchap au terminal au lieu d'Ć  %1. Press %1 to send Esc to terminal. @@ -49503,7 +49469,7 @@ Impossible d'ouvrir le fichier Ā« %1 Ā» Envoyer la touche d'Ć©chappement au terminal - Sends the escape key to the terminal when pressedinstead of closing the terminal. + Sends the escape key to the terminal when pressed instead of closing the terminal. Envoi la touche d'Ć©chappement au terminal lorsque appuyĆ© au lieu de fermer le terminal. @@ -52725,8 +52691,8 @@ Les donnĆ©es de la trace sont perdues. Motif d’excl&usion : - List of comma separated wildcard filters. - Liste de filtres joker sĆ©parĆ©s par des virgules. + List of comma separated wildcard filters. + Liste de filtres joker sĆ©parĆ©s par des virgules. Files with file name or full file path matching any filter are included. @@ -54734,8 +54700,8 @@ VĆ©rifiez les paramĆØtres pour vous assurer que Valgrind est installĆ© et dispon Ɖditeur de Manifest Vcpkg - Name: - Nom: + Name: + Nom : Version: diff --git a/share/qtcreator/translations/qtcreator_hr.ts b/share/qtcreator/translations/qtcreator_hr.ts index 35294aedfff..5cb6489b7ed 100644 --- a/share/qtcreator/translations/qtcreator_hr.ts +++ b/share/qtcreator/translations/qtcreator_hr.ts @@ -874,16 +874,12 @@ ŽeliÅ” li prihvatiti licencu za Android SDK? - Checking pending licenses... - - Provjera nerijeÅ”enih licenca … - + Checking pending licenses... + Provjera nerijeÅ”enih licenca … - -SDK Manager is busy. - -Upravljač za SDK je zauzet. + SDK Manager is busy. + Upravljač za SDK je zauzet. Android SDK Changes @@ -13630,9 +13626,7 @@ Do you want to uninstall the existing package? - License command failed. - - + License command failed. @@ -13644,9 +13638,7 @@ Do you want to uninstall the existing package? Neuspjelo. - Done - - + Done @@ -18576,8 +18568,8 @@ Do you want to kill it? Nije moguće pokrenuti ā€ž%1ā€: %2 - A timeout occurred running "%1" - DoÅ”lo je do prekoračenja vremena prilikom pokretanja ā€ž%1ā€ + A timeout occurred running "%1". + DoÅ”lo je do prekoračenja vremena prilikom pokretanja ā€ž%1ā€. "%1" crashed. diff --git a/share/qtcreator/translations/qtcreator_ja.ts b/share/qtcreator/translations/qtcreator_ja.ts index 6bfd303b72d..71665c23d51 100644 --- a/share/qtcreator/translations/qtcreator_ja.ts +++ b/share/qtcreator/translations/qtcreator_ja.ts @@ -32559,8 +32559,8 @@ API ćƒćƒ¼ć‚øćƒ§ćƒ³ćŒ %1 仄上の SDK ć‚’ć‚¤ćƒ³ć‚¹ćƒˆćƒ¼ćƒ«ć—ć¦ćć ć•ć„ "%1" ć‚’čµ·å‹•ć§ćć¾ć›ć‚“: %2 - A timeout occurred running "%1" - "%1" ć‚’å®Ÿč”Œäø­ć«ć‚æć‚¤ćƒ ć‚¢ć‚¦ćƒˆćŒē™ŗē”Ÿć—ć¾ć—ćŸ + A timeout occurred running "%1". + "%1" ć‚’å®Ÿč”Œäø­ć«ć‚æć‚¤ćƒ ć‚¢ć‚¦ćƒˆćŒē™ŗē”Ÿć—ć¾ć—ćŸć€‚ "%1" crashed. @@ -46500,8 +46500,8 @@ Stepping into the module or setting breakpoints by file and line is expected to QmlDesigner::GenerateResource - A timeout occurred running "%1" - "%1" ć‚’å®Ÿč”Œäø­ć«ć‚æć‚¤ćƒ ć‚¢ć‚¦ćƒˆćŒē™ŗē”Ÿć—ć¾ć—ćŸ + A timeout occurred running "%1". + "%1" ć‚’å®Ÿč”Œäø­ć«ć‚æć‚¤ćƒ ć‚¢ć‚¦ćƒˆćŒē™ŗē”Ÿć—ć¾ć—ćŸć€‚ "%1" crashed. diff --git a/share/qtcreator/translations/qtcreator_pl.ts b/share/qtcreator/translations/qtcreator_pl.ts index f207ab64d56..fb3b9a36e3f 100644 --- a/share/qtcreator/translations/qtcreator_pl.ts +++ b/share/qtcreator/translations/qtcreator_pl.ts @@ -28623,8 +28623,8 @@ Do you want to check them out now? Nie można uruchomić "%1": %2 - A timeout occurred running "%1" - Przekroczono limit czasu oczekiwania na odpowiedÅŗ od uruchomionego "%1" + A timeout occurred running "%1". + Przekroczono limit czasu oczekiwania na odpowiedÅŗ od uruchomionego "%1". "%1" crashed. diff --git a/share/qtcreator/translations/qtcreator_ru.ts b/share/qtcreator/translations/qtcreator_ru.ts index 9dc5e7249e0..ed5d78ba7a2 100644 --- a/share/qtcreator/translations/qtcreator_ru.ts +++ b/share/qtcreator/translations/qtcreator_ru.ts @@ -1398,12 +1398,8 @@ Do you want to uninstall the existing package? ŠžŠæŠµŃ€Š°Ń†ŠøŃ Ń‚Ń€ŠµŠ±ŃƒŠµŃ‚ Š²Š¼ŠµŃˆŠ°Ń‚ŠµŠ»ŃŒŃŃ‚Š²Š° ŠæŠ¾Š»ŃŒŠ·Š¾Š²Š°Ń‚ŠµŠ»Ń. Š˜ŃŠæŠ¾Š»ŃŒŠ·ŃƒŠ¹Ń‚Šµ Ā«sdkmanagerĀ» в команГной строке. - License command failed. - - - КоманГа License Š·Š°Š²ŠµŃ€ŃˆŠøŠ»Š°ŃŃŒ с ошибкой. - - + License command failed. + КоманГа License Š·Š°Š²ŠµŃ€ŃˆŠøŠ»Š°ŃŃŒ с ошибкой. Android SDK Manager @@ -1446,16 +1442,12 @@ Do you want to uninstall the existing package? ŠŸŃ€ŠøŠ½ŠøŠ¼Š°ŠµŃ‚Šµ ŃƒŃŠ»Š¾Š²ŠøŃ лицензии Android SDK? - Checking pending licenses... - - ŠŸŃ€Š¾Š²ŠµŃ€ŠŗŠ° Š¾Š¶ŠøŠ“Š°ŃŽŃ‰ŠøŃ… лицензий... - + Checking pending licenses... + ŠŸŃ€Š¾Š²ŠµŃ€ŠŗŠ° Š¾Š¶ŠøŠ“Š°ŃŽŃ‰ŠøŃ… лицензий... - -SDK Manager is busy. - -SDK Manager Š·Š°Š½ŃŃ‚. + SDK Manager is busy. + SDK Manager Š·Š°Š½ŃŃ‚. Android SDK Changes @@ -2081,12 +2073,8 @@ To hide a sticky splash screen, invoke QtAndroid::hideSplashScreen(). ŠžŃˆŠøŠ±ŠŗŠ°. - Done - - - Готово - - + Done + Готово Installing @@ -10572,8 +10560,8 @@ Double-click to edit item. ŠŠµ уГалось Š·Š°ŠæŃƒŃŃ‚ŠøŃ‚ŃŒ Ā«%1Ā»: %2 - A timeout occurred running "%1" - Š˜ŃŃ‚ŠµŠŗŠ»Š¾ Š²Ń€ŠµŠ¼Ń работы Ā«%1Ā» + A timeout occurred running "%1". + Š˜ŃŃ‚ŠµŠŗŠ»Š¾ Š²Ń€ŠµŠ¼Ń работы Ā«%1Ā». "%1" crashed. @@ -34855,8 +34843,8 @@ Neither the path to the library nor the path to its includes is added to the .pr ŠŠµ уГалось ŃŠ¾Š·Š“Š°Ń‚ŃŒ файл Ń€ŠµŃŃƒŃ€ŃŠ¾Š²: %1 - A timeout occurred running "%1" - Š˜ŃŃ‚ŠµŠŗŠ»Š¾ Š²Ń€ŠµŠ¼Ń работы Ā«%1Ā» + A timeout occurred running "%1". + Š˜ŃŃ‚ŠµŠŗŠ»Š¾ Š²Ń€ŠµŠ¼Ń работы Ā«%1Ā». "%1" crashed. @@ -40173,10 +40161,8 @@ If you do not have a private key yet, you can also create one here. - Deployment to this device will not work out of the box. - - Развёртывание на ŃŃ‚Š¾ ŃƒŃŃ‚Ń€Š¾Š¹ŃŃ‚Š²Š¾ не работает «из коробки». - + Deployment to this device will not work out of the box. + Развёртывание на ŃŃ‚Š¾ ŃƒŃŃ‚Ń€Š¾Š¹ŃŃ‚Š²Š¾ не работает «из коробки». rsync is functional. diff --git a/share/qtcreator/translations/qtcreator_sl.ts b/share/qtcreator/translations/qtcreator_sl.ts index 97b4fe1b6cc..e5b3b87b02b 100644 --- a/share/qtcreator/translations/qtcreator_sl.ts +++ b/share/qtcreator/translations/qtcreator_sl.ts @@ -15893,8 +15893,8 @@ Projekte programov QML izvede pregledovalnik QML in jih ni potrebno zgraditi.Ni moč zagnati Ā»%1Ā«: %2 - A timeout occurred running '%1' - Med poganjanjem Ā»%1Ā« je potekel čas + A timeout occurred running "%1". + Med poganjanjem Ā»%1Ā« je potekel čas. '%1' crashed. diff --git a/share/qtcreator/translations/qtcreator_uk.ts b/share/qtcreator/translations/qtcreator_uk.ts index 5e90d729015..432f5ab3a24 100644 --- a/share/qtcreator/translations/qtcreator_uk.ts +++ b/share/qtcreator/translations/qtcreator_uk.ts @@ -35645,8 +35645,8 @@ Install an SDK of at least API version %1. ŠŠµŠ¼Š¾Š¶Š»ŠøŠ²Š¾ Š·Š°ŠæŃƒŃŃ‚ŠøŃ‚Šø "%1": %2 - A timeout occurred running "%1" - Час Š¾Ń‡Ń–ŠŗŃƒŠ²Š°Š½Š½Ń вичерпано Š“Š»Ń "%1" + A timeout occurred running "%1". + Час Š¾Ń‡Ń–ŠŗŃƒŠ²Š°Š½Š½Ń вичерпано Š“Š»Ń "%1". "%1" crashed. diff --git a/share/qtcreator/translations/qtcreator_zh_CN.ts b/share/qtcreator/translations/qtcreator_zh_CN.ts index cb89a89d43d..ff7a8e061ce 100644 --- a/share/qtcreator/translations/qtcreator_zh_CN.ts +++ b/share/qtcreator/translations/qtcreator_zh_CN.ts @@ -1083,8 +1083,8 @@ This cannot be undone. å•å‡»ä»„é€‰ę‹©... - Images (*.png *.jpg *.jpeg *.webp *.svg) - å›¾ē‰‡ļ¼ˆ*.png *.jpg *.jpeg *.webp *.svg) + Images %1 + 图片 %1 Include default permissions for Qt modules. @@ -1308,8 +1308,8 @@ This cannot be undone. 无法为 %1 åˆ›å»ŗę–‡ä»¶ ā€œ%2ā€ - A timeout occurred running "%1" - 运蔌 ā€œ%1ā€ ę—¶č¶…ę—¶ + A timeout occurred running "%1". + 运蔌 ā€œ%1ā€ ꗶ超ꗶ怂 Crash while creating file for %1 "%2" @@ -1460,12 +1460,8 @@ This cannot be undone. 失蓄. - Done - - - 完成 - - + Done + 完成 Installing @@ -1488,12 +1484,8 @@ This cannot be undone. 安卓 SDK 箔理器 - License command failed. - - - č®øåÆå‘½ä»¤å¤±č“„ć€‚ - - + License command failed. + č®øåÆå‘½ä»¤å¤±č“„ć€‚ Android SDK Manager @@ -1580,21 +1572,16 @@ Install them manually after the current operation is done. ē¼ŗå¤±å®‰å“ SDK å®‰č£…ę‰€åæ…č¦ēš„åŒ…ć€‚ä½ ęƒ³å®‰č£…čæ™äŗ›ē¼ŗå¤±åŒ…å—ļ¼Ÿ - Checking pending licenses... - - ę­£åœØę£€ęŸ„å¾…å¤„ē†ēš„č®øåÆčÆ... - + Checking pending licenses... + ę­£åœØę£€ęŸ„å¾…å¤„ē†ēš„č®øåÆčÆ... - The installation of Android SDK packages may fail if the respective licenses are not accepted. - + The installation of Android SDK packages may fail if the respective licenses are not accepted. å¦‚ęžœäøęŽ„å—ē›øåŗ”ēš„č®øåÆčÆļ¼Œå®‰å“ SDK åŒ…å®‰č£…åÆčƒ½ä¼šå¤±č“„ć€‚ - -SDK Manager is busy. - -SDK 箔理器繁忙。 + SDK Manager is busy. + SDK 箔理器繁忙。 %n Android SDK packages shall be updated. @@ -2999,8 +2986,8 @@ Warning: Plain text misses some information, such as duration. åŸŗå‡†ęµ‹čÆ•ęŒ‡ę ‡ - <p>Multiple testcases inside a single executable are not officially supported. Depending on the implementation they might get executed or not, but never will be explicitly selectable.</p> - <p>å®˜ę–¹äøę”ÆęŒå•äø€åÆę‰§č”ŒēØ‹åŗäø­ēš„å¤šäøŖęµ‹čÆ•ē”Øä¾‹ļ¼Œę ¹ę®å…·ä½“å®žēŽ°ļ¼Œå®ƒåÆčƒ½ä¼šč¢«ę‰§č”Œļ¼Œä½†ē»äøä¼šč¢«ę˜Žē”®é€‰ę‹©</p> + Multiple testcases inside a single executable are not officially supported. Depending on the implementation they might get executed or not, but never will be explicitly selectable. + å®˜ę–¹äøę”ÆęŒå•äø€åÆę‰§č”ŒēØ‹åŗäø­ēš„å¤šäøŖęµ‹čÆ•ē”Øä¾‹ļ¼Œę ¹ę®å…·ä½“å®žēŽ°ļ¼Œå®ƒåÆčƒ½ä¼šč¢«ę‰§č”Œļ¼Œä½†ē»äøä¼šč¢«ę˜Žē”®é€‰ę‹© inherited @@ -4127,7 +4114,7 @@ Warning: this is an experimental feature and might lead to failing to execute th ē›®ę ‡é©±åŠØå™Øļ¼š - Starting %1 ... + Starting %1... 启动 %1... @@ -8551,7 +8538,7 @@ Set a valid executable first. - A timeout occurred running "%1" + A timeout occurred running "%1". @@ -11567,7 +11554,7 @@ to version control (%2) - Defines the amount of time Qt Creator waits before sending document changes to the server. + Defines the amount of time %1 waits before sending document changes to the server. If the document changes again while waiting, this timeout resets. @@ -18093,8 +18080,7 @@ Rebuilding the project might help. - Running "%1" - + Running "%1" @@ -18159,7 +18145,7 @@ Rebuilding the project might help. - Host directories to mount into the container + Host directories to mount into the container. @@ -18519,9 +18505,7 @@ Rebuilding the project might help. - If you temporarily disable %1, the following plugins that depend on it are also disabled: %2. - - + If you temporarily disable %1, the following plugins that depend on it are also disabled: %2. @@ -33343,7 +33327,7 @@ The following files or directories are missing: - A timeout occurred running "%1" + A timeout occurred running "%1". @@ -39240,18 +39224,11 @@ Control process failed to start. - Failed to start "%1": %2 - + Failed to start "%1": %2 - "%1" crashed. - - - - - "%1" failed with exit code %2: %3 - + "%1" failed with exit code %2: %3 @@ -39265,8 +39242,7 @@ Control process failed to start. - Deployment to this device will not work out of the box. - + Deployment to this device will not work out of the box. @@ -41397,7 +41373,7 @@ Destination file "%1" already exists. Could not merge results into single results.xml. -Failed to open file "%1" +Failed to open file "%1". diff --git a/share/qtcreator/translations/qtcreator_zh_TW.ts b/share/qtcreator/translations/qtcreator_zh_TW.ts index 500e7548e81..d21d4d9bca2 100644 --- a/share/qtcreator/translations/qtcreator_zh_TW.ts +++ b/share/qtcreator/translations/qtcreator_zh_TW.ts @@ -13569,8 +13569,8 @@ Requires <b>Qt 4.7.4</b> or newer. ē„”ę³•å•Ÿå‹• '%1':%2 - A timeout occurred running '%1' - 執蔌 '%1' ē™¼ē”Ÿé€¾ę™‚ + A timeout occurred running "%1". + 執蔌 '%1' ē™¼ē”Ÿé€¾ę™‚ć€‚ '%1' crashed. diff --git a/src/libs/advanceddockingsystem/autohidetab.cpp b/src/libs/advanceddockingsystem/autohidetab.cpp index 1d8f7a50a65..dd3f3f6c820 100644 --- a/src/libs/advanceddockingsystem/autohidetab.cpp +++ b/src/libs/advanceddockingsystem/autohidetab.cpp @@ -4,6 +4,7 @@ #include "autohidetab.h" #include "ads_globals_p.h" +#include "advanceddockingsystemtr.h" #include "autohidedockcontainer.h" #include "autohidesidebar.h" #include "dockareawidget.h" @@ -335,7 +336,7 @@ void AutoHideTab::contextMenuEvent(QContextMenuEvent *event) const bool isFloatable = d->m_dockWidget->features().testFlag(DockWidget::DockWidgetFloatable); QMenu menu(this); - QAction *detachAction = menu.addAction(tr("Detach")); + QAction *detachAction = menu.addAction(Tr::tr("Detach")); detachAction->connect(detachAction, &QAction::triggered, this, @@ -345,17 +346,17 @@ void AutoHideTab::contextMenuEvent(QContextMenuEvent *event) auto isPinnable = d->m_dockWidget->features().testFlag(DockWidget::DockWidgetPinnable); detachAction->setEnabled(isPinnable); - auto pinToMenu = menu.addMenu(tr("Pin To...")); + auto pinToMenu = menu.addMenu(Tr::tr("Pin To...")); pinToMenu->setEnabled(isPinnable); - d->createAutoHideToAction(tr("Top"), SideBarTop, pinToMenu); - d->createAutoHideToAction(tr("Left"), SideBarLeft, pinToMenu); - d->createAutoHideToAction(tr("Right"), SideBarRight, pinToMenu); - d->createAutoHideToAction(tr("Bottom"), SideBarBottom, pinToMenu); + d->createAutoHideToAction(Tr::tr("Top"), SideBarTop, pinToMenu); + d->createAutoHideToAction(Tr::tr("Left"), SideBarLeft, pinToMenu); + d->createAutoHideToAction(Tr::tr("Right"), SideBarRight, pinToMenu); + d->createAutoHideToAction(Tr::tr("Bottom"), SideBarBottom, pinToMenu); - QAction *unpinAction = menu.addAction(tr("Unpin (Dock)")); + QAction *unpinAction = menu.addAction(Tr::tr("Unpin (Dock)")); unpinAction->connect(unpinAction, &QAction::triggered, this, &AutoHideTab::unpinDockWidget); menu.addSeparator(); - QAction *closeAction = menu.addAction(tr("Close")); + QAction *closeAction = menu.addAction(Tr::tr("Close")); closeAction->connect(closeAction, &QAction::triggered, this, diff --git a/src/libs/advanceddockingsystem/dockareatitlebar.cpp b/src/libs/advanceddockingsystem/dockareatitlebar.cpp index 234916d530d..7a2e6770621 100644 --- a/src/libs/advanceddockingsystem/dockareatitlebar.cpp +++ b/src/libs/advanceddockingsystem/dockareatitlebar.cpp @@ -656,7 +656,8 @@ void DockAreaTitleBar::contextMenuEvent(QContextMenuEvent *event) QMenu menu(this); if (!isTopLevelArea) { - QAction *detachAction = menu.addAction(isAutoHide ? tr("Detach") : tr("Detach Group")); + QAction *detachAction = menu.addAction(isAutoHide ? Tr::tr("Detach") + : Tr::tr("Detach Group")); detachAction->connect(detachAction, &QAction::triggered, this, @@ -665,7 +666,8 @@ void DockAreaTitleBar::contextMenuEvent(QContextMenuEvent *event) d->m_dockArea->features().testFlag(DockWidget::DockWidgetFloatable)); if (DockManager::testAutoHideConfigFlag(DockManager::AutoHideFeatureEnabled)) { - QAction *pinAction = menu.addAction(isAutoHide ? tr("Unpin (Dock)") : tr("Pin Group")); + QAction *pinAction = menu.addAction(isAutoHide ? Tr::tr("Unpin (Dock)") + : Tr::tr("Pin Group")); pinAction->connect(pinAction, &QAction::triggered, this, @@ -674,17 +676,17 @@ void DockAreaTitleBar::contextMenuEvent(QContextMenuEvent *event) auto areaIsPinnable = d->m_dockArea->features().testFlag(DockWidget::DockWidgetPinnable); pinAction->setEnabled(areaIsPinnable); if (!isAutoHide) { - auto tmp = menu.addMenu(tr("Pin Group To...")); + auto tmp = menu.addMenu(Tr::tr("Pin Group To...")); tmp->setEnabled(areaIsPinnable); - d->createAutoHideToAction(tr("Top"), SideBarTop, tmp); - d->createAutoHideToAction(tr("Left"), SideBarLeft, tmp); - d->createAutoHideToAction(tr("Right"), SideBarRight, tmp); - d->createAutoHideToAction(tr("Bottom"), SideBarBottom, tmp); + d->createAutoHideToAction(Tr::tr("Top"), SideBarTop, tmp); + d->createAutoHideToAction(Tr::tr("Left"), SideBarLeft, tmp); + d->createAutoHideToAction(Tr::tr("Right"), SideBarRight, tmp); + d->createAutoHideToAction(Tr::tr("Bottom"), SideBarBottom, tmp); } } menu.addSeparator(); } - QAction *closeAction = menu.addAction(isAutoHide ? tr("Close") : tr("Close Group")); + QAction *closeAction = menu.addAction(isAutoHide ? Tr::tr("Close") : Tr::tr("Close Group")); closeAction->connect(closeAction, &QAction::triggered, this, @@ -692,7 +694,7 @@ void DockAreaTitleBar::contextMenuEvent(QContextMenuEvent *event) closeAction->setEnabled(d->m_dockArea->features().testFlag(DockWidget::DockWidgetClosable)); if (!isAutoHide && !isTopLevelArea) { - QAction *closeOthersAction = menu.addAction(tr("Close Other Groups")); + QAction *closeOthersAction = menu.addAction(Tr::tr("Close Other Groups")); closeOthersAction->connect(closeOthersAction, &QAction::triggered, d->m_dockArea, @@ -717,22 +719,22 @@ QString DockAreaTitleBar::titleBarButtonToolTip(eTitleBarButton button) const switch (button) { case TitleBarButtonAutoHide: if (d->m_dockArea->isAutoHide()) - return tr("Unpin (Dock)"); + return Tr::tr("Unpin (Dock)"); if (DockManager::testAutoHideConfigFlag(DockManager::AutoHideButtonTogglesArea)) - return tr("Pin Group"); + return Tr::tr("Pin Group"); else - return tr("Pin Active Tab (Press Ctrl to Pin Group)"); + return Tr::tr("Pin Active Tab (Press Ctrl to Pin Group)"); break; case TitleBarButtonClose: if (d->m_dockArea->isAutoHide()) - return tr("Close"); + return Tr::tr("Close"); if (DockManager::testConfigFlag(DockManager::DockAreaCloseButtonClosesTab)) - return tr("Close Active Tab"); + return Tr::tr("Close Active Tab"); else - return tr("Close Group"); + return Tr::tr("Close Group"); break; default: diff --git a/src/libs/advanceddockingsystem/dockmanager.cpp b/src/libs/advanceddockingsystem/dockmanager.cpp index ee21f77ac29..49ce3945748 100644 --- a/src/libs/advanceddockingsystem/dockmanager.cpp +++ b/src/libs/advanceddockingsystem/dockmanager.cpp @@ -1345,13 +1345,13 @@ expected_str DockManager::exportWorkspace(const QString &targetFilePath // Check if the target directory exists if (!targetFile.parentDir().exists()) return make_unexpected( - Tr::tr("Directory does not exist\"%1\".").arg(targetFile.parentDir().toUserOutput())); + Tr::tr("The directory \"%1\" does not exist.").arg(targetFile.parentDir().toUserOutput())); // Check if the workspace exists const FilePath workspaceFile = userDirectory().pathAppended(sourceFileName); if (!workspaceFile.exists()) return make_unexpected( - Tr::tr("Workspace does not exist \"%1\"").arg(workspaceFile.toUserOutput())); + Tr::tr("The workspace \"%1\" does not exist ").arg(workspaceFile.toUserOutput())); // Finally copy the workspace to the target const expected_str copyResult = workspaceFile.copyFile(targetFile); diff --git a/src/libs/advanceddockingsystem/dockwidgettab.cpp b/src/libs/advanceddockingsystem/dockwidgettab.cpp index 4efa339e34e..d450c6ddd19 100644 --- a/src/libs/advanceddockingsystem/dockwidgettab.cpp +++ b/src/libs/advanceddockingsystem/dockwidgettab.cpp @@ -474,7 +474,7 @@ void DockWidgetTab::contextMenuEvent(QContextMenuEvent *event) QMenu menu(this); if (!isTopLevelArea) { - QAction *detachAction = menu.addAction(tr("Detach")); + QAction *detachAction = menu.addAction(Tr::tr("Detach")); detachAction->connect(detachAction, &QAction::triggered, this, @@ -482,7 +482,7 @@ void DockWidgetTab::contextMenuEvent(QContextMenuEvent *event) detachAction->setEnabled(isDetachable); if (DockManager::testAutoHideConfigFlag(DockManager::AutoHideFeatureEnabled)) { - QAction *pinAction = menu.addAction(tr("Pin")); + QAction *pinAction = menu.addAction(Tr::tr("Pin")); pinAction->connect(pinAction, &QAction::triggered, this, @@ -491,23 +491,23 @@ void DockWidgetTab::contextMenuEvent(QContextMenuEvent *event) auto isPinnable = d->m_dockWidget->features().testFlag(DockWidget::DockWidgetPinnable); pinAction->setEnabled(isPinnable); - auto subMenu = menu.addMenu(tr("Pin To...")); + auto subMenu = menu.addMenu(Tr::tr("Pin To...")); subMenu->setEnabled(isPinnable); - d->createAutoHideToAction(tr("Top"), SideBarTop, subMenu); - d->createAutoHideToAction(tr("Left"), SideBarLeft, subMenu); - d->createAutoHideToAction(tr("Right"), SideBarRight, subMenu); - d->createAutoHideToAction(tr("Bottom"), SideBarBottom, subMenu); + d->createAutoHideToAction(Tr::tr("Top"), SideBarTop, subMenu); + d->createAutoHideToAction(Tr::tr("Left"), SideBarLeft, subMenu); + d->createAutoHideToAction(Tr::tr("Right"), SideBarRight, subMenu); + d->createAutoHideToAction(Tr::tr("Bottom"), SideBarBottom, subMenu); } } menu.addSeparator(); - QAction *closeAction = menu.addAction(tr("Close")); + QAction *closeAction = menu.addAction(Tr::tr("Close")); closeAction->connect(closeAction, &QAction::triggered, this, &DockWidgetTab::closeRequested); closeAction->setEnabled(isClosable()); if (d->m_dockArea->openDockWidgetsCount() > 1) { - QAction *closeOthersAction = menu.addAction(tr("Close Others")); + QAction *closeOthersAction = menu.addAction(Tr::tr("Close Others")); closeOthersAction->connect(closeOthersAction, &QAction::triggered, this, diff --git a/src/libs/extensionsystem/pluginmanager.cpp b/src/libs/extensionsystem/pluginmanager.cpp index 84bea5b7bfa..1f86693f907 100644 --- a/src/libs/extensionsystem/pluginmanager.cpp +++ b/src/libs/extensionsystem/pluginmanager.cpp @@ -1540,8 +1540,7 @@ void PluginManagerPrivate::checkForProblematicPlugins() : Tr::tr("Help > About Plugins"); const QString otherPluginsText = Tr::tr("If you temporarily disable %1, the following plugins that depend on " - "it are also disabled: %2.\n\n") - .arg(spec->name(), dependentsList); + "it are also disabled: %2.").arg(spec->name(), dependentsList) + "\n\n"; const QString detailsText = (dependents.isEmpty() ? QString() : otherPluginsText) + Tr::tr("Disable plugins permanently in %1.").arg(pluginsMenu); const QString text = Tr::tr("The last time you started %1, it seems to have closed because " diff --git a/src/libs/utils/devicefileaccess.cpp b/src/libs/utils/devicefileaccess.cpp index 71f694c6649..a38a3617a7e 100644 --- a/src/libs/utils/devicefileaccess.cpp +++ b/src/libs/utils/devicefileaccess.cpp @@ -721,10 +721,11 @@ expected_str DesktopDeviceFileAccess::writeFileContents(const FilePath & qint64 res = file.write(data); if (res != data.size()) return make_unexpected( - Tr::tr("Could not write to file \"%1\" (only %2 of %n byte(s) written).") + Tr::tr("Could not write to file \"%1\" (only %2 of %n byte(s) written).", + nullptr, + data.size()) .arg(filePath.toUserOutput()) - .arg(res) - .arg(data.size())); + .arg(res)); return res; } diff --git a/src/libs/utils/filesearch.cpp b/src/libs/utils/filesearch.cpp index 6340d5e1191..f97934cde40 100644 --- a/src/libs/utils/filesearch.cpp +++ b/src/libs/utils/filesearch.cpp @@ -495,7 +495,7 @@ QString msgExclusionPatternLabel() QString msgFilePatternToolTip(InclusionType inclusionType) { - return Tr::tr("List of comma separated wildcard filters. ") + return Tr::tr("List of comma separated wildcard filters.") + " " + (inclusionType == InclusionType::Included ? Tr::tr("Files with file name or full file path matching any filter are included.") : Tr::tr("Files with file name or full file path matching any filter are excluded.")); diff --git a/src/libs/utils/filesystemwatcher.cpp b/src/libs/utils/filesystemwatcher.cpp index ac9043f878c..7933d31543e 100644 --- a/src/libs/utils/filesystemwatcher.cpp +++ b/src/libs/utils/filesystemwatcher.cpp @@ -275,7 +275,7 @@ void FileSystemWatcher::addFiles(const QStringList &files, WatchMode wm) d->m_files.insert(file, WatchEntry(file, wm)); const int count = ++d->m_staticData->m_fileCount[file]; - Q_ASSERT(count > 0); + QTC_CHECK(count > 0); if (count == 1) { toAdd << file; @@ -284,7 +284,7 @@ void FileSystemWatcher::addFiles(const QStringList &files, WatchMode wm) if (!fi.exists()) { const QString directory = fi.path(); const int dirCount = ++d->m_staticData->m_directoryCount[directory]; - Q_ASSERT(dirCount > 0); + QTC_CHECK(dirCount > 0); if (dirCount == 1) toAdd << directory; @@ -315,7 +315,7 @@ void FileSystemWatcher::removeFiles(const QStringList &files) d->m_files.erase(it); const int count = --(d->m_staticData->m_fileCount[file]); - Q_ASSERT(count >= 0); + QTC_CHECK(count >= 0); if (!count) { toRemove << file; @@ -324,7 +324,7 @@ void FileSystemWatcher::removeFiles(const QStringList &files) if (!fi.exists()) { const QString directory = fi.path(); const int dirCount = --d->m_staticData->m_directoryCount[directory]; - Q_ASSERT(dirCount >= 0); + QTC_CHECK(dirCount >= 0); if (!dirCount) toRemove << directory; @@ -381,7 +381,7 @@ void FileSystemWatcher::addDirectories(const QStringList &directories, WatchMode d->m_directories.insert(directory, WatchEntry(directory, wm)); const int count = ++d->m_staticData->m_directoryCount[directory]; - Q_ASSERT(count > 0); + QTC_CHECK(count > 0); if (count == 1) toAdd << directory; @@ -411,7 +411,7 @@ void FileSystemWatcher::removeDirectories(const QStringList &directories) d->m_directories.erase(it); const int count = --d->m_staticData->m_directoryCount[directory]; - Q_ASSERT(count >= 0); + QTC_CHECK(count >= 0); if (!count) toRemove << directory; @@ -438,7 +438,7 @@ void FileSystemWatcher::slotFileChanged(const QString &path) if (!fi.exists()) { const QString directory = fi.path(); const int dirCount = ++d->m_staticData->m_directoryCount[directory]; - Q_ASSERT(dirCount > 0); + QTC_CHECK(dirCount > 0); if (dirCount == 1) d->m_staticData->m_watcher->addPath(directory); @@ -474,7 +474,7 @@ void FileSystemWatcher::slotDirectoryChanged(const QString &path) for (const QString &reAdded : std::as_const(toReadd)) { const QString directory = QFileInfo(reAdded).path(); const int dirCount = --d->m_staticData->m_directoryCount[directory]; - Q_ASSERT(dirCount >= 0); + QTC_CHECK(dirCount >= 0); if (!dirCount) d->m_staticData->m_watcher->removePath(directory); diff --git a/src/libs/utils/fileutils.cpp b/src/libs/utils/fileutils.cpp index 4f67ee8105a..fdae7c6b8d8 100644 --- a/src/libs/utils/fileutils.cpp +++ b/src/libs/utils/fileutils.cpp @@ -721,7 +721,7 @@ bool FileUtils::copyRecursively( bool FileUtils::copyIfDifferent(const FilePath &srcFilePath, const FilePath &tgtFilePath) { - QTC_ASSERT(srcFilePath.exists(), return false); + QTC_ASSERT(srcFilePath.exists(), qDebug() << srcFilePath.toUserOutput(); return false); QTC_ASSERT(srcFilePath.isSameDevice(tgtFilePath), return false); if (tgtFilePath.exists()) { diff --git a/src/libs/utils/passworddialog.cpp b/src/libs/utils/passworddialog.cpp index 05bdf268da9..7958f7d6bd9 100644 --- a/src/libs/utils/passworddialog.cpp +++ b/src/libs/utils/passworddialog.cpp @@ -22,7 +22,7 @@ ShowPasswordButton::ShowPasswordButton(QWidget *parent) { setAttribute(Qt::WA_Hover); setCheckable(true); - setToolTip(Tr::tr("Show/hide password")); + setToolTip(Tr::tr("Show/Hide Password")); } void ShowPasswordButton::paintEvent(QPaintEvent *e) diff --git a/src/libs/utils/process.cpp b/src/libs/utils/process.cpp index b10ea090dfc..534dcff78f1 100644 --- a/src/libs/utils/process.cpp +++ b/src/libs/utils/process.cpp @@ -1257,7 +1257,7 @@ void Process::start() d->m_result = ProcessResult::StartFailed; d->m_resultData.m_exitCode = 255; d->m_resultData.m_exitStatus = QProcess::CrashExit; - d->m_resultData.m_errorString = Tr::tr("Failed to create process interface for \"%1\"") + d->m_resultData.m_errorString = Tr::tr("Failed to create process interface for \"%1\".") .arg(d->m_setup.m_commandLine.toUserOutput()); d->m_resultData.m_error = QProcess::FailedToStart; d->emitGuardedSignal(&Process::done); diff --git a/src/libs/utils/stylehelper.cpp b/src/libs/utils/stylehelper.cpp index 506601e8260..b93481ef9d4 100644 --- a/src/libs/utils/stylehelper.cpp +++ b/src/libs/utils/stylehelper.cpp @@ -715,7 +715,7 @@ bool StyleHelper::isQDSTheme() Qt::HighDpiScaleFactorRoundingPolicy StyleHelper::defaultHighDpiScaleFactorRoundingPolicy() { return HostOsInfo::isMacHost() ? Qt::HighDpiScaleFactorRoundingPolicy::Unset - : Qt::HighDpiScaleFactorRoundingPolicy::PassThrough; + : Qt::HighDpiScaleFactorRoundingPolicy::Round; } QIcon StyleHelper::getIconFromIconFont(const QString &fontName, const QList ¶meters) diff --git a/src/libs/utils/terminalhooks.cpp b/src/libs/utils/terminalhooks.cpp index 6072e168e8a..bb517cb9554 100644 --- a/src/libs/utils/terminalhooks.cpp +++ b/src/libs/utils/terminalhooks.cpp @@ -27,7 +27,7 @@ expected_str defaultShellForDevice(const FilePath &deviceRoot) shell = env->searchInPath(shell.nativePath()); if (shell.isEmpty()) - return make_unexpected(Tr::tr("Could not find any shell")); + return make_unexpected(Tr::tr("Could not find any shell.")); return deviceRoot.withNewMappedPath(shell); } diff --git a/src/plugins/android/androidmanager.cpp b/src/plugins/android/androidmanager.cpp index b161698d686..aa8e3fe43aa 100644 --- a/src/plugins/android/androidmanager.cpp +++ b/src/plugins/android/androidmanager.cpp @@ -262,6 +262,19 @@ FilePath buildDirectory(const Target *target) FilePath parentDuildDir = buildDir.parentDir(); if (parentDuildDir.endsWith(libsDir) || libsDir.endsWith(libsDir + "/")) return parentDuildDir.parentDir().parentDir(); + } else { + // Qt6 + CMake: Very cautios hack to work around QTCREATORBUG-26479 for simple projects + const QString jsonFileName = + AndroidQtVersion::androidDeploymentSettingsFileName(target); + const FilePath jsonFile = buildDir / jsonFileName; + if (!jsonFile.exists()) { + const FilePath projectBuildDir = bs->buildConfiguration()->buildDirectory(); + if (buildDir != projectBuildDir) { + const FilePath projectJsonFile = projectBuildDir / jsonFileName; + if (projectJsonFile.exists()) + buildDir = projectBuildDir; + } + } } return buildDir; } diff --git a/src/plugins/android/androidmanifesteditoriconwidget.cpp b/src/plugins/android/androidmanifesteditoriconwidget.cpp index e0b23ff6ae8..2c2dfca47e1 100644 --- a/src/plugins/android/androidmanifesteditoriconwidget.cpp +++ b/src/plugins/android/androidmanifesteditoriconwidget.cpp @@ -143,9 +143,13 @@ void AndroidManifestEditorIconWidget::setIconFromPath(const FilePath &iconPath) void AndroidManifestEditorIconWidget::selectIcon() { - FilePath file = FileUtils::getOpenFilePath(this, m_iconSelectionText, - FileUtils::homePath(), - Tr::tr("Images (*.png *.jpg *.jpeg *.webp *.svg)")); // TODO: See SplashContainterWidget + FilePath file = FileUtils::getOpenFilePath( + this, + m_iconSelectionText, + FileUtils::homePath(), + //: %1 expands to wildcard list for file dialog, do not change order + Tr::tr("Images %1") + .arg("(*.png *.jpg *.jpeg *.webp *.svg)")); // TODO: See SplashContainterWidget if (file.isEmpty()) return; setIconFromPath(file); diff --git a/src/plugins/android/androidsdkmanager.cpp b/src/plugins/android/androidsdkmanager.cpp index ca0be7770c4..b0da90123e8 100644 --- a/src/plugins/android/androidsdkmanager.cpp +++ b/src/plugins/android/androidsdkmanager.cpp @@ -438,7 +438,7 @@ void AndroidSdkManagerPrivate::updateInstalled(SdkCmdPromise &promise) if (result.stdError.isEmpty() && !result.success) result.stdError = Tr::tr("Failed."); - result.stdOutput = Tr::tr("Done\n\n"); + result.stdOutput = Tr::tr("Done") + "\n\n"; promise.addResult(result); promise.setProgressValue(100); } @@ -468,8 +468,8 @@ void AndroidSdkManagerPrivate::update(SdkCmdPromise &fi, const QStringList &inst currentProgress += progressQuota; fi.setProgressValue(currentProgress); if (result.stdError.isEmpty() && !result.success) - result.stdError = Tr::tr("AndroidSdkManager", "Failed"); - result.stdOutput = Tr::tr("AndroidSdkManager", "Done\n\n"); + result.stdError = Tr::tr("Failed"); + result.stdOutput = Tr::tr("Done") + "\n\n"; fi.addResult(result); return fi.isCanceled(); }; @@ -569,7 +569,7 @@ void AndroidSdkManagerPrivate::getPendingLicense(SdkCmdPromise &fi) m_licenseTextCache.clear(); result.success = licenseCommand.exitStatus() == QProcess::NormalExit; if (!result.success) - result.stdError = Tr::tr("License command failed.\n\n"); + result.stdError = Tr::tr("License command failed.") + "\n\n"; fi.addResult(result); fi.setProgressValue(100); } diff --git a/src/plugins/android/androidsdkmanagerwidget.cpp b/src/plugins/android/androidsdkmanagerwidget.cpp index d228cd46024..cd3bbb8532b 100644 --- a/src/plugins/android/androidsdkmanagerwidget.cpp +++ b/src/plugins/android/androidsdkmanagerwidget.cpp @@ -290,9 +290,10 @@ void AndroidSdkManagerWidget::installEssentials() void AndroidSdkManagerWidget::beginLicenseCheck() { - m_formatter->appendMessage(Tr::tr("Checking pending licenses...\n"), NormalMessageFormat); + m_formatter->appendMessage(Tr::tr("Checking pending licenses...") + "\n", NormalMessageFormat); m_formatter->appendMessage(Tr::tr("The installation of Android SDK packages may fail if the " - "respective licenses are not accepted.\n"), + "respective licenses are not accepted.") + + "\n", LogMessageFormat); addPackageFuture(m_sdkManager->checkPendingLicenses()); } @@ -302,7 +303,7 @@ void AndroidSdkManagerWidget::onApplyButton(const QString &extraMessage) QTC_ASSERT(m_currentView == PackageListing, return); if (m_sdkManager->isBusy()) { - m_formatter->appendMessage(Tr::tr("\nSDK Manager is busy."), StdErrFormat); + m_formatter->appendMessage("\n" + Tr::tr("SDK Manager is busy."), StdErrFormat); return; } @@ -356,7 +357,7 @@ void AndroidSdkManagerWidget::onApplyButton(const QString &extraMessage) void AndroidSdkManagerWidget::onUpdatePackages() { if (m_sdkManager->isBusy()) { - m_formatter->appendMessage(Tr::tr("\nSDK Manager is busy."), StdErrFormat); + m_formatter->appendMessage("\n" + Tr::tr("SDK Manager is busy."), StdErrFormat); return; } switchView(Operations); diff --git a/src/plugins/android/androidsettingswidget.cpp b/src/plugins/android/androidsettingswidget.cpp index c48ad217ec0..ce8fbcf8614 100644 --- a/src/plugins/android/androidsettingswidget.cpp +++ b/src/plugins/android/androidsettingswidget.cpp @@ -281,7 +281,7 @@ AndroidSettingsWidget::AndroidSettingsWidget() { JavaPathExistsAndWritableRow, Tr::tr("JDK path exists and is writable.") }, { SdkPathExistsAndWritableRow, Tr::tr("Android SDK path exists and is writable.") }, { SdkToolsInstalledRow, Tr::tr("Android SDK Command-line Tools installed.") }, - { SdkManagerSuccessfulRow, Tr::tr("Android SDK Command-line Tools run.") }, + { SdkManagerSuccessfulRow, Tr::tr("Android SDK Command-line Tools runs.") }, { PlatformToolsInstalledRow, Tr::tr("Android SDK Platform-Tools installed.") }, { AllEssentialsInstalledRow, Tr::tr( "All essential packages installed for all installed Qt versions.") }, diff --git a/src/plugins/autotest/boost/boosttestoutputreader.cpp b/src/plugins/autotest/boost/boosttestoutputreader.cpp index 439fe480814..7b58d74f528 100644 --- a/src/plugins/autotest/boost/boosttestoutputreader.cpp +++ b/src/plugins/autotest/boost/boosttestoutputreader.cpp @@ -327,7 +327,8 @@ void BoostTestOutputReader::processOutputLine(const QByteArray &outputLine) BoostTestResult result(id(), {}, m_projectFile); const int failed = match.captured(1).toInt(); const int fatals = m_summary.value(ResultType::MessageFatal); - QString txt = Tr::tr("%n failure(s) detected in %2.").arg(failed).arg(match.captured(3)); + QString txt + = Tr::tr("%n failure(s) detected in %1.", nullptr, failed).arg(match.captured(3)); const int passed = qMax(0, m_testCaseCount - failed); if (m_testCaseCount != -1) txt.append(' ').append(Tr::tr("%1 tests passed.").arg(passed)); diff --git a/src/plugins/autotest/qtest/qttesttreeitem.cpp b/src/plugins/autotest/qtest/qttesttreeitem.cpp index 0c535fa9f81..de27cb089ff 100644 --- a/src/plugins/autotest/qtest/qttesttreeitem.cpp +++ b/src/plugins/autotest/qtest/qttesttreeitem.cpp @@ -47,9 +47,12 @@ QVariant QtTestTreeItem::data(int column, int role) const case Qt::ToolTipRole: { QString toolTip = TestTreeItem::data(column, role).toString(); if (m_multiTest && type() == TestCase) { - toolTip.append(Tr::tr("

Multiple testcases inside a single executable are not officially " - "supported. Depending on the implementation they might get executed " - "or not, but never will be explicitly selectable.

")); + toolTip.append( + "

" + + Tr::tr("Multiple testcases inside a single executable are not officially " + "supported. Depending on the implementation they might get executed " + "or not, but never will be explicitly selectable.") + + "

"); } else if (type() == TestFunction) { // avoid confusion (displaying header file, but ending up inside source) toolTip = parentItem()->name() + "::" + name(); diff --git a/src/plugins/autotoolsprojectmanager/autoreconfstep.cpp b/src/plugins/autotoolsprojectmanager/autoreconfstep.cpp index 2afc690387e..9dea7d6f7fb 100644 --- a/src/plugins/autotoolsprojectmanager/autoreconfstep.cpp +++ b/src/plugins/autotoolsprojectmanager/autoreconfstep.cpp @@ -72,7 +72,8 @@ private: m_runAutoreconf = true; if (!m_runAutoreconf) { - emit addOutput(Tr::tr("Configuration unchanged, skipping autoreconf step."), + emit addOutput(::AutotoolsProjectManager::Tr::tr( + "Configuration unchanged, skipping autoreconf step."), OutputFormat::NormalMessage); return SetupResult::StopWithDone; } diff --git a/src/plugins/baremetal/debugservers/uvsc/uvscserverprovider.cpp b/src/plugins/baremetal/debugservers/uvsc/uvscserverprovider.cpp index 49eccb1187c..f77a0ce0cfd 100644 --- a/src/plugins/baremetal/debugservers/uvsc/uvscserverprovider.cpp +++ b/src/plugins/baremetal/debugservers/uvsc/uvscserverprovider.cpp @@ -368,8 +368,7 @@ UvscServerProviderRunner::UvscServerProviderRunner(ProjectExplorer::RunControl * void UvscServerProviderRunner::start() { - const QString msg = Tr::tr("Starting %1 ...") - .arg(m_process.commandLine().displayName()); + const QString msg = Tr::tr("Starting %1...").arg(m_process.commandLine().displayName()); appendMessage(msg, NormalMessageFormat); m_process.start(); diff --git a/src/plugins/clangcodemodel/clangdfollowsymbol.cpp b/src/plugins/clangcodemodel/clangdfollowsymbol.cpp index ee56e3f4c75..8be15c7327d 100644 --- a/src/plugins/clangcodemodel/clangdfollowsymbol.cpp +++ b/src/plugins/clangcodemodel/clangdfollowsymbol.cpp @@ -340,7 +340,7 @@ IAssistProposal *ClangdFollowSymbol::VirtualFunctionAssistProcessor::createPropo items << createEntry({}, m_followSymbol->d->defLink); if (!final) { const auto infoItem = new VirtualFunctionProposalItem({}, false); - infoItem->setText(Tr::tr("collecting overrides ...")); + infoItem->setText(Tr::tr("collecting overrides...")); infoItem->setOrder(-1); items << infoItem; } diff --git a/src/plugins/clangcodemodel/clangtextmark.cpp b/src/plugins/clangcodemodel/clangtextmark.cpp index 4f5be51a7c1..80e2956021f 100644 --- a/src/plugins/clangcodemodel/clangtextmark.cpp +++ b/src/plugins/clangcodemodel/clangtextmark.cpp @@ -105,8 +105,8 @@ void disableDiagnosticInCurrentProjectConfig(const ClangDiagnostic &diagnostic) projectSettings.setDiagnosticConfigId(config.id()); // Notify the user about changed project specific settings - const QString text = Tr::tr("Changes applied to diagnostic configuration \"%1\"") - .arg(config.displayName()); + const QString text + = Tr::tr("Changes applied to diagnostic configuration \"%1\".").arg(config.displayName()); FadingIndicator::showText(Core::ICore::mainWindow(), text, FadingIndicator::SmallText); diff --git a/src/plugins/clangformat/clangformatconfigwidget.cpp b/src/plugins/clangformat/clangformatconfigwidget.cpp index d1735b15fb7..e3328bb2695 100644 --- a/src/plugins/clangformat/clangformatconfigwidget.cpp +++ b/src/plugins/clangformat/clangformatconfigwidget.cpp @@ -98,7 +98,7 @@ ClangFormatConfigWidget::ClangFormatConfigWidget(TextEditor::ICodeStylePreferenc static const int expectedMajorVersion = 17; - d->clangVersion = new QLabel(Tr::tr("Current clang-format version: ") + LLVM_VERSION_STRING, + d->clangVersion = new QLabel(Tr::tr("Current ClangFormat version: %1.").arg(LLVM_VERSION_STRING), this); d->clangWarningText = new QLabel(Tr::tr("The widget was generated for ClangFormat %1. " diff --git a/src/plugins/clangtools/clangtool.cpp b/src/plugins/clangtools/clangtool.cpp index 2e3a5c3ae5d..c25108a4185 100644 --- a/src/plugins/clangtools/clangtool.cpp +++ b/src/plugins/clangtools/clangtool.cpp @@ -70,16 +70,20 @@ static Q_LOGGING_CATEGORY(LOG, "qtc.clangtools.runcontrol", QtWarningMsg) namespace ClangTools::Internal { -class ProjectBuilderTaskAdapter : public TaskAdapter> +class ProjectBuilderTaskAdapter : public TaskAdapter> { public: void start() final { connect(BuildManager::instance(), &BuildManager::buildQueueFinished, this, &TaskInterface::done); - Target *target = *task(); + RunControl *runControl = *task(); + QTC_ASSERT(runControl, emit done(false); return); + Target *target = runControl->target(); QTC_ASSERT(target, emit done(false); return); - if (!BuildManager::isBuilding(target)) - BuildManager::buildProjectWithDependencies(target->project()); + if (!BuildManager::isBuilding(target)) { + BuildManager::buildProjectWithDependencies(target->project(), ConfigSelection::Active, + runControl); + } } }; @@ -678,10 +682,11 @@ Group ClangTool::runRecipe(const RunSettings &runSettings, QList topTasks { onGroupSetup(onTopSetup) }; if (buildBeforeAnalysis) { - const auto onSetup = [target](QPointer &buildTarget) { - buildTarget = target; + QPointer runControl(m_runControl); + const auto onSetup = [runControl](QPointer &buildRunControl) { + buildRunControl = runControl; }; - const auto onError = [this](const QPointer &) { + const auto onError = [this](const QPointer &) { const QString message(Tr::tr("Failed to build the project.")); m_infoBarWidget->setError(InfoBarWidget::Error, message, [this] { showOutputPane(); }); m_runControl->postMessage(message, ErrorMessageFormat); diff --git a/src/plugins/clangtools/clangtoolsutils.cpp b/src/plugins/clangtools/clangtoolsutils.cpp index 1ad142fd459..029a879ce11 100644 --- a/src/plugins/clangtools/clangtoolsutils.cpp +++ b/src/plugins/clangtools/clangtoolsutils.cpp @@ -316,7 +316,7 @@ static QVersionNumber fixupVersion(const VersionAndSuffix &versionAndSuffix) version = QVersionNumber(12); // Version 17.0.0 was never released due to a git issue - if (version == QVersionNumber(17)) + if (version.majorVersion() == 17) version = QVersionNumber(17, 0, 1); return version; diff --git a/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp b/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp index 40562776967..ed81a8fea95 100644 --- a/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp +++ b/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp @@ -1098,7 +1098,7 @@ static bool isWindowsARM64(const Kit *k) && targetAbi.wordWidth() == 64; } -static CommandLine defaultInitialCMakeCommand(const Kit *k, const QString buildType) +static CommandLine defaultInitialCMakeCommand(const Kit *k, const QString &buildType) { // Generator: CMakeTool *tool = CMakeKitAspect::cmakeTool(k); diff --git a/src/plugins/cmakeprojectmanager/cmakebuildstep.cpp b/src/plugins/cmakeprojectmanager/cmakebuildstep.cpp index 8187311a887..31a6ae23c02 100644 --- a/src/plugins/cmakeprojectmanager/cmakebuildstep.cpp +++ b/src/plugins/cmakeprojectmanager/cmakebuildstep.cpp @@ -372,7 +372,7 @@ GroupItem CMakeBuildStep::runRecipe() const auto onEnd = [this] { updateDeploymentData(); }; - const Group root { + Group root { ignoreReturnValue() ? finishAllAndDone : stopOnError, ProjectParserTask(onParserSetup, {}, onParserError), defaultProcessTask(), diff --git a/src/plugins/cmakeprojectmanager/cmakebuildsystem.cpp b/src/plugins/cmakeprojectmanager/cmakebuildsystem.cpp index 57c7cda2961..7c0001c6a86 100644 --- a/src/plugins/cmakeprojectmanager/cmakebuildsystem.cpp +++ b/src/plugins/cmakeprojectmanager/cmakebuildsystem.cpp @@ -1521,7 +1521,7 @@ void CMakeBuildSystem::runCTest() const QJsonArray nodes = btGraph.value("nodes").toArray(); const QJsonArray tests = jsonObj.value("tests").toArray(); int counter = 0; - for (const QJsonValue &testVal : tests) { + for (const auto &testVal : tests) { ++counter; const QJsonObject test = testVal.toObject(); QTC_ASSERT(!test.isEmpty(), continue); @@ -1532,7 +1532,7 @@ void CMakeBuildSystem::runCTest() if (bt != -1) { QSet seen; std::function findAncestor = [&](int index){ - const QJsonObject node = nodes.at(index).toObject(); + QJsonObject node = nodes.at(index).toObject(); const int parent = node.value("parent").toInt(-1); if (parent < 0 || !Utils::insert(seen, parent)) return node; diff --git a/src/plugins/cmakeprojectmanager/cmakeconfigitem.cpp b/src/plugins/cmakeprojectmanager/cmakeconfigitem.cpp index 2646c5c5808..b02b2e779c0 100644 --- a/src/plugins/cmakeprojectmanager/cmakeconfigitem.cpp +++ b/src/plugins/cmakeprojectmanager/cmakeconfigitem.cpp @@ -372,9 +372,9 @@ CMakeConfig CMakeConfig::fromFile(const Utils::FilePath &cacheFile, QString *err continue; QTC_ASSERT(pieces.size() == 3, continue); - const QByteArray key = pieces.at(0); - const QByteArray type = pieces.at(1); - const QByteArray value = pieces.at(2); + const QByteArray &key = pieces.at(0); + const QByteArray &type = pieces.at(1); + const QByteArray &value = pieces.at(2); if (key.endsWith("-ADVANCED") && value == "1") { advancedSet.insert(key.left(key.size() - 9 /* "-ADVANCED" */)); diff --git a/src/plugins/cmakeprojectmanager/cmakefilecompletionassist.cpp b/src/plugins/cmakeprojectmanager/cmakefilecompletionassist.cpp index 7a656722bb4..6dc754d2bed 100644 --- a/src/plugins/cmakeprojectmanager/cmakefilecompletionassist.cpp +++ b/src/plugins/cmakeprojectmanager/cmakefilecompletionassist.cpp @@ -400,7 +400,9 @@ static QPair getFindAndConfigCMakePackages( std::function function; QStringList &result; } mapping[] = {{"CMAKE_PREFIX_PATH", "lib/cmake", configPackageName, configPackages}, - {"CMAKE_MODULE_PATH", QString(), findPackageName, modulePackages}}; + {"CMAKE_PREFIX_PATH", "share", configPackageName, configPackages}, + {"CMAKE_MODULE_PATH", QString(), findPackageName, modulePackages}, + {"CMAKE_MODULE_PATH", QString(), configPackageName, configPackages}}; for (const auto &m : mapping) { FilePaths paths = Utils::transform(cmakeCache.valueOf(m.cmakeVariable).split(';'), diff --git a/src/plugins/cmakeprojectmanager/cmakekitaspect.cpp b/src/plugins/cmakeprojectmanager/cmakekitaspect.cpp index c18d047e613..6c112f01d5c 100644 --- a/src/plugins/cmakeprojectmanager/cmakekitaspect.cpp +++ b/src/plugins/cmakeprojectmanager/cmakekitaspect.cpp @@ -503,11 +503,9 @@ class GeneratorInfo public: GeneratorInfo() = default; GeneratorInfo(const QString &generator_, - const QString &extraGenerator_ = QString(), const QString &platform_ = QString(), const QString &toolset_ = QString()) : generator(generator_) - , extraGenerator(extraGenerator_) , platform(platform_) , toolset(toolset_) {} @@ -747,7 +745,7 @@ Tasks CMakeGeneratorKitAspectFactory::validate(const Kit *k) const const GeneratorInfo info = generatorInfo(k); QList known = tool->supportedGenerators(); auto it = std::find_if(known.constBegin(), known.constEnd(), [info](const CMakeTool::Generator &g) { - return g.matches(info.generator, info.extraGenerator); + return g.matches(info.generator); }); if (it == known.constEnd()) { addWarning(Tr::tr("CMake Tool does not support the configured generator.")); @@ -786,7 +784,7 @@ void CMakeGeneratorKitAspectFactory::fix(Kit *k) QList known = tool->supportedGenerators(); auto it = std::find_if(known.constBegin(), known.constEnd(), [info](const CMakeTool::Generator &g) { - return g.matches(info.generator, info.extraGenerator); + return g.matches(info.generator); }); if (it == known.constEnd()) { GeneratorInfo dv; @@ -794,7 +792,6 @@ void CMakeGeneratorKitAspectFactory::fix(Kit *k) setGeneratorInfo(k, dv); } else { const GeneratorInfo dv(isIos(k) ? QString("Xcode") : info.generator, - info.extraGenerator, it->supportsPlatform ? info.platform : QString(), it->supportsToolset ? info.toolset : QString()); setGeneratorInfo(k, dv); diff --git a/src/plugins/cmakeprojectmanager/cmakeparser.cpp b/src/plugins/cmakeprojectmanager/cmakeparser.cpp index 2e3c954f029..de4633ea617 100644 --- a/src/plugins/cmakeprojectmanager/cmakeparser.cpp +++ b/src/plugins/cmakeprojectmanager/cmakeparser.cpp @@ -3,6 +3,8 @@ #include "cmakeparser.h" +#include "cmakeprojectmanagertr.h" + #include #include @@ -210,7 +212,7 @@ void CMakeParser::flush() LinkSpecs specs; m_lastTask.details << QString(); - m_lastTask.details << tr("Call stack:"); + m_lastTask.details << Tr::tr("Call stack:"); m_lines += 2; m_callStack->push_front(m_errorOrWarningLine); diff --git a/src/plugins/cmakeprojectmanager/cmakeprojectimporter.cpp b/src/plugins/cmakeprojectmanager/cmakeprojectimporter.cpp index 6455ad3ea26..b8748bc6f98 100644 --- a/src/plugins/cmakeprojectmanager/cmakeprojectimporter.cpp +++ b/src/plugins/cmakeprojectmanager/cmakeprojectimporter.cpp @@ -104,6 +104,40 @@ CMakeProjectImporter::CMakeProjectImporter(const FilePath &path, const CMakeProj } +using CharToHexList = QList>; +static const CharToHexList &charToHexList() +{ + static const CharToHexList list = { + {"<", "{3C}"}, + {">", "{3E}"}, + {":", "{3A}"}, + {"\"", "{22}"}, + {"\\", "{5C}"}, + {"/", "{2F}"}, + {"|", "{7C}"}, + {"?", "{3F}"}, + {"*", "{2A}"}, + }; + + return list; +} + +static QString presetNameToFileName(const QString &name) +{ + QString fileName = name; + for (const auto &p : charToHexList()) + fileName.replace(p.first, p.second); + return fileName; +} + +static QString fileNameToPresetName(const QString &fileName) +{ + QString name = fileName; + for (const auto &p : charToHexList()) + name.replace(p.second, p.first); + return name; +} + FilePaths CMakeProjectImporter::importCandidates() { FilePaths candidates; @@ -129,7 +163,8 @@ FilePaths CMakeProjectImporter::importCandidates() continue; } - const FilePath configPresetDir = m_presetsTempDir.filePath(configPreset.name); + const FilePath configPresetDir = m_presetsTempDir.filePath( + presetNameToFileName(configPreset.name)); configPresetDir.createDir(); candidates << configPresetDir; @@ -229,6 +264,7 @@ static CMakeConfig configurationFromPresetProbe( const QString prefixPath = cache.stringValueOf("CMAKE_PREFIX_PATH"); const QString findRootPath = cache.stringValueOf("CMAKE_FIND_ROOT_PATH"); const QString qtHostPath = cache.stringValueOf("QT_HOST_PATH"); + const QString sysRoot = cache.stringValueOf("CMAKE_SYSROOT"); if (!cmakeMakeProgram.isEmpty()) { args.emplace_back( @@ -247,6 +283,9 @@ static CMakeConfig configurationFromPresetProbe( if (!qtHostPath.isEmpty()) { args.emplace_back(QStringLiteral("-DQT_HOST_PATH=%1").arg(qtHostPath)); } + if (!sysRoot.isEmpty()) { + args.emplace_back(QStringLiteral("-DCMAKE_SYSROOT=%1").arg(sysRoot)); + } } qCDebug(cmInputLog) << "CMake probing for compilers: " << cmakeExecutable.toUserOutput() @@ -638,7 +677,7 @@ QList CMakeProjectImporter::examineDirectory(const FilePath &importPath, if (importPath.isChildOf(m_presetsTempDir.path())) { auto data = std::make_unique(); - const QString presetName = importPath.fileName(); + const QString presetName = fileNameToPresetName(importPath.fileName()); PresetsDetails::ConfigurePreset configurePreset = Utils::findOrDefault(m_project->presetsData().configurePresets, [presetName](const PresetsDetails::ConfigurePreset &preset) { @@ -710,9 +749,6 @@ QList CMakeProjectImporter::examineDirectory(const FilePath &importPath, const CMakeConfig cache = configurePreset.cacheVariables ? configurePreset.cacheVariables.value() : CMakeConfig(); - - data->sysroot = cache.filePathValueOf("CMAKE_SYSROOT"); - CMakeConfig config; const bool noCompilers = cache.valueOf("CMAKE_C_COMPILER").isEmpty() && cache.valueOf("CMAKE_CXX_COMPILER").isEmpty(); @@ -743,6 +779,8 @@ QList CMakeProjectImporter::examineDirectory(const FilePath &importPath, configurePreset.generator.value().toUtf8()); } + data->sysroot = config.filePathValueOf("CMAKE_SYSROOT"); + const auto [qmake, cmakePrefixPath] = qtInfoFromCMakeCache(config, env); if (!qmake.isEmpty()) data->qt = findOrCreateQtVersion(qmake); @@ -1050,7 +1088,7 @@ void CMakeProjectImporter::persistTemporaryCMake(Kit *k, const QVariantList &vl) if (vl.isEmpty()) return; // No temporary CMake QTC_ASSERT(vl.count() == 1, return); - const QVariant data = vl.at(0); + const QVariant &data = vl.at(0); CMakeTool *tmpCmake = CMakeToolManager::findById(Id::fromSetting(data)); CMakeTool *actualCmake = CMakeKitAspect::cmakeTool(k); diff --git a/src/plugins/cmakeprojectmanager/cmakeprojectnodes.cpp b/src/plugins/cmakeprojectmanager/cmakeprojectnodes.cpp index b26f9a70b5b..7d017d5d86a 100644 --- a/src/plugins/cmakeprojectmanager/cmakeprojectnodes.cpp +++ b/src/plugins/cmakeprojectmanager/cmakeprojectnodes.cpp @@ -174,6 +174,9 @@ QVariant CMakeTargetNode::data(Id role) const if (role == Ios::Constants::IosCmakeGenerator) return value("CMAKE_GENERATOR"); + if (role == ProjectExplorer::Constants::QT_KEYWORDS_ENABLED) // FIXME handle correctly + return value(role.toString().toUtf8()); + QTC_ASSERT(false, qDebug() << "Unknown role" << role.toString()); // Better guess than "not present". return value(role.toString().toUtf8()); diff --git a/src/plugins/cmakeprojectmanager/cmaketool.cpp b/src/plugins/cmakeprojectmanager/cmaketool.cpp index a24114bb352..fdaf5e6bfc6 100644 --- a/src/plugins/cmakeprojectmanager/cmaketool.cpp +++ b/src/plugins/cmakeprojectmanager/cmaketool.cpp @@ -45,9 +45,9 @@ const char CMAKE_INFORMATION_AUTODETECTED[] = "AutoDetected"; const char CMAKE_INFORMATION_DETECTIONSOURCE[] = "DetectionSource"; const char CMAKE_INFORMATION_READERTYPE[] = "ReaderType"; -bool CMakeTool::Generator::matches(const QString &n, const QString &ex) const +bool CMakeTool::Generator::matches(const QString &n) const { - return n == name && (ex.isEmpty() || extraGenerators.contains(ex)); + return n == name; } namespace Internal { @@ -228,7 +228,7 @@ FilePath CMakeTool::cmakeExecutable(const FilePath &path) } } - const FilePath resolvedPath = path.canonicalPath(); + FilePath resolvedPath = path.canonicalPath(); // Evil hack to make snap-packages of CMake work. See QTCREATORBUG-23376 if (path.osType() == OsTypeLinux && resolvedPath.fileName() == "snap") return path; @@ -490,7 +490,7 @@ void CMakeTool::parseFunctionDetailsOutput(const QString &output) const QStringList lines = output.split('\n'); for (int i = 0; i < lines.count(); ++i) { - const QString line = lines.at(i); + const QString &line = lines.at(i); if (line == "::") { expectDefinition = true; @@ -656,7 +656,7 @@ void CMakeTool::fetchFromCapabilities(bool ignoreCache) const QTC_ASSERT_EXPECTED(result, return); } -static int getVersion(const QVariantMap &obj, const QString value) +static int getVersion(const QVariantMap &obj, const QString &value) { bool ok; int result = obj.value(value).toInt(&ok); diff --git a/src/plugins/cmakeprojectmanager/cmaketool.h b/src/plugins/cmakeprojectmanager/cmaketool.h index c9bc6e02e3c..0fa06e5ca14 100644 --- a/src/plugins/cmakeprojectmanager/cmaketool.h +++ b/src/plugins/cmakeprojectmanager/cmaketool.h @@ -63,7 +63,7 @@ public: bool supportsPlatform = true; bool supportsToolset = true; - bool matches(const QString &n, const QString &ex = QString()) const; + bool matches(const QString &n) const; }; using PathMapper = std::function; diff --git a/src/plugins/cmakeprojectmanager/fileapidataextractor.cpp b/src/plugins/cmakeprojectmanager/fileapidataextractor.cpp index fd492289555..e097ef2c76d 100644 --- a/src/plugins/cmakeprojectmanager/fileapidataextractor.cpp +++ b/src/plugins/cmakeprojectmanager/fileapidataextractor.cpp @@ -11,14 +11,14 @@ #include +#include + #include #include #include #include #include -#include - #include #include @@ -39,10 +39,10 @@ class CMakeFileResult public: QSet cmakeFiles; - std::vector> cmakeNodesSource; - std::vector> cmakeNodesBuild; - std::vector> cmakeNodesOther; - std::vector> cmakeListNodes; + std::vector> cmakeNodesSource; + std::vector> cmakeNodesBuild; + std::vector> cmakeNodesOther; + std::vector> cmakeListNodes; }; static CMakeFileResult extractCMakeFilesData(const QFuture &cancelFuture, @@ -132,10 +132,10 @@ public: QSet cmakeFiles; - std::vector> cmakeNodesSource; - std::vector> cmakeNodesBuild; - std::vector> cmakeNodesOther; - std::vector> cmakeListNodes; + std::vector> cmakeNodesSource; + std::vector> cmakeNodesBuild; + std::vector> cmakeNodesOther; + std::vector> cmakeListNodes; Configuration codemodel; std::vector targetDetails; @@ -259,7 +259,7 @@ static CMakeBuildTarget toBuildTarget(const TargetDetails &t, } if (ct.targetType == ExecutableType) { - Utils::FilePaths librarySeachPaths; + FilePaths librarySeachPaths; // Is this a GUI application? ct.linksToQtGui = Utils::contains(t.link.value().fragments, [](const FragmentInfo &f) { @@ -358,13 +358,13 @@ static QStringList splitFragments(const QStringList &fragments) static bool isPchFile(const FilePath &buildDirectory, const FilePath &path) { - return path.isChildOf(buildDirectory) && path.fileName().startsWith("cmake_pch"); + return path.fileName().startsWith("cmake_pch") && path.isChildOf(buildDirectory); } static bool isUnityFile(const FilePath &buildDirectory, const FilePath &path) { - return path.isChildOf(buildDirectory) && path.parentDir().fileName() == "Unity" - && path.fileName().startsWith("unity_"); + return path.fileName().startsWith("unity_") && path.isChildOf(buildDirectory) + && path.parentDir().fileName() == "Unity"; } static RawProjectParts generateRawProjectParts(const QFuture &cancelFuture, @@ -420,21 +420,13 @@ static RawProjectParts generateRawProjectParts(const QFuture &cancelFuture QStringList fragments = splitFragments(ci.fragments); // Get all sources from the compiler group, except generated sources - QStringList sources; - auto addToSources = [sourceDirectory, &sources](const QString &source) { - const FilePath sourcePath = FilePath::fromString(source); - if (sourcePath.isAbsolutePath()) - sources.push_back(source); - else - sources.push_back( - sourceDirectory.pathAppended(source).absoluteFilePath().path()); - }; + FilePaths sources; for (auto idx: ci.sources) { SourceInfo si = t.sources.at(idx); if (si.isGenerated) continue; - addToSources(si.path); + sources.append(sourceDirectory.resolvePath(si.path)); } // Skip groups with only generated source files e.g. /.rcc/qrc_.cpp @@ -442,12 +434,12 @@ static RawProjectParts generateRawProjectParts(const QFuture &cancelFuture continue; // If we are not in a pch compiler group, add all the headers that are not generated - const bool hasPchSource = anyOf(sources, [buildDirectory](const QString &path) { - return isPchFile(buildDirectory, FilePath::fromString(path)); + const bool hasPchSource = anyOf(sources, [buildDirectory](const FilePath &path) { + return isPchFile(buildDirectory, path); }); - const bool hasUnitySources = allOf(sources, [buildDirectory](const QString &path) { - return isUnityFile(buildDirectory, FilePath::fromString(path)); + const bool hasUnitySources = allOf(sources, [buildDirectory](const FilePath &path) { + return isUnityFile(buildDirectory, path); }); QString headerMimeType; @@ -469,20 +461,20 @@ static RawProjectParts generateRawProjectParts(const QFuture &cancelFuture const bool sourceUnityType = hasUnitySources ? mime.inherits(sourceMimeType) : false; if (headerType || sourceUnityType) - addToSources(si.path); + sources.append(sourceDirectory.resolvePath(si.path)); } } } - sources.removeDuplicates(); + FilePath::removeDuplicates(sources); // Set project files except pch / unity files - rpp.setFiles(Utils::filtered(sources, - [buildDirectory](const QString &path) { - return !isPchFile(buildDirectory, - FilePath::fromString(path)) - && !isUnityFile(buildDirectory, - FilePath::fromString(path)); - }), + const FilePaths filtered = Utils::filtered(sources, + [buildDirectory](const FilePath &filePath) { + return !isPchFile(buildDirectory, filePath) + && !isUnityFile(buildDirectory, filePath); + }); + + rpp.setFiles(Utils::transform(filtered, &FilePath::toFSPathString), {}, [headerMimeType](const QString &path) { // Similar to ProjectFile::classify but classify headers with language @@ -497,10 +489,7 @@ static RawProjectParts generateRawProjectParts(const QFuture &cancelFuture return si.path.endsWith(ending); }).path); if (!precompiled_header.isEmpty()) { - if (precompiled_header.toFileInfo().isRelative()) { - const FilePath parentDir = sourceDirectory.parentDir(); - precompiled_header = parentDir.pathAppended(precompiled_header.toString()); - } + precompiled_header = sourceDirectory.resolvePath(precompiled_header); // Remove the CMake PCH usage command line options in order to avoid the case // when the build system would produce a .pch/.gch file that would be treated @@ -512,17 +501,17 @@ static RawProjectParts generateRawProjectParts(const QFuture &cancelFuture fragments.erase(foundPos, std::next(foundPos, args.size())); }; - remove({"-Xclang", "-include-pch", "-Xclang", precompiled_header.toString() + ".gch"}); - remove({"-Xclang", "-include-pch", "-Xclang", precompiled_header.toString() + ".pch"}); - remove({"-Xclang", "-include", "-Xclang", precompiled_header.toString()}); - remove({"-include", precompiled_header.toString()}); - remove({"/FI", precompiled_header.toString()}); + remove({"-Xclang", "-include-pch", "-Xclang", precompiled_header.path() + ".gch"}); + remove({"-Xclang", "-include-pch", "-Xclang", precompiled_header.path() + ".pch"}); + remove({"-Xclang", "-include", "-Xclang", precompiled_header.path()}); + remove({"-include", precompiled_header.path()}); + remove({"/FI", precompiled_header.path()}); // Make a copy of the CMake PCH header and use it instead FilePath qtc_precompiled_header = precompiled_header.parentDir().pathAppended(qtcPchFile); FileUtils::copyIfDifferent(precompiled_header, qtc_precompiled_header); - rpp.setPreCompiledHeaders({qtc_precompiled_header.toString()}); + rpp.setPreCompiledHeaders({qtc_precompiled_header.path()}); } RawProjectPartFlags cProjectFlags; @@ -534,8 +523,8 @@ static RawProjectParts generateRawProjectParts(const QFuture &cancelFuture rpp.setFlagsForCxx(cxxProjectFlags); const bool isExecutable = t.type == "EXECUTABLE"; - rpp.setBuildTargetType(isExecutable ? ProjectExplorer::BuildTargetType::Executable - : ProjectExplorer::BuildTargetType::Library); + rpp.setBuildTargetType(isExecutable ? BuildTargetType::Executable + : BuildTargetType::Library); rpps.append(rpp); ++count; } @@ -565,7 +554,7 @@ static FilePath directoryBuildDir(const Configuration &c, } static void addProjects(const QFuture &cancelFuture, - const QHash &cmakeListsNodes, + const QHash &cmakeListsNodes, const Configuration &config, const FilePath &sourceDir) { @@ -609,15 +598,15 @@ static FolderNode *createSourceGroupNode(const QString &sourceGroupName, } static void addCompileGroups(ProjectNode *targetRoot, - const Utils::FilePath &topSourceDirectory, - const Utils::FilePath &sourceDirectory, - const Utils::FilePath &buildDirectory, + const FilePath &topSourceDirectory, + const FilePath &sourceDirectory, + const FilePath &buildDirectory, const TargetDetails &td) { const bool showSourceFolders = settings().showSourceSubFolders(); const bool inSourceBuild = (sourceDirectory == buildDirectory); - QSet alreadyListed; + QSet alreadyListed; // Files already added by other configurations: targetRoot->forEachGenericNode( @@ -655,29 +644,18 @@ static void addCompileGroups(ProjectNode *targetRoot, } } - // Calculate base directory for source groups: for (size_t i = 0; i < sourceGroupFileNodes.size(); ++i) { std::vector> ¤t = sourceGroupFileNodes[i]; - FilePath baseDirectory; - // All the sourceGroupFileNodes are below sourceDirectory, so this is safe: - for (const std::unique_ptr &fn : current) { - if (baseDirectory.isEmpty()) { - baseDirectory = fn->filePath().parentDir(); - } else { - baseDirectory = Utils::FileUtils::commonPath(baseDirectory, fn->filePath()); - } - } - - FolderNode *insertNode = createSourceGroupNode(td.sourceGroups[i], - baseDirectory, - targetRoot); - + FolderNode *insertNode = td.sourceGroups[i] == "TREE" + ? targetRoot + : createSourceGroupNode(td.sourceGroups[i], + sourceDirectory, + targetRoot); if (showSourceFolders) { - insertNode->addNestedNodes(std::move(current), baseDirectory); + insertNode->addNestedNodes(std::move(current), sourceDirectory); } else { - for (auto &fileNodes : current) { + for (auto &fileNodes : current) insertNode->addNode(std::move(fileNodes)); - } } } @@ -687,7 +665,7 @@ static void addCompileGroups(ProjectNode *targetRoot, Tr::tr(""), std::move(buildFileNodes)); addCMakeVFolder(targetRoot, - Utils::FilePath(), + FilePath(), 10, Tr::tr(""), std::move(otherFileNodes)); @@ -716,7 +694,7 @@ static void addGeneratedFilesNode(ProjectNode *targetRoot, const FilePath &topLe } static void addTargets(const QFuture &cancelFuture, - const QHash &cmakeListsNodes, + const QHash &cmakeListsNodes, const Configuration &config, const std::vector &targetDetails, const FilePath &sourceDir, @@ -857,14 +835,12 @@ static void setupLocationInfoForTargets(const QFuture &cancelFuture, } } -using namespace FileApiDetails; - // -------------------------------------------------------------------- // extractData: // -------------------------------------------------------------------- FileApiQtcData extractData(const QFuture &cancelFuture, FileApiData &input, - const Utils::FilePath &sourceDir, const Utils::FilePath &buildDir) + const FilePath &sourceDir, const FilePath &buildDir) { FileApiQtcData result; diff --git a/src/plugins/cmakeprojectmanager/fileapiparser.cpp b/src/plugins/cmakeprojectmanager/fileapiparser.cpp index 943bebc1c18..5038f2e85e3 100644 --- a/src/plugins/cmakeprojectmanager/fileapiparser.cpp +++ b/src/plugins/cmakeprojectmanager/fileapiparser.cpp @@ -91,7 +91,7 @@ std::vector indexList(const QJsonValue &v) std::vector result; result.reserve(static_cast(indexList.count())); - for (const QJsonValue &v : indexList) { + for (const auto &v : indexList) { result.push_back(v.toInt(-1)); } return result; @@ -139,7 +139,7 @@ static ReplyFileContents readReplyFile(const FilePath &filePath, QString &errorM bool hadInvalidObject = false; { const QJsonArray objects = rootObject.value("objects").toArray(); - for (const QJsonValue &v : objects) { + for (const auto &v : objects) { const QJsonObject object = v.toObject(); { ReplyObject r; @@ -178,7 +178,7 @@ static CMakeConfig readCacheFile(const FilePath &cacheFile, QString &errorMessag } const QJsonArray entries = root.value("entries").toArray(); - for (const QJsonValue &v : entries) { + for (const auto &v : entries) { CMakeConfigItem item; const QJsonObject entry = v.toObject(); @@ -190,7 +190,7 @@ static CMakeConfig readCacheFile(const FilePath &cacheFile, QString &errorMessag { const QJsonArray properties = entry.value("properties").toArray(); - for (const QJsonValue &v : properties) { + for (const auto &v : properties) { const QJsonObject prop = v.toObject(); auto nv = nameValue(prop); if (nv.first == "ADVANCED") { @@ -223,7 +223,7 @@ static std::vector readCMakeFilesFile(const FilePath &cmakeFilesF } const QJsonArray inputs = root.value("inputs").toArray(); - for (const QJsonValue &v : inputs) { + for (const auto &v : inputs) { CMakeFileInfo info; const QJsonObject input = v.toObject(); info.path = cmakeFilesFile.withNewPath(input.value("path").toString()); @@ -253,7 +253,7 @@ std::vector extractDirectories(const QJsonArray &directories, QString } std::vector result; - for (const QJsonValue &v : directories) { + for (const auto &v : directories) { const QJsonObject obj = v.toObject(); if (obj.isEmpty()) { errorMessage = Tr::tr( @@ -283,7 +283,7 @@ static std::vector extractProjects(const QJsonArray &projects, QString } std::vector result; - for (const QJsonValue &v : projects) { + for (const auto &v : projects) { const QJsonObject obj = v.toObject(); if (obj.isEmpty()) { qCDebug(cmakeFileApi) << "Empty project skipped!"; @@ -314,7 +314,7 @@ static std::vector extractProjects(const QJsonArray &projects, QString static std::vector extractTargets(const QJsonArray &targets, QString &errorMessage) { std::vector result; - for (const QJsonValue &v : targets) { + for (const auto &v : targets) { const QJsonObject obj = v.toObject(); if (obj.isEmpty()) { errorMessage = Tr::tr( @@ -436,7 +436,7 @@ static std::vector extractConfigurations(const QJsonArray &config } std::vector result; - for (const QJsonValue &v : configs) { + for (const auto &v : configs) { const QJsonObject obj = v.toObject(); if (obj.isEmpty()) { errorMessage = Tr::tr( @@ -874,11 +874,11 @@ FileApiData FileApiParser::parseData(QPromise> & return result; } - auto it = std::find_if(codeModels.cbegin(), codeModels.cend(), + auto it = std::find_if(codeModels.begin(), codeModels.end(), [cmakeBuildType](const Configuration& cfg) { return QString::compare(cfg.name, cmakeBuildType, Qt::CaseInsensitive) == 0; }); - if (it == codeModels.cend()) { + if (it == codeModels.end()) { QStringList buildTypes; for (const Configuration &cfg: codeModels) buildTypes << cfg.name; diff --git a/src/plugins/cmakeprojectmanager/fileapireader.cpp b/src/plugins/cmakeprojectmanager/fileapireader.cpp index 732be976b7e..ee1edb26c02 100644 --- a/src/plugins/cmakeprojectmanager/fileapireader.cpp +++ b/src/plugins/cmakeprojectmanager/fileapireader.cpp @@ -285,8 +285,8 @@ void FileApiReader::endState(const FilePath &replyFilePath, bool restoredFromBac m_projectParts = std::move(value->projectParts); m_rootProjectNode = std::move(value->rootProjectNode); m_ctestPath = std::move(value->ctestPath); - m_isMultiConfig = std::move(value->isMultiConfig); - m_usesAllCapsTargets = std::move(value->usesAllCapsTargets); + m_isMultiConfig = value->isMultiConfig; + m_usesAllCapsTargets = value->usesAllCapsTargets; if (value->errorMessage.isEmpty()) { emit this->dataAvailable(restoredFromBackup); diff --git a/src/plugins/cmakeprojectmanager/presetsparser.cpp b/src/plugins/cmakeprojectmanager/presetsparser.cpp index f3f92f76fd5..3befe4d99d8 100644 --- a/src/plugins/cmakeprojectmanager/presetsparser.cpp +++ b/src/plugins/cmakeprojectmanager/presetsparser.cpp @@ -44,7 +44,7 @@ std::optional parseInclude(const QJsonValue &jsonValue) if (jsonValue.isArray()) { includes = QStringList(); const QJsonArray includeArray = jsonValue.toArray(); - for (const QJsonValue &includeValue : includeArray) + for (const auto &includeValue : includeArray) includes.value() << includeValue.toString(); } } @@ -103,7 +103,7 @@ std::optional parseCondition(const QJsonValue &jsonVa if (object.value("list").isArray()) { condition->list = QStringList(); const QJsonArray listArray = object.value("list").toArray(); - for (const QJsonValue &listValue : listArray) + for (const auto &listValue : listArray) condition->list.value() << listValue.toString(); } } @@ -127,7 +127,7 @@ std::optional parseCondition(const QJsonValue &jsonVa if (object.value("conditions").isArray()) { condition->conditions = std::vector(); const QJsonArray conditionsArray = object.value("conditions").toArray(); - for (const QJsonValue &conditionsValue : conditionsArray) { + for (const auto &conditionsValue : conditionsArray) { condition->conditions.value().emplace_back( std::make_shared( parseCondition(conditionsValue).value())); @@ -160,7 +160,7 @@ bool parseConfigurePresets(const QJsonValue &jsonValue, return false; const QJsonArray configurePresetsArray = jsonValue.toArray(); - for (const QJsonValue &presetJson : configurePresetsArray) { + for (const auto &presetJson : configurePresetsArray) { if (!presetJson.isObject()) continue; @@ -176,7 +176,7 @@ bool parseConfigurePresets(const QJsonValue &jsonValue, preset.inherits = QStringList(); if (inherits.isArray()) { const QJsonArray inheritsArray = inherits.toArray(); - for (const QJsonValue &inheritsValue : inheritsArray) + for (const auto &inheritsValue : inheritsArray) preset.inherits.value() << inheritsValue.toString(); } else { QString inheritsValue = inherits.toString(); @@ -350,7 +350,7 @@ bool parseBuildPresets(const QJsonValue &jsonValue, return false; const QJsonArray buildPresetsArray = jsonValue.toArray(); - for (const QJsonValue &presetJson : buildPresetsArray) { + for (const auto &presetJson : buildPresetsArray) { if (!presetJson.isObject()) continue; @@ -366,7 +366,7 @@ bool parseBuildPresets(const QJsonValue &jsonValue, preset.inherits = QStringList(); if (inherits.isArray()) { const QJsonArray inheritsArray = inherits.toArray(); - for (const QJsonValue &inheritsValue : inheritsArray) + for (const auto &inheritsValue : inheritsArray) preset.inherits.value() << inheritsValue.toString(); } else { QString inheritsValue = inherits.toString(); @@ -404,7 +404,7 @@ bool parseBuildPresets(const QJsonValue &jsonValue, preset.targets = QStringList(); if (targets.isArray()) { const QJsonArray targetsArray = targets.toArray(); - for (const QJsonValue &targetsValue : targetsArray) + for (const auto &targetsValue : targetsArray) preset.targets.value() << targetsValue.toString(); } else { QString targetsValue = targets.toString(); @@ -424,7 +424,7 @@ bool parseBuildPresets(const QJsonValue &jsonValue, if (nativeToolOptions.isArray()) { preset.nativeToolOptions = QStringList(); const QJsonArray toolOptionsArray = nativeToolOptions.toArray(); - for (const QJsonValue &toolOptionsValue : toolOptionsArray) + for (const auto &toolOptionsValue : toolOptionsArray) preset.nativeToolOptions.value() << toolOptionsValue.toString(); } } @@ -444,7 +444,8 @@ bool PresetsParser::parse(const Utils::FilePath &jsonFile, QString &errorMessage { const Utils::expected_str jsonContents = jsonFile.fileContents(); if (!jsonContents) { - errorMessage = Tr::tr("Failed to read file \"%1\".").arg(jsonFile.fileName()); + errorMessage + = ::CMakeProjectManager::Tr::tr("Failed to read file \"%1\".").arg(jsonFile.fileName()); return false; } @@ -460,7 +461,8 @@ bool PresetsParser::parse(const Utils::FilePath &jsonFile, QString &errorMessage } if (!jsonDoc.isObject()) { - errorMessage = Tr::tr("Invalid file \"%1\".").arg(jsonFile.fileName()); + errorMessage + = ::CMakeProjectManager::Tr::tr("Invalid file \"%1\".").arg(jsonFile.fileName()); return false; } @@ -469,7 +471,8 @@ bool PresetsParser::parse(const Utils::FilePath &jsonFile, QString &errorMessage m_presetsData.fileDir = jsonFile.parentDir(); if (!parseVersion(root.value("version"), m_presetsData.version)) { - errorMessage = Tr::tr("Invalid \"version\" in file \"%1\".").arg(jsonFile.fileName()); + errorMessage = ::CMakeProjectManager::Tr::tr("Invalid \"version\" in file \"%1\".") + .arg(jsonFile.fileName()); return false; } @@ -484,8 +487,9 @@ bool PresetsParser::parse(const Utils::FilePath &jsonFile, QString &errorMessage if (!parseConfigurePresets(root.value("configurePresets"), m_presetsData.configurePresets, jsonFile.parentDir())) { - errorMessage - = Tr::tr("Invalid \"configurePresets\" section in %1 file").arg(jsonFile.fileName()); + errorMessage = ::CMakeProjectManager::Tr::tr( + "Invalid \"configurePresets\" section in %1 file") + .arg(jsonFile.fileName()); return false; } @@ -493,8 +497,8 @@ bool PresetsParser::parse(const Utils::FilePath &jsonFile, QString &errorMessage if (!parseBuildPresets(root.value("buildPresets"), m_presetsData.buildPresets, jsonFile.parentDir())) { - errorMessage - = Tr::tr("Invalid \"buildPresets\" section in %1 file").arg(jsonFile.fileName()); + errorMessage = ::CMakeProjectManager::Tr::tr("Invalid \"buildPresets\" section in %1 file") + .arg(jsonFile.fileName()); return false; } diff --git a/src/plugins/compilerexplorer/api/request.h b/src/plugins/compilerexplorer/api/request.h index 0cc57d4c879..dc55ab80b6e 100644 --- a/src/plugins/compilerexplorer/api/request.h +++ b/src/plugins/compilerexplorer/api/request.h @@ -3,6 +3,7 @@ #pragma once +#include #include #include #include @@ -91,7 +92,7 @@ QFuture request( QString errorMessage; if (reply->error() == QNetworkReply::ContentNotFoundError) { - errorMessage = QObject::tr("Not found"); + errorMessage = QCoreApplication::translate("QtC::CompilerExplorer", "Not found"); } else errorMessage = reply->errorString(); diff --git a/src/plugins/compilerexplorer/compilerexplorereditor.cpp b/src/plugins/compilerexplorer/compilerexplorereditor.cpp index 2fcb4f8f073..180878ef937 100644 --- a/src/plugins/compilerexplorer/compilerexplorereditor.cpp +++ b/src/plugins/compilerexplorer/compilerexplorereditor.cpp @@ -285,8 +285,9 @@ CompilerWidget::CompilerWidget(const std::shared_ptr &sourceSett m_asmEditor = new AsmEditorWidget(undoStack); m_asmDocument = QSharedPointer(new TextDocument); m_asmEditor->setTextDocument(m_asmDocument); - m_asmEditor->configureGenericHighlighter( - TextEditor::Highlighter::definitionForName("Intel x86 (NASM)")); + QTC_ASSERT_EXPECTED(m_asmEditor->configureGenericHighlighter("Intel x86 (NASM)"), + m_asmEditor->configureGenericHighlighter( + Utils::mimeTypeForName("text/x-asm"))); m_asmEditor->setReadOnly(true); connect(m_asmEditor, &AsmEditorWidget::gotFocus, this, &CompilerWidget::gotFocus); @@ -483,7 +484,7 @@ void CompilerWidget::doCompile() } } catch (const std::exception &e) { Core::MessageManager::writeDisrupting( - Tr::tr("Failed to compile: \"%1\"").arg(QString::fromUtf8(e.what()))); + Tr::tr("Failed to compile: \"%1\".").arg(QString::fromUtf8(e.what()))); } }); diff --git a/src/plugins/compilerexplorer/compilerexplorersettings.cpp b/src/plugins/compilerexplorer/compilerexplorersettings.cpp index ae47f67f9e2..a93508b5e4e 100644 --- a/src/plugins/compilerexplorer/compilerexplorersettings.cpp +++ b/src/plugins/compilerexplorer/compilerexplorersettings.cpp @@ -210,7 +210,7 @@ void CompilerSettings::fillLibraries(const LibrarySelectionAspect::ResultCallbac fillFromCache(); } catch (const std::exception &e) { Core::MessageManager::writeDisrupting( - Tr::tr("Failed to fetch libraries: \"%1\"") + Tr::tr("Failed to fetch libraries: \"%1\".") .arg(QString::fromUtf8(e.what()))); } }); @@ -253,7 +253,7 @@ void SourceSettings::fillLanguageIdModel(const Utils::StringSelectionAspect::Res fillFromCache(); } catch (const std::exception &e) { Core::MessageManager::writeDisrupting( - Tr::tr("Failed to fetch languages: \"%1\"") + Tr::tr("Failed to fetch languages: \"%1\".") .arg(QString::fromUtf8(e.what()))); } }); @@ -295,7 +295,7 @@ void CompilerSettings::fillCompilerModel(const Utils::StringSelectionAspect::Res fillFromCache(itCache); } catch (const std::exception &e) { Core::MessageManager::writeDisrupting( - Tr::tr("Failed to fetch compilers: \"%1\"") + Tr::tr("Failed to fetch compilers: \"%1\".") .arg(QString::fromUtf8(e.what()))); } }); @@ -311,7 +311,7 @@ CompilerExplorerSettings::CompilerExplorerSettings() compilerExplorerUrl.setSettingsKey("CompilerExplorerUrl"); compilerExplorerUrl.setLabelText(Tr::tr("Compiler Explorer URL:")); - compilerExplorerUrl.setToolTip(Tr::tr("URL of the Compiler Explorer instance to use")); + compilerExplorerUrl.setToolTip(Tr::tr("URL of the Compiler Explorer instance to use.")); compilerExplorerUrl.setDefaultValue("https://godbolt.org/"); compilerExplorerUrl.setDisplayStyle(Utils::StringAspect::DisplayStyle::LineEditDisplay); compilerExplorerUrl.setHistoryCompleter("CompilerExplorer.Url.History"); diff --git a/src/plugins/copilot/authwidget.cpp b/src/plugins/copilot/authwidget.cpp index ffafc8381b4..0b5cfd2d93d 100644 --- a/src/plugins/copilot/authwidget.cpp +++ b/src/plugins/copilot/authwidget.cpp @@ -155,8 +155,9 @@ void AuthWidget::signIn() QMessageBox::critical(this, Tr::tr("Login Failed"), Tr::tr( - "The login request failed: ") - + response.error()->message()); + "The login request failed: %1") + .arg(response.error() + ->message())); setState("Sign in", response.error()->message(), false); return; } diff --git a/src/plugins/copilot/copilotplugin.cpp b/src/plugins/copilot/copilotplugin.cpp index 8af42ae0c07..47364c60d7d 100644 --- a/src/plugins/copilot/copilotplugin.cpp +++ b/src/plugins/copilot/copilotplugin.cpp @@ -72,7 +72,7 @@ void CopilotPlugin::initialize() ActionManager::registerAction(requestAction, Constants::COPILOT_REQUEST_SUGGESTION); QAction *nextSuggestionAction = new QAction(this); - nextSuggestionAction->setText(Tr::tr("Show next Copilot Suggestion")); + nextSuggestionAction->setText(Tr::tr("Show Next Copilot Suggestion")); nextSuggestionAction->setToolTip(Tr::tr( "Cycles through the received Copilot Suggestions showing the next available Suggestion.")); @@ -84,7 +84,7 @@ void CopilotPlugin::initialize() ActionManager::registerAction(nextSuggestionAction, Constants::COPILOT_NEXT_SUGGESTION); QAction *previousSuggestionAction = new QAction(this); - previousSuggestionAction->setText(Tr::tr("Show previos Copilot Suggestion")); + previousSuggestionAction->setText(Tr::tr("Show Previous Copilot Suggestion")); previousSuggestionAction->setToolTip(Tr::tr("Cycles through the received Copilot Suggestions " "showing the previous available Suggestion.")); diff --git a/src/plugins/copilot/copilotsettings.cpp b/src/plugins/copilot/copilotsettings.cpp index 4ef4e2b2a9b..c75f7124235 100644 --- a/src/plugins/copilot/copilotsettings.cpp +++ b/src/plugins/copilot/copilotsettings.cpp @@ -73,9 +73,10 @@ CopilotSettings::CopilotSettings() nodeJsPath.setLabelText(Tr::tr("Node.js path:")); nodeJsPath.setHistoryCompleter("Copilot.NodePath.History"); nodeJsPath.setDisplayName(Tr::tr("Node.js Path")); - nodeJsPath.setToolTip( - Tr::tr("Select path to node.js executable. See https://nodejs.org/en/download/" - "for installation instructions.")); + //: %1 is the URL to nodejs + nodeJsPath.setToolTip(Tr::tr("Select path to node.js executable. See %1 " + "for installation instructions.") + .arg("https://nodejs.org/en/download/")); distPath.setExpectedKind(PathChooser::File); distPath.setDefaultValue(distFromVim.toUserOutput()); @@ -83,9 +84,10 @@ CopilotSettings::CopilotSettings() distPath.setLabelText(Tr::tr("Path to agent.js:")); distPath.setHistoryCompleter("Copilot.DistPath.History"); distPath.setDisplayName(Tr::tr("Agent.js path")); - distPath.setToolTip(Tr::tr( - "Select path to agent.js in Copilot Neovim plugin. See " - "https://github.com/github/copilot.vim#getting-started for installation instructions.")); + //: %1 is the URL to copilot.vim getting started + distPath.setToolTip(Tr::tr("Select path to agent.js in Copilot Neovim plugin. See " + "%1 for installation instructions.") + .arg("https://github.com/github/copilot.vim#getting-started")); autoComplete.setDisplayName(Tr::tr("Auto Request")); autoComplete.setSettingsKey("Copilot.Autocomplete"); @@ -93,26 +95,24 @@ CopilotSettings::CopilotSettings() autoComplete.setDefaultValue(true); autoComplete.setToolTip(Tr::tr("Automatically request suggestions for the current text cursor " "position after changes to the document.")); - autoComplete.setLabelPlacement(BoolAspect::LabelPlacement::InExtraLabel); useProxy.setDisplayName(Tr::tr("Use Proxy")); useProxy.setSettingsKey("Copilot.UseProxy"); useProxy.setLabelText(Tr::tr("Use proxy")); useProxy.setDefaultValue(false); useProxy.setToolTip(Tr::tr("Use a proxy to connect to the Copilot servers.")); - useProxy.setLabelPlacement(BoolAspect::LabelPlacement::InExtraLabel); proxyHost.setDisplayName(Tr::tr("Proxy Host")); proxyHost.setDisplayStyle(StringAspect::LineEditDisplay); proxyHost.setSettingsKey("Copilot.ProxyHost"); - proxyHost.setLabelText(Tr::tr("Proxy host")); + proxyHost.setLabelText(Tr::tr("Proxy host:")); proxyHost.setDefaultValue(""); proxyHost.setToolTip(Tr::tr("The host name of the proxy server.")); proxyHost.setHistoryCompleter("Copilot.ProxyHost.History"); proxyPort.setDisplayName(Tr::tr("Proxy Port")); proxyPort.setSettingsKey("Copilot.ProxyPort"); - proxyPort.setLabelText(Tr::tr("Proxy port")); + proxyPort.setLabelText(Tr::tr("Proxy port:")); proxyPort.setDefaultValue(3128); proxyPort.setToolTip(Tr::tr("The port of the proxy server.")); proxyPort.setRange(1, 65535); @@ -120,7 +120,7 @@ CopilotSettings::CopilotSettings() proxyUser.setDisplayName(Tr::tr("Proxy User")); proxyUser.setDisplayStyle(StringAspect::LineEditDisplay); proxyUser.setSettingsKey("Copilot.ProxyUser"); - proxyUser.setLabelText(Tr::tr("Proxy user")); + proxyUser.setLabelText(Tr::tr("Proxy user:")); proxyUser.setDefaultValue(""); proxyUser.setToolTip(Tr::tr("The user name to access the proxy server.")); proxyUser.setHistoryCompleter("Copilot.ProxyUser.History"); @@ -131,12 +131,11 @@ CopilotSettings::CopilotSettings() saveProxyPassword.setDefaultValue(false); saveProxyPassword.setToolTip( Tr::tr("Save the password to access the proxy server. The password is stored insecurely.")); - saveProxyPassword.setLabelPlacement(BoolAspect::LabelPlacement::InExtraLabel); proxyPassword.setDisplayName(Tr::tr("Proxy Password")); proxyPassword.setDisplayStyle(StringAspect::PasswordLineEditDisplay); proxyPassword.setSettingsKey("Copilot.ProxyPassword"); - proxyPassword.setLabelText(Tr::tr("Proxy password")); + proxyPassword.setLabelText(Tr::tr("Proxy password:")); proxyPassword.setDefaultValue(""); proxyPassword.setToolTip(Tr::tr("The password for the proxy server.")); @@ -145,11 +144,9 @@ CopilotSettings::CopilotSettings() proxyRejectUnauthorized.setLabelText(Tr::tr("Reject unauthorized")); proxyRejectUnauthorized.setDefaultValue(true); proxyRejectUnauthorized.setToolTip(Tr::tr("Reject unauthorized certificates from the proxy " - "server. This is a security risk.")); - proxyRejectUnauthorized.setLabelPlacement(BoolAspect::LabelPlacement::InExtraLabel); + "server. Turning this off is a security risk.")); initEnableAspect(enableCopilot); - enableCopilot.setLabelPlacement(BoolAspect::LabelPlacement::InExtraLabel); readSettings(); diff --git a/src/plugins/coreplugin/CMakeLists.txt b/src/plugins/coreplugin/CMakeLists.txt index d7f04d88ed5..6079989c718 100644 --- a/src/plugins/coreplugin/CMakeLists.txt +++ b/src/plugins/coreplugin/CMakeLists.txt @@ -209,8 +209,6 @@ add_qtc_plugin(Core locator/spotlightlocatorfilter.h locator/urllocatorfilter.cpp locator/urllocatorfilter.h - loggingmanager.cpp - loggingmanager.h loggingviewer.cpp loggingviewer.h manhattanstyle.cpp diff --git a/src/plugins/coreplugin/coreplugin.cpp b/src/plugins/coreplugin/coreplugin.cpp index dca909d0752..bfd0669c338 100644 --- a/src/plugins/coreplugin/coreplugin.cpp +++ b/src/plugins/coreplugin/coreplugin.cpp @@ -9,18 +9,18 @@ #include "icore.h" #include "idocument.h" #include "iwizardfactory.h" +#include "loggingviewer.h" #include "modemanager.h" #include "session.h" #include "settingsdatabase.h" #include "themechooser.h" #include "actionmanager/actionmanager.h" +#include "coreconstants.h" #include "documentmanager.h" -#include "editormanager/editormanager.h" +#include "fileutils.h" #include "find/findplugin.h" #include "locator/locator.h" -#include "coreconstants.h" -#include "fileutils.h" #include #include @@ -490,6 +490,7 @@ QString CorePlugin::msgCrashpadInformation() ExtensionSystem::IPlugin::ShutdownFlag CorePlugin::aboutToShutdown() { + LoggingViewer::hideLoggingView(); Find::aboutToShutdown(); m_locator->aboutToShutdown(); ICore::aboutToShutdown(); diff --git a/src/plugins/coreplugin/coreplugin.qbs b/src/plugins/coreplugin/coreplugin.qbs index 37c8a9b73f8..9bd3923a6fb 100644 --- a/src/plugins/coreplugin/coreplugin.qbs +++ b/src/plugins/coreplugin/coreplugin.qbs @@ -102,8 +102,6 @@ QtcPlugin { "iwizardfactory.h", "jsexpander.cpp", "jsexpander.h", - "loggingmanager.cpp", - "loggingmanager.h", "loggingviewer.cpp", "loggingviewer.h", "manhattanstyle.cpp", diff --git a/src/plugins/coreplugin/dialogs/settingsdialog.cpp b/src/plugins/coreplugin/dialogs/settingsdialog.cpp index f420c0ff492..d503c71671f 100644 --- a/src/plugins/coreplugin/dialogs/settingsdialog.cpp +++ b/src/plugins/coreplugin/dialogs/settingsdialog.cpp @@ -455,7 +455,6 @@ private: QCheckBox *m_sortCheckBox; QListView *m_categoryList; QLabel *m_headerLabel; - std::vector m_eventLoops; bool m_running = false; bool m_applied = false; bool m_finished = false; @@ -463,14 +462,14 @@ private: static QPointer m_instance = nullptr; -SettingsDialog::SettingsDialog(QWidget *parent) : - QDialog(parent), - m_pages(sortedOptionsPages()), - m_stackedLayout(new QStackedLayout), - m_filterLineEdit(new Utils::FancyLineEdit), - m_sortCheckBox(new QCheckBox(Tr::tr("Sort Categories"))), - m_categoryList(new CategoryListView), - m_headerLabel(new QLabel) +SettingsDialog::SettingsDialog(QWidget *parent) + : QDialog(parent) + , m_pages(sortedOptionsPages()) + , m_stackedLayout(new QStackedLayout) + , m_filterLineEdit(new Utils::FancyLineEdit) + , m_sortCheckBox(new QCheckBox(Tr::tr("Sort categories"))) + , m_categoryList(new CategoryListView) + , m_headerLabel(new QLabel) { m_filterLineEdit->setFiltering(true); @@ -757,11 +756,6 @@ void SettingsDialog::done(int val) ICore::saveSettings(ICore::SettingsDialogDone); // save all settings - // exit event loops in reverse order of addition - for (QEventLoop *eventLoop : m_eventLoops) - eventLoop->exit(); - m_eventLoops.clear(); - QDialog::done(val); } @@ -773,29 +767,28 @@ bool SettingsDialog::execDialog() static const char kPreferenceDialogSize[] = "Core/PreferenceDialogSize"; const QSize initialSize(kInitialWidth, kInitialHeight); resize(ICore::settings()->value(kPreferenceDialogSize, initialSize).toSize()); - exec(); - m_running = false; - m_instance = nullptr; - ICore::settings()->setValueWithDefault(kPreferenceDialogSize, - size(), - initialSize); - // make sure that the current "single" instance is deleted - // we can't delete right away, since we still access the m_applied member - deleteLater(); - } else { - // exec dialog is called while the instance is already running - // this can happen when a event triggers a code path that wants to - // show the settings dialog again - // e.g. when starting the debugger (with non-built debugging helpers), - // and manually opening the settings dialog, after the debugger hit - // a break point it will complain about missing helper, and offer the - // option to open the settings dialog. - // Keep the UI running by creating another event loop. - QEventLoop eventLoop; - m_eventLoops.emplace(m_eventLoops.begin(), &eventLoop); - eventLoop.exec(); - QTC_ASSERT(m_eventLoops.empty(), return m_applied;); + + // We call open here as exec is no longer the preferred method of displaying + // modal dialogs. The issue that triggered the change here was QTBUG-117814 + // (on macOS: Caps Lock indicator does not update) + open(); + connect(this, &QDialog::finished, this, [this, initialSize] { + m_running = false; + m_instance = nullptr; + ICore::settings()->setValueWithDefault(kPreferenceDialogSize, size(), initialSize); + // make sure that the current "single" instance is deleted + // we can't delete right away, since we still access the m_applied member + deleteLater(); + }); } + + // This function needs to be blocking, so we need to wait for the dialog to finish. + // We cannot use QDialog::exec due to the issue described above at "open()". + // Since execDialog can be called multiple times, we need to run potentially multiple + // loops here, to have every invocation of execDialog() wait for the dialog to finish. + while (m_running) + QApplication::processEvents(QEventLoop::WaitForMoreEvents); + return m_applied; } diff --git a/src/plugins/coreplugin/editormanager/editormanager.cpp b/src/plugins/coreplugin/editormanager/editormanager.cpp index 4b059a10fd7..ad31e04ea98 100644 --- a/src/plugins/coreplugin/editormanager/editormanager.cpp +++ b/src/plugins/coreplugin/editormanager/editormanager.cpp @@ -873,6 +873,9 @@ IEditor *EditorManagerPrivate::openEditor(EditorView *view, const FilePath &file IEditorFactory *selectedFactory = nullptr; if (!factories.isEmpty()) { +#if QT_VERSION >= QT_VERSION_CHECK(6, 6, 0) + msgbox.setOptions(QMessageBox::Option::DontUseNativeDialog); +#endif auto button = qobject_cast(msgbox.button(QMessageBox::Open)); QTC_ASSERT(button, return nullptr); auto menu = new QMenu(button); diff --git a/src/plugins/coreplugin/generalsettings.cpp b/src/plugins/coreplugin/generalsettings.cpp index 1e2c5515342..3087b0d8c4b 100644 --- a/src/plugins/coreplugin/generalsettings.cpp +++ b/src/plugins/coreplugin/generalsettings.cpp @@ -139,12 +139,12 @@ GeneralSettingsWidget::GeneralSettingsWidget() != Qt::HighDpiScaleFactorRoundingPolicy::Unset) { using Policy = Qt::HighDpiScaleFactorRoundingPolicy; m_policyComboBox = new QComboBox; - m_policyComboBox->addItem(Tr::tr("Round up for .5 and above"), int(Policy::Round)); - m_policyComboBox->addItem(Tr::tr("Always round up"), int(Policy::Ceil)); - m_policyComboBox->addItem(Tr::tr("Always round down"), int(Policy::Floor)); - m_policyComboBox->addItem(Tr::tr("Round up for .75 and above"), - int(Policy::RoundPreferFloor)); - m_policyComboBox->addItem(Tr::tr("Don't round"), int(Policy::PassThrough)); + m_policyComboBox->addItem(Tr::tr("Round Up for .5 and Above"), int(Policy::Round)); + m_policyComboBox->addItem(Tr::tr("Always Round Up"), int(Policy::Ceil)); + m_policyComboBox->addItem(Tr::tr("Always Round Down"), int(Policy::Floor)); + m_policyComboBox->addItem(Tr::tr("Round Up for .75 and Above"), + int(Policy::RoundPreferFloor)); + m_policyComboBox->addItem(Tr::tr("Don't Round"), int(Policy::PassThrough)); m_policyComboBox->setSizeAdjustPolicy(QComboBox::AdjustToContents); const Policy userPolicy = @@ -153,7 +153,7 @@ GeneralSettingsWidget::GeneralSettingsWidget() .value(); m_policyComboBox->setCurrentIndex(m_policyComboBox->findData(int(userPolicy))); - form.addRow({Tr::tr("DPI Rounding Policy:"), m_policyComboBox, st}); + form.addRow({Tr::tr("DPI rounding policy:"), m_policyComboBox, st}); } form.addRow({empty, generalSettings().showShortcutsInContextMenus}); diff --git a/src/plugins/coreplugin/icore.cpp b/src/plugins/coreplugin/icore.cpp index 4a73eb6e9eb..eaf94e45cf5 100644 --- a/src/plugins/coreplugin/icore.cpp +++ b/src/plugins/coreplugin/icore.cpp @@ -1858,19 +1858,19 @@ void ICorePrivate::registerDefaultActions() // Show Menubar Action if (globalMenuBar() && !globalMenuBar()->isNativeMenuBar()) { - m_toggleMenubarAction = new QAction(Tr::tr("Show Menubar"), this); + m_toggleMenubarAction = new QAction(Tr::tr("Show Menu Bar"), this); m_toggleMenubarAction->setCheckable(true); cmd = ActionManager::registerAction(m_toggleMenubarAction, Constants::TOGGLE_MENUBAR); cmd->setDefaultKeySequence(QKeySequence(Tr::tr("Ctrl+Alt+M"))); connect(m_toggleMenubarAction, &QAction::toggled, this, [cmd](bool visible) { if (!visible) { - CheckableMessageBox::information( - Core::ICore::dialogParent(), - Tr::tr("Hide Menubar"), - Tr::tr( - "This will hide the menu bar completely. You can show it again by typing ") - + cmd->keySequence().toString(QKeySequence::NativeText), - Key("ToogleMenuBarHint")); + CheckableMessageBox::information(Core::ICore::dialogParent(), + Tr::tr("Hide Menu Bar"), + Tr::tr("This will hide the menu bar completely. " + "You can show it again by typing %1.") + .arg(cmd->keySequence().toString( + QKeySequence::NativeText)), + Key("ToogleMenuBarHint")); } globalMenuBar()->setVisible(visible); }); diff --git a/src/plugins/coreplugin/loggingmanager.cpp b/src/plugins/coreplugin/loggingmanager.cpp deleted file mode 100644 index 608e7ce4706..00000000000 --- a/src/plugins/coreplugin/loggingmanager.cpp +++ /dev/null @@ -1,304 +0,0 @@ -// Copyright (C) 2021 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 - -#include "loggingmanager.h" - -#include -#include - -#include -#include -#include -#include -#include -#include - -// -// WARNING! Do not use qDebug(), qWarning() or similar inside this file - -// same applies for indirect usages (e.g. QTC_ASSERT() and the like). -// Using static functions of QLoggingCategory may cause dead locks as well. -// - -using namespace Utils; - -namespace Core { -namespace Internal { - -static QtMessageHandler s_originalMessageHandler = nullptr; - -static LoggingViewManager *s_instance = nullptr; - -static QString levelToString(QtMsgType t) -{ - switch (t) { - case QtMsgType::QtCriticalMsg: return {"critical"}; - case QtMsgType::QtDebugMsg: return {"debug"}; - case QtMsgType::QtInfoMsg: return {"info"}; - case QtMsgType::QtWarningMsg: return {"warning"}; - default: - return {"fatal"}; // wrong but we don't care - } -} - -static QtMsgType parseLevel(const QString &level) -{ - switch (level.at(0).toLatin1()) { - case 'c': return QtMsgType::QtCriticalMsg; - case 'd': return QtMsgType::QtDebugMsg; - case 'i': return QtMsgType::QtInfoMsg; - case 'w': return QtMsgType::QtWarningMsg; - default: - return QtMsgType::QtFatalMsg; // wrong but we don't care - } -} - -static bool parseLine(const QString &line, FilterRuleSpec *filterRule) -{ - const QStringList parts = line.split('='); - if (parts.size() != 2) - return false; - - const QString category = parts.at(0); - static const QRegularExpression regex("^(.+?)(\\.(debug|info|warning|critical))?$"); - const QRegularExpressionMatch match = regex.match(category); - if (!match.hasMatch()) - return false; - - const QString categoryName = match.captured(1); - if (categoryName.size() > 2) { - if (categoryName.mid(1, categoryName.size() - 2).contains('*')) - return false; - } else if (categoryName.size() == 2) { - if (categoryName.count('*') == 2) - return false; - } - filterRule->category = categoryName; - - if (match.capturedLength(2) == 0) - filterRule->level = std::nullopt; - else - filterRule->level = std::make_optional(parseLevel(match.captured(2).mid(1))); - - const QString enabled = parts.at(1); - if (enabled == "true" || enabled == "false") { - filterRule->enabled = (enabled == "true"); - return true; - } - return false; -} - -static QList fetchOriginalRules() -{ - QList rules; - - auto appendRulesFromFile = [&rules](const QString &fileName) { - QSettings iniSettings(fileName, QSettings::IniFormat); - iniSettings.beginGroup("Rules"); - const QStringList keys = iniSettings.allKeys(); - for (const QString &key : keys) { - const QString value = iniSettings.value(key).toString(); - FilterRuleSpec filterRule; - if (parseLine(key + "=" + value, &filterRule)) - rules.append(filterRule); - } - iniSettings.endGroup(); - }; - - Utils::FilePath iniFile = Utils::FilePath::fromString( - QLibraryInfo::path(QLibraryInfo::DataPath)).pathAppended("qtlogging.ini"); - if (iniFile.exists()) - appendRulesFromFile(iniFile.toString()); - - const QString qtProjectString = QStandardPaths::locate(QStandardPaths::GenericConfigLocation, - "QtProject/qtlogging.ini"); - if (!qtProjectString.isEmpty()) - appendRulesFromFile(qtProjectString); - - iniFile = Utils::FilePath::fromString(qtcEnvironmentVariable("QT_LOGGING_CONF")); - if (iniFile.exists()) - appendRulesFromFile(iniFile.toString()); - - if (qtcEnvironmentVariableIsSet("QT_LOGGING_RULES")) { - const QStringList rulesStrings = qtcEnvironmentVariable("QT_LOGGING_RULES").split(';'); - for (const QString &rule : rulesStrings) { - FilterRuleSpec filterRule; - if (parseLine(rule, &filterRule)) - rules.append(filterRule); - } - } - return rules; -} - -LoggingViewManager::LoggingViewManager(QObject *parent) - : QObject(parent) - , m_originalLoggingRules(qtcEnvironmentVariable("QT_LOGGING_RULES")) -{ - qRegisterMetaType(); - s_instance = this; - s_originalMessageHandler = qInstallMessageHandler(logMessageHandler); - m_enabled = true; - m_originalRules = fetchOriginalRules(); - prefillCategories(); - QLoggingCategory::setFilterRules("*=true"); -} - -LoggingViewManager::~LoggingViewManager() -{ - m_enabled = false; - qInstallMessageHandler(s_originalMessageHandler); - s_originalMessageHandler = nullptr; - qputenv("QT_LOGGING_RULES", m_originalLoggingRules.toLocal8Bit()); - QLoggingCategory::setFilterRules("*=false"); - resetFilterRules(); - s_instance = nullptr; -} - -LoggingViewManager *LoggingViewManager::instance() -{ - return s_instance; -} - -void LoggingViewManager::logMessageHandler(QtMsgType type, const QMessageLogContext &context, - const QString &mssg) -{ - if (!s_instance->m_enabled) { - if (s_instance->enabledInOriginalRules(context, type)) - s_originalMessageHandler(type, context, mssg); - return; - } - - if (!context.category) { - s_originalMessageHandler(type, context, mssg); - return; - } - - const QString category = QString::fromLocal8Bit(context.category); - auto it = s_instance->m_categories.find(category); - if (it == s_instance->m_categories.end()) { - if (!s_instance->m_listQtInternal && category.startsWith("qt.")) - return; - LoggingCategoryEntry entry; - entry.level = QtMsgType::QtDebugMsg; - entry.enabled = (category == "default") || s_instance->enabledInOriginalRules(context, type); - it = s_instance->m_categories.insert(category, entry); - emit s_instance->foundNewCategory(category, entry); - } - - const LoggingCategoryEntry entry = it.value(); - if (entry.enabled && enabled(type, entry.level)) { - const QString timestamp = QDateTime::currentDateTime().toString("HH:mm:ss.zzz"); - emit s_instance->receivedLog(timestamp, category, - LoggingViewManager::messageTypeToString(type), mssg); - } -} - -bool LoggingViewManager::isCategoryEnabled(const QString &category) -{ - auto entry = m_categories.find(category); - if (entry == m_categories.end()) // shall not happen - paranoia - return false; - - return entry.value().enabled; -} - -void LoggingViewManager::setCategoryEnabled(const QString &category, bool enabled) -{ - auto entry = m_categories.find(category); - if (entry == m_categories.end()) // shall not happen - paranoia - return; - - entry->enabled = enabled; -} - -void LoggingViewManager::setLogLevel(const QString &category, QtMsgType type) -{ - auto entry = m_categories.find(category); - if (entry == m_categories.end()) // shall not happen - paranoia - return; - - entry->level = type; -} - -void LoggingViewManager::setListQtInternal(bool listQtInternal) -{ - m_listQtInternal = listQtInternal; -} - -void LoggingViewManager::appendOrUpdate(const QString &category, const LoggingCategoryEntry &entry) -{ - auto it = m_categories.find(category); - bool append = it == m_categories.end(); - m_categories.insert(category, entry); - if (append) - emit foundNewCategory(category, entry); - else - emit updatedCategory(category, entry); -} - -/* - * Does not check categories for being present, will perform early exit if m_categories is not empty - */ -void LoggingViewManager::prefillCategories() -{ - if (!m_categories.isEmpty()) - return; - - for (int i = 0, end = m_originalRules.size(); i < end; ++i) { - const FilterRuleSpec &rule = m_originalRules.at(i); - if (rule.category.startsWith('*') || rule.category.endsWith('*')) - continue; - - bool enabled = rule.enabled; - // check following rules whether they might overwrite - for (int j = i + 1; j < end; ++j) { - const FilterRuleSpec &secondRule = m_originalRules.at(j); - const QRegularExpression regex( - QRegularExpression::wildcardToRegularExpression(secondRule.category)); - if (!regex.match(rule.category).hasMatch()) - continue; - - if (secondRule.level.has_value() && rule.level != secondRule.level) - continue; - - enabled = secondRule.enabled; - } - LoggingCategoryEntry entry; - entry.level = rule.level.value_or(QtMsgType::QtInfoMsg); - entry.enabled = enabled; - m_categories.insert(rule.category, entry); - } -} - -void LoggingViewManager::resetFilterRules() -{ - for (const FilterRuleSpec &rule : std::as_const(m_originalRules)) { - const QString level = rule.level.has_value() ? '.' + levelToString(rule.level.value()) - : QString(); - const QString ruleString = rule.category + level + '=' + (rule.enabled ? "true" : "false"); - QLoggingCategory::setFilterRules(ruleString); - } -} - -bool LoggingViewManager::enabledInOriginalRules(const QMessageLogContext &context, QtMsgType type) -{ - if (!context.category) - return false; - const QString category = QString::fromUtf8(context.category); - bool result = false; - for (const FilterRuleSpec &rule : std::as_const(m_originalRules)) { - const QRegularExpression regex( - QRegularExpression::wildcardToRegularExpression(rule.category)); - if (regex.match(category).hasMatch()) { - if (rule.level.has_value()) { - if (rule.level.value() == type) - result = rule.enabled; - } else { - result = rule.enabled; - } - } - } - return result; -} - -} // namespace Internal -} // namespace Core diff --git a/src/plugins/coreplugin/loggingmanager.h b/src/plugins/coreplugin/loggingmanager.h deleted file mode 100644 index 1b8830c0aa1..00000000000 --- a/src/plugins/coreplugin/loggingmanager.h +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (C) 2021 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 - -#pragma once - -#include -#include -#include -#include - -#include - -namespace Core { -namespace Internal { - -struct FilterRuleSpec -{ - QString category; - std::optional level; - bool enabled; -}; - -class LoggingCategoryEntry -{ -public: - QtMsgType level = QtDebugMsg; - bool enabled = false; - QColor color; -}; - -class LoggingViewManager : public QObject -{ - Q_OBJECT -public: - static inline QString messageTypeToString(QtMsgType type) - { - switch (type) { - case QtDebugMsg: return {"Debug"}; - case QtInfoMsg: return {"Info"}; - case QtCriticalMsg: return {"Critical"}; - case QtWarningMsg: return {"Warning"}; - case QtFatalMsg: return {"Fatal"}; - default: return {"Unknown"}; - } - } - - static inline QtMsgType messageTypeFromString(const QString &type) - { - if (type.isEmpty()) - return QtDebugMsg; - - // shortcut - only handle expected - switch (type.at(0).toLatin1()) { - case 'I': - return QtInfoMsg; - case 'C': - return QtCriticalMsg; - case 'W': - return QtWarningMsg; - case 'D': - default: - return QtDebugMsg; - } - } - - explicit LoggingViewManager(QObject *parent = nullptr); - ~LoggingViewManager(); - - static LoggingViewManager *instance(); - - static inline bool enabled(QtMsgType current, QtMsgType stored) - { - if (stored == QtMsgType::QtInfoMsg) - return true; - if (current == stored) - return true; - if (stored == QtMsgType::QtDebugMsg) - return current != QtMsgType::QtInfoMsg; - if (stored == QtMsgType::QtWarningMsg) - return current == QtMsgType::QtCriticalMsg || current == QtMsgType::QtFatalMsg; - if (stored == QtMsgType::QtCriticalMsg) - return current == QtMsgType::QtFatalMsg; - return false; - } - - static void logMessageHandler(QtMsgType type, const QMessageLogContext &context, - const QString &mssg); - - void setEnabled(bool enabled) { m_enabled = enabled; } - bool isEnabled() const { return m_enabled; } - bool isCategoryEnabled(const QString &category); - void setCategoryEnabled(const QString &category, bool enabled); - void setLogLevel(const QString &category, QtMsgType type); - void setListQtInternal(bool listQtInternal); - QList originalRules() const { return m_originalRules; } - - QMap categories() const { return m_categories; } - void appendOrUpdate(const QString &category, const LoggingCategoryEntry &entry); - -signals: - void receivedLog(const QString ×tamp, const QString &type, const QString &category, - const QString &msg); - void foundNewCategory(const QString &category, const LoggingCategoryEntry &entry); - void updatedCategory(const QString &category, const LoggingCategoryEntry &entry); - -private: - void prefillCategories(); - void resetFilterRules(); - bool enabledInOriginalRules(const QMessageLogContext &context, QtMsgType type); - - QMap m_categories; - const QString m_originalLoggingRules; - QList m_originalRules; - bool m_enabled = false; - bool m_listQtInternal = false; -}; - -} // namespace Internal -} // namespace Core - -Q_DECLARE_METATYPE(Core::Internal::LoggingCategoryEntry) diff --git a/src/plugins/coreplugin/loggingviewer.cpp b/src/plugins/coreplugin/loggingviewer.cpp index 742e65a34c5..bf1f8b736f0 100644 --- a/src/plugins/coreplugin/loggingviewer.cpp +++ b/src/plugins/coreplugin/loggingviewer.cpp @@ -3,26 +3,22 @@ #include "loggingviewer.h" -#include "actionmanager/actionmanager.h" #include "coreicons.h" #include "coreplugintr.h" #include "icore.h" -#include "loggingmanager.h" -#include #include #include +#include #include #include +#include #include #include #include -#include #include -#include #include -#include #include #include #include @@ -31,138 +27,348 @@ #include #include #include -#include -#include #include -#include +#include #include -#include #include -namespace Core { -namespace Internal { +namespace Core::Internal { -class LoggingCategoryItem +static QColor colorForCategory(const QString &category); +void setCategoryColor(const QString &category, const QColor &color); + +QHash s_categoryColor; + +static inline QString messageTypeToString(QtMsgType type) { -public: - QString name; - LoggingCategoryEntry entry; + switch (type) { + case QtDebugMsg: + return {"Debug"}; + case QtInfoMsg: + return {"Info"}; + case QtCriticalMsg: + return {"Critical"}; + case QtWarningMsg: + return {"Warning"}; + case QtFatalMsg: + return {"Fatal"}; + default: + return {"Unknown"}; + } +} - static LoggingCategoryItem fromJson(const QJsonObject &object, bool *ok); +class LogCategoryRegistry : public QObject +{ + Q_OBJECT +public: + static LogCategoryRegistry &instance() + { + static LogCategoryRegistry s_instance; + return s_instance; + } + + static void filter(QLoggingCategory *category) + { + if (s_oldFilter) + s_oldFilter(category); + + LogCategoryRegistry::instance().onFilter(category); + } + + void start() + { + if (m_started) + return; + + m_started = true; + s_oldFilter = QLoggingCategory::installFilter(&LogCategoryRegistry::filter); + } + + QList categories() { return m_categories; } + +signals: + void newLogCategory(QLoggingCategory *category); + +private: + LogCategoryRegistry() = default; + + void onFilter(QLoggingCategory *category) + { + if (!m_categories.contains(category)) { + m_categories.append(category); + emit newLogCategory(category); + } + } + +private: + static QLoggingCategory::CategoryFilter s_oldFilter; + + QList m_categories; + bool m_started{false}; }; -LoggingCategoryItem LoggingCategoryItem::fromJson(const QJsonObject &object, bool *ok) +QLoggingCategory::CategoryFilter LogCategoryRegistry::s_oldFilter; + +struct SavedEntry { - if (!object.contains("name")) { - *ok = false; - return {}; + QColor color; + QString name; + QtMsgType level; + std::optional> levels; + + static Utils::expected_str fromJson(const QJsonObject &obj) + { + if (!obj.contains("name")) + return Utils::make_unexpected(Tr::tr("Entry is missing a logging category name.")); + + SavedEntry result; + result.name = obj.value("name").toString(); + + if (!obj.contains("entry")) + return Utils::make_unexpected(Tr::tr("Entry is missing data.")); + + auto entry = obj.value("entry").toObject(); + if (entry.contains("color")) + result.color = QColor(entry.value("color").toString()); + + if (entry.contains("level")) { + int lvl = entry.value("level").toInt(0); + if (lvl < QtDebugMsg || lvl > QtInfoMsg) + return Utils::make_unexpected(Tr::tr("Invalid level: %1").arg(lvl)); + result.level = static_cast(lvl); + } + + if (entry.contains("levels")) { + QVariantMap map = entry.value("levels").toVariant().toMap(); + std::array levels{ + map.contains("Debug") && map["Debug"].toBool(), + map.contains("Warning") && map["Warning"].toBool(), + map.contains("Critical") && map["Critical"].toBool(), + true, + map.contains("Info") && map["Info"].toBool(), + }; + result.levels = levels; + } + + return result; } - const QJsonValue entryVal = object.value("entry"); - if (entryVal.isUndefined()) { - *ok = false; - return {}; - } - const QJsonObject entryObj = entryVal.toObject(); - if (!entryObj.contains("level")) { - *ok = false; - return {}; +}; + +class LoggingCategoryEntry +{ +public: + LoggingCategoryEntry(const QString &name) + : m_name(name) + {} + LoggingCategoryEntry(QLoggingCategory *category) + : m_name(QString::fromUtf8(category->categoryName())) + { + setLogCategory(category); } - LoggingCategoryEntry entry; - entry.level = QtMsgType(entryObj.value("level").toInt()); - entry.enabled = true; - if (entryObj.contains("color")) - entry.color = QColor(entryObj.value("color").toString()); - LoggingCategoryItem item {object.value("name").toString(), entry}; - *ok = true; - return item; -} + LoggingCategoryEntry(const SavedEntry &savedEntry) + : m_name(savedEntry.name) + { + m_saved = savedEntry.levels; + m_color = savedEntry.color; + if (!m_saved) { + m_saved = std::array(); + for (int i = QtDebugMsg; i <= QtInfoMsg; ++i) { + (*m_saved)[i] = savedEntry.level <= i; + } + } + } + + QString name() const { return m_name; } + QColor color() const { return m_color; } + void setColor(const QColor &c) { m_color = c; } + + void setUseOriginal(bool useOriginal) + { + if (!m_useOriginal && m_category && m_originalSettings) { + m_saved = std::array{}; + + for (int i = QtDebugMsg; i < QtInfoMsg; i++) { + (*m_saved)[i] = m_category->isEnabled(static_cast(i)); + m_category->setEnabled(static_cast(i), (*m_originalSettings)[i]); + } + + } else if (!useOriginal && m_useOriginal && m_saved && m_category) { + for (int i = QtDebugMsg; i < QtInfoMsg; i++) + m_category->setEnabled(static_cast(i), (*m_saved)[i]); + } + m_useOriginal = useOriginal; + } + + bool isEnabled(QtMsgType msgType) const + { + if (m_category) + return m_category->isEnabled(msgType); + if (m_saved) + return (*m_saved)[msgType]; + return false; + } + + void setEnabled(QtMsgType msgType, bool isEnabled) + { + QTC_ASSERT(!m_useOriginal, return); + + if (m_category) + m_category->setEnabled(msgType, isEnabled); + + if (m_saved) + (*m_saved)[msgType] = isEnabled; + } + + void setSaved(const SavedEntry &entry) + { + QTC_ASSERT(entry.name == name(), return); + + m_saved = entry.levels; + m_color = entry.color; + if (!m_saved) { + m_saved = std::array(); + for (int i = QtDebugMsg; i <= QtInfoMsg; ++i) { + (*m_saved)[i] = entry.level <= i; + } + } + if (m_category) + setLogCategory(m_category); + } + + void setLogCategory(QLoggingCategory *category) + { + QTC_ASSERT(QString::fromUtf8(category->categoryName()) == m_name, return); + + m_category = category; + if (!m_originalSettings) { + m_originalSettings = { + category->isDebugEnabled(), + category->isWarningEnabled(), + category->isCriticalEnabled(), + true, // always enable fatal + category->isInfoEnabled(), + }; + } + + if (m_saved && !m_useOriginal) { + m_category->setEnabled(QtDebugMsg, m_saved->at(0)); + m_category->setEnabled(QtWarningMsg, m_saved->at(1)); + m_category->setEnabled(QtCriticalMsg, m_saved->at(2)); + m_category->setEnabled(QtInfoMsg, m_saved->at(4)); + } + } + + bool isDebugEnabled() const { return isEnabled(QtDebugMsg); } + bool isWarningEnabled() const { return isEnabled(QtWarningMsg); } + bool isCriticalEnabled() const { return isEnabled(QtCriticalMsg); } + bool isInfoEnabled() const { return isEnabled(QtInfoMsg); } + +private: + QString m_name; + QLoggingCategory *m_category{nullptr}; + std::optional> m_originalSettings; + std::optional> m_saved; + QColor m_color; + bool m_useOriginal{false}; +}; class LoggingCategoryModel : public QAbstractListModel { Q_OBJECT public: - LoggingCategoryModel() = default; - ~LoggingCategoryModel() override; + LoggingCategoryModel(QObject *parent) + : QAbstractListModel(parent) + { + auto newCategory = [this](QLoggingCategory *category) { + QString name = QString::fromUtf8(category->categoryName()); + auto itExists = std::find_if(m_categories.begin(), + m_categories.end(), + [name](const auto &cat) { return name == cat.name(); }); - bool append(const QString &category, const LoggingCategoryEntry &entry = {}); - bool update(const QString &category, const LoggingCategoryEntry &entry); - int columnCount(const QModelIndex &) const final { return 3; } - int rowCount(const QModelIndex & = QModelIndex()) const final { return m_categories.count(); } + if (itExists != m_categories.end()) { + itExists->setLogCategory(category); + } else { + LoggingCategoryEntry entry(category); + append(entry); + } + }; + + for (QLoggingCategory *cat : LogCategoryRegistry::instance().categories()) + newCategory(cat); + + connect(&LogCategoryRegistry::instance(), + &LogCategoryRegistry::newLogCategory, + this, + newCategory); + + LogCategoryRegistry::instance().start(); + }; + + ~LoggingCategoryModel() override; + enum Column { Color, Name, Debug, Warning, Critical, Fatal, Info }; + + void append(const LoggingCategoryEntry &entry); + int columnCount(const QModelIndex &) const final { return 7; } + int rowCount(const QModelIndex & = QModelIndex()) const final { return m_categories.size(); } QVariant data(const QModelIndex &index, int role) const final; bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) final; Qt::ItemFlags flags(const QModelIndex &index) const final; - QVariant headerData(int section, Qt::Orientation orientation, + QVariant headerData(int section, + Qt::Orientation orientation, int role = Qt::DisplayRole) const final; - void reset(); - void setFromManager(LoggingViewManager *manager); - QList enabledCategories() const; - void disableAll(); -signals: - void categoryChanged(const QString &category, bool enabled); - void colorChanged(const QString &category, const QColor &color); - void logLevelChanged(const QString &category, QtMsgType logLevel); + void saveEnabledCategoryPreset() const; + void loadAndUpdateFromPreset(); + + void setUseOriginal(bool useOriginal) + { + if (useOriginal != m_useOriginal) { + beginResetModel(); + for (auto &entry : m_categories) + entry.setUseOriginal(useOriginal); + + m_useOriginal = useOriginal; + endResetModel(); + } + } + + const QList &categories() const { return m_categories; } private: - QList m_categories; + QList m_categories; + bool m_useOriginal{false}; }; -LoggingCategoryModel::~LoggingCategoryModel() -{ - reset(); -} +LoggingCategoryModel::~LoggingCategoryModel() {} -bool LoggingCategoryModel::append(const QString &category, const LoggingCategoryEntry &entry) +void LoggingCategoryModel::append(const LoggingCategoryEntry &entry) { - // no check? - beginInsertRows(QModelIndex(), m_categories.size(), m_categories.size()); - m_categories.append(new LoggingCategoryItem{category, entry}); + beginInsertRows(QModelIndex(), m_categories.size(), m_categories.size() + 1); + m_categories.push_back(entry); endInsertRows(); - return true; -} - -bool LoggingCategoryModel::update(const QString &category, const LoggingCategoryEntry &entry) -{ - if (m_categories.size() == 0) // should not happen - return false; - - int row = 0; - for (int end = m_categories.size(); row < end; ++row) { - if (m_categories.at(row)->name == category) - break; - } - if (row == m_categories.size()) // should not happen - return false; - - setData(index(row, 0), Qt::Checked, Qt::CheckStateRole); - setData(index(row, 1), LoggingViewManager::messageTypeToString(entry.level), Qt::EditRole); - setData(index(row, 2), entry.color, Qt::DecorationRole); - return true; } QVariant LoggingCategoryModel::data(const QModelIndex &index, int role) const { - static const QColor defaultColor = Utils::creatorTheme()->palette().text().color(); if (!index.isValid()) return {}; - if (role == Qt::DisplayRole) { - if (index.column() == 0) - return m_categories.at(index.row())->name; - if (index.column() == 1) { - return LoggingViewManager::messageTypeToString( - m_categories.at(index.row())->entry.level); - } - } - if (role == Qt::DecorationRole && index.column() == 2) { - const QColor color = m_categories.at(index.row())->entry.color; + + if (index.column() == Column::Name && role == Qt::DisplayRole) { + return m_categories.at(index.row()).name(); + } else if (role == Qt::DecorationRole && index.column() == Column::Color) { + const QColor color = m_categories.at(index.row()).color(); if (color.isValid()) return color; + + static const QColor defaultColor = Utils::creatorTheme()->palette().text().color(); return defaultColor; - } - if (role == Qt::CheckStateRole && index.column() == 0) { - const LoggingCategoryEntry entry = m_categories.at(index.row())->entry; - return entry.enabled ? Qt::Checked : Qt::Unchecked; + } else if (role == Qt::CheckStateRole && index.column() >= Column::Debug + && index.column() <= Column::Info) { + const LoggingCategoryEntry &entry = m_categories.at(index.row()); + return entry.isEnabled(static_cast(index.column() - Column::Debug)) + ? Qt::Checked + : Qt::Unchecked; } return {}; } @@ -172,27 +378,28 @@ bool LoggingCategoryModel::setData(const QModelIndex &index, const QVariant &val if (!index.isValid()) return false; - if (role == Qt::CheckStateRole && index.column() == 0) { - LoggingCategoryItem *item = m_categories.at(index.row()); - const Qt::CheckState current = item->entry.enabled ? Qt::Checked : Qt::Unchecked; + if (role == Qt::CheckStateRole && index.column() >= Column::Debug + && index.column() <= Column::Info) { + QtMsgType msgType = static_cast(index.column() - Column::Debug); + auto &entry = m_categories[index.row()]; + bool isEnabled = entry.isEnabled(msgType); + + const Qt::CheckState current = isEnabled ? Qt::Checked : Qt::Unchecked; + if (current != value.toInt()) { - item->entry.enabled = !item->entry.enabled; - emit categoryChanged(item->name, item->entry.enabled); + entry.setEnabled(msgType, value.toInt() == Qt::Checked); return true; } - } else if (role == Qt::DecorationRole && index.column() == 2) { - LoggingCategoryItem *item = m_categories.at(index.row()); + } else if (role == Qt::DecorationRole && index.column() == Column::Color) { + auto &category = m_categories[index.row()]; + QColor currentColor = category.color(); QColor color = value.value(); - if (color.isValid() && color != item->entry.color) { - item->entry.color = color; - emit colorChanged(item->name, color); + if (color.isValid() && color != currentColor) { + category.setColor(color); + setCategoryColor(category.name(), color); + emit dataChanged(index, index, {Qt::DisplayRole}); return true; } - } else if (role == Qt::EditRole && index.column() == 1) { - LoggingCategoryItem *item = m_categories.at(index.row()); - item->entry.level = LoggingViewManager::messageTypeFromString(value.toString()); - emit logLevelChanged(item->name, item->entry.level); - return true; } return false; @@ -203,111 +410,47 @@ Qt::ItemFlags LoggingCategoryModel::flags(const QModelIndex &index) const if (!index.isValid()) return Qt::NoItemFlags; - // ItemIsEnabled should depend on availability (Qt logging enabled?) - if (index.column() == 0) - return Qt::ItemIsUserCheckable | Qt::ItemIsEnabled | Qt::ItemIsSelectable; - if (index.column() == 1) - return Qt::ItemIsEditable | Qt::ItemIsEnabled | Qt::ItemIsSelectable; - return Qt::ItemIsEnabled | Qt::ItemIsSelectable; + if (index.column() == LoggingCategoryModel::Column::Fatal) + return Qt::NoItemFlags; + + if (index.column() == Column::Name || index.column() == Column::Color) + return Qt::ItemIsEnabled | Qt::ItemIsSelectable; + + if (m_useOriginal) + return Qt::ItemIsSelectable | Qt::ItemIsUserCheckable; + + return Qt::ItemIsEnabled | Qt::ItemIsSelectable | Qt::ItemIsUserCheckable; } QVariant LoggingCategoryModel::headerData(int section, Qt::Orientation orientation, int role) const { - if (role == Qt::DisplayRole && orientation == Qt::Horizontal && section >= 0 && section < 3) { + if (role == Qt::DisplayRole && orientation == Qt::Horizontal && section >= 0 && section < 8) { switch (section) { - case 0: return Tr::tr("Category"); - case 1: return Tr::tr("Type"); - case 2: return Tr::tr("Color"); + case Column::Name: + return Tr::tr("Category"); + case Column::Color: + return Tr::tr("Color"); + case Column::Debug: + return Tr::tr("Debug"); + case Column::Warning: + return Tr::tr("Warning"); + case Column::Critical: + return Tr::tr("Critical"); + case Column::Fatal: + return Tr::tr("Fatal"); + case Column::Info: + return Tr::tr("Info"); } } return {}; } -void LoggingCategoryModel::reset() -{ - beginResetModel(); - qDeleteAll(m_categories); - m_categories.clear(); - endResetModel(); -} - -void LoggingCategoryModel::setFromManager(LoggingViewManager *manager) -{ - beginResetModel(); - qDeleteAll(m_categories); - m_categories.clear(); - const QMap categories = manager->categories(); - auto it = categories.begin(); - for (auto end = categories.end() ; it != end; ++it) - m_categories.append(new LoggingCategoryItem{it.key(), it.value()}); - endResetModel(); -} - -QList LoggingCategoryModel::enabledCategories() const -{ - QList result; - for (auto item : m_categories) { - if (item->entry.enabled) - result.append({item->name, item->entry}); - } - return result; -} - -void LoggingCategoryModel::disableAll() -{ - for (int row = 0, end = m_categories.count(); row < end; ++row) - setData(index(row, 0), Qt::Unchecked, Qt::CheckStateRole); -} - -class LoggingLevelDelegate : public QStyledItemDelegate -{ -public: - explicit LoggingLevelDelegate(QObject *parent = nullptr) : QStyledItemDelegate(parent) {} - ~LoggingLevelDelegate() = default; - -protected: - QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, - const QModelIndex &index) const override; - void setEditorData(QWidget *editor, const QModelIndex &index) const override; - void setModelData(QWidget *editor, QAbstractItemModel *model, - const QModelIndex &index) const override; -}; - -QWidget *LoggingLevelDelegate::createEditor(QWidget *parent, const QStyleOptionViewItem &/*option*/, - const QModelIndex &index) const -{ - if (!index.isValid() || index.column() != 1) - return nullptr; - QComboBox *combo = new QComboBox(parent); - combo->addItems({ {"Critical"}, {"Warning"}, {"Debug"}, {"Info"} }); - return combo; -} - -void LoggingLevelDelegate::setEditorData(QWidget *editor, const QModelIndex &index) const -{ - QComboBox *combo = qobject_cast(editor); - if (!combo) - return; - - const int i = combo->findText(index.data().toString()); - if (i >= 0) - combo->setCurrentIndex(i); -} - -void LoggingLevelDelegate::setModelData(QWidget *editor, QAbstractItemModel *model, - const QModelIndex &index) const -{ - QComboBox *combo = qobject_cast(editor); - if (combo) - model->setData(index, combo->currentText()); -} - class LogEntry { public: QString timestamp; - QString category; QString type; + QString category; QString message; QString outputLine(bool printTimestamp, bool printType) const @@ -325,95 +468,157 @@ public: } }; +class LoggingEntryModel : public Utils::ListModel +{ +public: + ~LoggingEntryModel() { qInstallMessageHandler(m_originalMessageHandler); } + + static void logMessageHandler(QtMsgType type, + const QMessageLogContext &context, + const QString &mssg) + { + instance().msgHandler(type, context, mssg); + } + + static QVariant logEntryDataAccessor(const LogEntry &entry, int column, int role) + { + if (column >= 0 && column <= 3 && (role == Qt::DisplayRole || role == Qt::ToolTipRole)) { + switch (column) { + case 0: + return entry.timestamp; + case 1: + return entry.category; + case 2: + return entry.type; + case 3: { + if (role == Qt::ToolTipRole) + return entry.message; + return entry.message.left(1000); + } + } + } + if (role == Qt::TextAlignmentRole) + return Qt::AlignTop; + if (column == 1 && role == Qt::ForegroundRole) + return colorForCategory(entry.category); + return {}; + } + + static LoggingEntryModel &instance() + { + static LoggingEntryModel model; + return model; + } + + void setEnabled(bool enabled) { m_enabled = enabled; } + +private: + LoggingEntryModel() + { + setHeader({Tr::tr("Timestamp"), Tr::tr("Category"), Tr::tr("Type"), Tr::tr("Message")}); + setDataAccessor(&logEntryDataAccessor); + + m_originalMessageHandler = qInstallMessageHandler(logMessageHandler); + } + + void msgHandler(QtMsgType type, const QMessageLogContext &context, const QString &msg) + { + if (!m_enabled) { + m_originalMessageHandler(type, context, msg); + return; + } + + if (!context.category) { + m_originalMessageHandler(type, context, msg); + return; + } + + const QString category = QString::fromLocal8Bit(context.category); + + const QString timestamp = QDateTime::currentDateTime().toString("HH:mm:ss.zzz"); + + if (rowCount() >= 1000000) // limit log to 1000000 items + destroyItem(itemForIndex(index(0, 0))); + + appendItem(LogEntry{timestamp, messageTypeToString(type), category, msg}); + } + +private: + QtMessageHandler m_originalMessageHandler{nullptr}; + bool m_enabled{true}; +}; + class LoggingViewManagerWidget : public QDialog { public: - explicit LoggingViewManagerWidget(QWidget *parent); - ~LoggingViewManagerWidget() + ~LoggingViewManagerWidget() { LoggingEntryModel::instance().setEnabled(false); } + + static LoggingViewManagerWidget *instance() { - setEnabled(false); - delete m_manager; + static QPointer instance = new LoggingViewManagerWidget( + Core::ICore::dialogParent()); + return instance; } - static QColor colorForCategory(const QString &category); +protected: + void showEvent(QShowEvent *) override + { + if (!m_stopLog->isChecked()) + m_categoryModel->setUseOriginal(false); + + LoggingEntryModel::instance().setEnabled(!m_stopLog->isChecked()); + } + void hideEvent(QHideEvent *) override + { + m_categoryModel->setUseOriginal(true); + LoggingEntryModel::instance().setEnabled(false); + } + +private: + explicit LoggingViewManagerWidget(QWidget *parent); + private: void showLogViewContextMenu(const QPoint &pos) const; void showLogCategoryContextMenu(const QPoint &pos) const; void saveLoggingsToFile() const; - void saveEnabledCategoryPreset() const; - void loadAndUpdateFromPreset(); - LoggingViewManager *m_manager = nullptr; - void setCategoryColor(const QString &category, const QColor &color); - // should category model be owned directly by the manager? or is this duplication of - // categories in manager and widget beneficial? + QSortFilterProxyModel *m_sortFilterModel = nullptr; LoggingCategoryModel *m_categoryModel = nullptr; Utils::BaseTreeView *m_logView = nullptr; Utils::BaseTreeView *m_categoryView = nullptr; - Utils::ListModel *m_logModel = nullptr; QToolButton *m_timestamps = nullptr; QToolButton *m_messageTypes = nullptr; - static QHash m_categoryColor; + QToolButton *m_stopLog = nullptr; }; -QHash LoggingViewManagerWidget::m_categoryColor; - -static QVariant logEntryDataAccessor(const LogEntry &entry, int column, int role) -{ - if (column >= 0 && column <= 3 && (role == Qt::DisplayRole || role == Qt::ToolTipRole)) { - switch (column) { - case 0: return entry.timestamp; - case 1: return entry.category; - case 2: return entry.type; - case 3: { - if (role == Qt::ToolTipRole) - return entry.message; - return entry.message.left(1000); - } - } - } - if (role == Qt::TextAlignmentRole) - return Qt::AlignTop; - if (column == 1 && role == Qt::ForegroundRole) - return LoggingViewManagerWidget::colorForCategory(entry.category); - return {}; -} - LoggingViewManagerWidget::LoggingViewManagerWidget(QWidget *parent) : QDialog(parent) - , m_manager(new LoggingViewManager) { setWindowTitle(Tr::tr("Logging Category Viewer")); - setModal(false); - - auto mainLayout = new QVBoxLayout; - - auto buttonsLayout = new QHBoxLayout; - buttonsLayout->setSpacing(0); - // add further buttons.. auto save = new QToolButton; save->setIcon(Utils::Icons::SAVEFILE.icon()); save->setToolTip(Tr::tr("Save Log")); - buttonsLayout->addWidget(save); + auto clean = new QToolButton; clean->setIcon(Utils::Icons::CLEAN.icon()); clean->setToolTip(Tr::tr("Clear")); - buttonsLayout->addWidget(clean); - auto stop = new QToolButton; - stop->setIcon(Utils::Icons::STOP_SMALL.icon()); - stop->setToolTip(Tr::tr("Stop Logging")); - buttonsLayout->addWidget(stop); + + m_stopLog = new QToolButton; + m_stopLog->setIcon(Utils::Icons::STOP_SMALL.icon()); + m_stopLog->setToolTip(Tr::tr("Stop Logging")); + m_stopLog->setCheckable(true); + auto qtInternal = new QToolButton; qtInternal->setIcon(Core::Icons::QTLOGO.icon()); qtInternal->setToolTip(Tr::tr("Toggle Qt Internal Logging")); qtInternal->setCheckable(true); qtInternal->setChecked(false); - buttonsLayout->addWidget(qtInternal); + auto autoScroll = new QToolButton; autoScroll->setIcon(Utils::Icons::ARROW_DOWN.icon()); autoScroll->setToolTip(Tr::tr("Auto Scroll")); autoScroll->setCheckable(true); autoScroll->setChecked(true); - buttonsLayout->addWidget(autoScroll); + m_timestamps = new QToolButton; auto icon = Utils::Icon({{":/utils/images/stopwatch.png", Utils::Theme::PanelTextColorMid}}, Utils::Icon::Tint); @@ -421,7 +626,7 @@ LoggingViewManagerWidget::LoggingViewManagerWidget(QWidget *parent) m_timestamps->setToolTip(Tr::tr("Timestamps")); m_timestamps->setCheckable(true); m_timestamps->setChecked(true); - buttonsLayout->addWidget(m_timestamps); + m_messageTypes = new QToolButton; icon = Utils::Icon({{":/utils/images/message.png", Utils::Theme::PanelTextColorMid}}, Utils::Icon::Tint); @@ -429,18 +634,9 @@ LoggingViewManagerWidget::LoggingViewManagerWidget(QWidget *parent) m_messageTypes->setToolTip(Tr::tr("Message Types")); m_messageTypes->setCheckable(true); m_messageTypes->setChecked(false); - buttonsLayout->addWidget(m_messageTypes); - buttonsLayout->addSpacerItem(new QSpacerItem(10, 10, QSizePolicy::Expanding)); - mainLayout->addLayout(buttonsLayout); - - auto horizontal = new QHBoxLayout; m_logView = new Utils::BaseTreeView; - m_logModel = new Utils::ListModel; - m_logModel->setHeader({Tr::tr("Timestamp"), Tr::tr("Category"), Tr::tr("Type"), Tr::tr("Message")}); - m_logModel->setDataAccessor(&logEntryDataAccessor); - m_logView->setModel(m_logModel); - horizontal->addWidget(m_logView); + m_logView->setModel(&LoggingEntryModel::instance()); m_logView->setUniformRowHeights(true); m_logView->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded); m_logView->setFrameStyle(QFrame::Box); @@ -449,91 +645,123 @@ LoggingViewManagerWidget::LoggingViewManagerWidget(QWidget *parent) m_logView->setColumnHidden(2, true); m_logView->setContextMenuPolicy(Qt::CustomContextMenu); + m_categoryModel = new LoggingCategoryModel(this); + m_sortFilterModel = new QSortFilterProxyModel(m_categoryModel); + m_sortFilterModel->setSourceModel(m_categoryModel); + m_sortFilterModel->sort(LoggingCategoryModel::Column::Name); + m_sortFilterModel->setSortRole(Qt::DisplayRole); + m_sortFilterModel->setFilterKeyColumn(LoggingCategoryModel::Column::Name); + m_categoryView = new Utils::BaseTreeView; m_categoryView->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded); - m_categoryView->setUniformRowHeights(true); m_categoryView->setFrameStyle(QFrame::Box); m_categoryView->setAttribute(Qt::WA_MacShowFocusRect, false); m_categoryView->setSelectionMode(QAbstractItemView::SingleSelection); m_categoryView->setContextMenuPolicy(Qt::CustomContextMenu); - m_categoryModel = new LoggingCategoryModel; - m_categoryModel->setFromManager(m_manager); - auto sortFilterModel = new QSortFilterProxyModel(this); - sortFilterModel->setSourceModel(m_categoryModel); - sortFilterModel->sort(0); - m_categoryView->setModel(sortFilterModel); - m_categoryView->setItemDelegateForColumn(1, new LoggingLevelDelegate(this)); - horizontal->addWidget(m_categoryView); - horizontal->setStretch(0, 5); - horizontal->setStretch(1, 3); + m_categoryView->setModel(m_sortFilterModel); + + for (int i = LoggingCategoryModel::Column::Color; i < LoggingCategoryModel::Column::Info; i++) + m_categoryView->resizeColumnToContents(i); + + QSplitter *splitter{nullptr}; + + using namespace Layouting; + // clang-format off + Column { + Row { + spacing(0), + save, + clean, + m_stopLog, + qtInternal, + autoScroll, + m_timestamps, + m_messageTypes, + st, + }, + Splitter { + bindTo(&splitter), + m_logView, + m_categoryView, + } + }.attachTo(this); + // clang-format on + + splitter->setOrientation(Qt::Horizontal); - mainLayout->addLayout(horizontal); - setLayout(mainLayout); resize(800, 300); - connect(m_manager, &LoggingViewManager::receivedLog, - this, [this](const QString ×tamp, - const QString &type, - const QString &category, - const QString &msg) { - if (m_logModel->rowCount() >= 1000000) // limit log to 1000000 items - m_logModel->destroyItem(m_logModel->itemForIndex(m_logModel->index(0, 0))); - m_logModel->appendItem(LogEntry{timestamp, type, category, msg}); - }, Qt::QueuedConnection); - connect(m_logModel, &QAbstractItemModel::rowsInserted, this, [this, autoScroll] { + connect( + &LoggingEntryModel::instance(), + &LoggingEntryModel::rowsInserted, + this, + [this, autoScroll] { if (autoScroll->isChecked()) m_logView->scrollToBottom(); - }, Qt::QueuedConnection); - connect(m_manager, &LoggingViewManager::foundNewCategory, - m_categoryModel, &LoggingCategoryModel::append, Qt::QueuedConnection); - connect(m_manager, &LoggingViewManager::updatedCategory, - m_categoryModel, &LoggingCategoryModel::update, Qt::QueuedConnection); - connect(m_categoryModel, &LoggingCategoryModel::categoryChanged, - m_manager, &LoggingViewManager::setCategoryEnabled); - connect(m_categoryModel, &LoggingCategoryModel::colorChanged, - this, &LoggingViewManagerWidget::setCategoryColor); - connect(m_categoryModel, &LoggingCategoryModel::logLevelChanged, - m_manager, &LoggingViewManager::setLogLevel); - connect(m_categoryView, &Utils::BaseTreeView::activated, - this, [this, sortFilterModel](const QModelIndex &index) { - const QModelIndex modelIndex = sortFilterModel->mapToSource(index); - const QVariant value = m_categoryModel->data(modelIndex, Qt::DecorationRole); - if (!value.isValid()) - return; - const QColor original = value.value(); - if (!original.isValid()) - return; - QColor changed = QColorDialog::getColor(original, this); - if (!changed.isValid()) - return; - if (original != changed) - m_categoryModel->setData(modelIndex, changed, Qt::DecorationRole); - }); - connect(save, &QToolButton::clicked, - this, &LoggingViewManagerWidget::saveLoggingsToFile); - connect(m_logView, &Utils::BaseTreeView::customContextMenuRequested, - this, &LoggingViewManagerWidget::showLogViewContextMenu); - connect(m_categoryView, &Utils::BaseTreeView::customContextMenuRequested, - this, &LoggingViewManagerWidget::showLogCategoryContextMenu); - connect(clean, &QToolButton::clicked, m_logModel, &Utils::ListModel::clear); - connect(stop, &QToolButton::clicked, this, [this, stop] { - if (m_manager->isEnabled()) { - m_manager->setEnabled(false); - stop->setIcon(Utils::Icons::RUN_SMALL.icon()); - stop->setToolTip(Tr::tr("Start Logging")); + }, + Qt::QueuedConnection); + + connect(m_categoryView, + &QAbstractItemView::activated, + m_sortFilterModel, + [this](const QModelIndex &index) { + const QVariant value = m_sortFilterModel->data(index, Qt::DecorationRole); + if (!value.isValid()) + return; + const QColor original = value.value(); + if (!original.isValid()) + return; + QColor changed = QColorDialog::getColor(original, this); + if (!changed.isValid()) + return; + if (original != changed) + m_sortFilterModel->setData(index, changed, Qt::DecorationRole); + }); + connect(save, &QToolButton::clicked, this, &LoggingViewManagerWidget::saveLoggingsToFile); + connect(m_logView, + &QAbstractItemView::customContextMenuRequested, + this, + &LoggingViewManagerWidget::showLogViewContextMenu); + connect(m_categoryView, + &QAbstractItemView::customContextMenuRequested, + this, + &LoggingViewManagerWidget::showLogCategoryContextMenu); + connect(clean, + &QToolButton::clicked, + &LoggingEntryModel::instance(), + &Utils::ListModel::clear); + connect(m_stopLog, &QToolButton::toggled, this, [this](bool checked) { + LoggingEntryModel::instance().setEnabled(!checked); + + if (checked) { + m_stopLog->setIcon(Utils::Icons::RUN_SMALL.icon()); + m_stopLog->setToolTip(Tr::tr("Start Logging")); + m_categoryModel->setUseOriginal(true); } else { - m_manager->setEnabled(true); - stop->setIcon(Utils::Icons::STOP_SMALL.icon()); - stop->setToolTip(Tr::tr("Stop Logging")); + m_stopLog->setIcon(Utils::Icons::STOP_SMALL.icon()); + m_stopLog->setToolTip(Tr::tr("Stop Logging")); + m_categoryModel->setUseOriginal(false); } }); - connect(qtInternal, &QToolButton::toggled, m_manager, &LoggingViewManager::setListQtInternal); - connect(m_timestamps, &QToolButton::toggled, this, [this](bool checked){ + + m_sortFilterModel->setFilterRegularExpression("^(?!qt\\.).+"); + + connect(qtInternal, &QToolButton::toggled, m_sortFilterModel, [this](bool checked) { + if (checked) { + m_sortFilterModel->setFilterRegularExpression(""); + } else { + m_sortFilterModel->setFilterRegularExpression("^(?!qt\\.).+"); + } + }); + + connect(m_timestamps, &QToolButton::toggled, this, [this](bool checked) { m_logView->setColumnHidden(0, !checked); }); - connect(m_messageTypes, &QToolButton::toggled, this, [this](bool checked){ + connect(m_messageTypes, &QToolButton::toggled, this, [this](bool checked) { m_logView->setColumnHidden(2, !checked); }); + + ICore::registerWindow(this, Context("Qtc.LogViewer")); } void LoggingViewManagerWidget::showLogViewContextMenu(const QPoint &pos) const @@ -548,104 +776,162 @@ void LoggingViewManagerWidget::showLogViewContextMenu(const QPoint &pos) const QString copied; const bool useTS = m_timestamps->isChecked(); const bool useLL = m_messageTypes->isChecked(); - for (int row = 0, end = m_logModel->rowCount(); row < end; ++row) { + for (int row = 0, end = LoggingEntryModel::instance().rowCount(); row < end; ++row) { if (selectionModel->isRowSelected(row, QModelIndex())) - copied.append(m_logModel->dataAt(row).outputLine(useTS, useLL)); + copied.append(LoggingEntryModel::instance().dataAt(row).outputLine(useTS, useLL)); } - QGuiApplication::clipboard()->setText(copied); + Utils::setClipboardAndSelection(copied); }); connect(copyAll, &QAction::triggered, &m, [this] { QString copied; const bool useTS = m_timestamps->isChecked(); const bool useLL = m_messageTypes->isChecked(); - for (int row = 0, end = m_logModel->rowCount(); row < end; ++row) - copied.append(m_logModel->dataAt(row).outputLine(useTS, useLL)); + for (int row = 0, end = LoggingEntryModel::instance().rowCount(); row < end; ++row) + copied.append(LoggingEntryModel::instance().dataAt(row).outputLine(useTS, useLL)); - QGuiApplication::clipboard()->setText(copied); + Utils::setClipboardAndSelection(copied); }); m.exec(m_logView->mapToGlobal(pos)); } void LoggingViewManagerWidget::showLogCategoryContextMenu(const QPoint &pos) const { + QModelIndex idx = m_categoryView->indexAt(pos); + QMenu m; + auto uncheckAll = new QAction(Tr::tr("Uncheck All"), &m); + + int column = 0; + + if (idx.isValid()) { + column = idx.column(); + if (column >= LoggingCategoryModel::Column::Debug + && column <= LoggingCategoryModel::Column::Info) { + bool isChecked = idx.data(Qt::CheckStateRole).toBool(); + + QString text = isChecked ? Tr::tr("Uncheck All %1") : Tr::tr("Check All %1"); + + uncheckAll->setText(text.arg(messageTypeToString( + static_cast(column - LoggingCategoryModel::Column::Debug)))); + + connect(uncheckAll, &QAction::triggered, m_sortFilterModel, [this, idx, isChecked] { + for (int i = 0; i < m_sortFilterModel->rowCount(); ++i) { + m_sortFilterModel->setData(m_sortFilterModel->index(i, idx.column()), + !isChecked, + Qt::CheckStateRole); + } + }); + } else { + connect(uncheckAll, &QAction::triggered, m_sortFilterModel, [this] { + for (int i = 0; i < m_sortFilterModel->rowCount(); ++i) { + for (int c = LoggingCategoryModel::Column::Debug; + c <= LoggingCategoryModel::Column::Info; + ++c) { + m_sortFilterModel->setData(m_sortFilterModel->index(i, c), + false, + Qt::CheckStateRole); + } + } + }); + } + } + // minimal load/save - plugins could later provide presets on their own? auto savePreset = new QAction(Tr::tr("Save Enabled as Preset..."), &m); m.addAction(savePreset); auto loadPreset = new QAction(Tr::tr("Update from Preset..."), &m); m.addAction(loadPreset); - auto uncheckAll = new QAction(Tr::tr("Uncheck All"), &m); m.addAction(uncheckAll); - connect(savePreset, &QAction::triggered, - this, &LoggingViewManagerWidget::saveEnabledCategoryPreset); - connect(loadPreset, &QAction::triggered, - this, &LoggingViewManagerWidget::loadAndUpdateFromPreset); - connect(uncheckAll, &QAction::triggered, - m_categoryModel, &LoggingCategoryModel::disableAll); + connect(savePreset, + &QAction::triggered, + m_categoryModel, + &LoggingCategoryModel::saveEnabledCategoryPreset); + connect(loadPreset, + &QAction::triggered, + m_categoryModel, + &LoggingCategoryModel::loadAndUpdateFromPreset); m.exec(m_categoryView->mapToGlobal(pos)); } void LoggingViewManagerWidget::saveLoggingsToFile() const { - // should we just let it continue without temporarily disabling? - const bool enabled = m_manager->isEnabled(); - const QScopeGuard cleanup([this, enabled] { m_manager->setEnabled(enabled); }); - if (enabled) - m_manager->setEnabled(false); const Utils::FilePath fp = Utils::FileUtils::getSaveFilePath(ICore::dialogParent(), - Tr::tr("Save Logs As")); + Tr::tr("Save Logs As"), + {}, + "*.log"); if (fp.isEmpty()) return; + const bool useTS = m_timestamps->isChecked(); const bool useLL = m_messageTypes->isChecked(); QFile file(fp.path()); if (file.open(QIODevice::WriteOnly)) { - for (int row = 0, end = m_logModel->rowCount(); row < end; ++row) { - qint64 res = file.write( m_logModel->dataAt(row).outputLine(useTS, useLL).toUtf8()); + for (int row = 0, end = LoggingEntryModel::instance().rowCount(); row < end; ++row) { + qint64 res = file.write( + LoggingEntryModel::instance().dataAt(row).outputLine(useTS, useLL).toUtf8()); if (res == -1) { - QMessageBox::critical( - ICore::dialogParent(), Tr::tr("Error"), - Tr::tr("Failed to write logs to \"%1\".").arg(fp.toUserOutput())); + QMessageBox::critical(ICore::dialogParent(), + Tr::tr("Error"), + Tr::tr("Failed to write logs to \"%1\".") + .arg(fp.toUserOutput())); break; } } file.close(); } else { - QMessageBox::critical( - ICore::dialogParent(), Tr::tr("Error"), - Tr::tr("Failed to open file \"%1\" for writing logs.").arg(fp.toUserOutput())); + QMessageBox::critical(ICore::dialogParent(), + Tr::tr("Error"), + Tr::tr("Failed to open file \"%1\" for writing logs.") + .arg(fp.toUserOutput())); } } -void LoggingViewManagerWidget::saveEnabledCategoryPreset() const +void LoggingCategoryModel::saveEnabledCategoryPreset() const { Utils::FilePath fp = Utils::FileUtils::getSaveFilePath(ICore::dialogParent(), - Tr::tr("Save Enabled Categories As...")); + Tr::tr("Save Enabled Categories As..."), + {}, + "*.json"); if (fp.isEmpty()) return; - const QList enabled = m_categoryModel->enabledCategories(); - // write them to file + + auto minLevel = [](const LoggingCategoryEntry &logCategory) { + for (int i = QtDebugMsg; i <= QtInfoMsg; i++) { + if (logCategory.isEnabled(static_cast(i))) + return i; + } + return QtInfoMsg + 1; + }; + QJsonArray array; - for (const LoggingCategoryItem &item : enabled) { + + for (auto item : m_categories) { QJsonObject itemObj; - itemObj.insert("name", item.name); + itemObj.insert("name", item.name()); QJsonObject entryObj; - entryObj.insert("level", item.entry.level); - if (item.entry.color.isValid()) - entryObj.insert("color", item.entry.color.name(QColor::HexArgb)); + entryObj.insert("level", minLevel(item)); + if (item.color().isValid()) + entryObj.insert("color", item.color().name(QColor::HexArgb)); + + QVariantMap levels = {{"Debug", item.isDebugEnabled()}, + {"Warning", item.isWarningEnabled()}, + {"Critical", item.isCriticalEnabled()}, + {"Info", item.isInfoEnabled()}}; + entryObj.insert("levels", QJsonValue::fromVariant(levels)); + itemObj.insert("entry", entryObj); array.append(itemObj); } QJsonDocument doc(array); if (!fp.writeFileContents(doc.toJson(QJsonDocument::Compact))) - QMessageBox::critical( - ICore::dialogParent(), Tr::tr("Error"), - Tr::tr("Failed to write preset file \"%1\".").arg(fp.toUserOutput())); + QMessageBox::critical(ICore::dialogParent(), + Tr::tr("Error"), + Tr::tr("Failed to write preset file \"%1\".").arg(fp.toUserOutput())); } -void LoggingViewManagerWidget::loadAndUpdateFromPreset() +void LoggingCategoryModel::loadAndUpdateFromPreset() { Utils::FilePath fp = Utils::FileUtils::getOpenFilePath(ICore::dialogParent(), Tr::tr("Load Enabled Categories From")); @@ -663,13 +949,15 @@ void LoggingViewManagerWidget::loadAndUpdateFromPreset() QJsonParseError error; QJsonDocument doc = QJsonDocument::fromJson(*contents, &error); if (error.error != QJsonParseError::NoError) { - QMessageBox::critical(ICore::dialogParent(), Tr::tr("Error"), - Tr::tr("Failed to read preset file \"%1\": %2").arg(fp.toUserOutput()) - .arg(error.errorString())); + QMessageBox::critical(ICore::dialogParent(), + Tr::tr("Error"), + Tr::tr("Failed to read preset file \"%1\": %2") + .arg(fp.toUserOutput()) + .arg(error.errorString())); return; } bool formatError = false; - QList presetItems; + QList presetItems; if (doc.isArray()) { const QJsonArray array = doc.array(); for (const QJsonValue &value : array) { @@ -678,57 +966,81 @@ void LoggingViewManagerWidget::loadAndUpdateFromPreset() break; } const QJsonObject itemObj = value.toObject(); - bool ok = true; - LoggingCategoryItem item = LoggingCategoryItem::fromJson(itemObj, &ok); - if (!ok) { + Utils::expected_str item = SavedEntry::fromJson(itemObj); + if (!item) { formatError = true; break; } - presetItems.append(item); + presetItems.append(*item); } } else { formatError = true; } if (formatError) { - QMessageBox::critical(ICore::dialogParent(), Tr::tr("Error"), + QMessageBox::critical(ICore::dialogParent(), + Tr::tr("Error"), Tr::tr("Unexpected preset file format.")); } - for (const LoggingCategoryItem &item : presetItems) - m_manager->appendOrUpdate(item.name, item.entry); + + int idx = 0; + + for (auto it = presetItems.begin(); it != presetItems.end(); ++it, ++idx) { + QList::iterator itExisting + = std::find_if(m_categories.begin(), + m_categories.end(), + [e = *it](const LoggingCategoryEntry &cat) { + return cat.name() == e.name; + }); + + if (it->color.isValid()) + setCategoryColor(it->name, it->color); + + if (itExisting != m_categories.end()) { + itExisting->setSaved(*it); + emit dataChanged(createIndex(idx, Column::Color), createIndex(idx, Column::Info)); + } else { + LoggingCategoryEntry newEntry(*it); + append(newEntry); + } + } } -QColor LoggingViewManagerWidget::colorForCategory(const QString &category) +QColor colorForCategory(const QString &category) { - auto entry = m_categoryColor.find(category); - if (entry == m_categoryColor.end()) + auto entry = s_categoryColor.find(category); + if (entry == s_categoryColor.end()) return Utils::creatorTheme()->palette().text().color(); return entry.value(); } -void LoggingViewManagerWidget::setCategoryColor(const QString &category, const QColor &color) +void setCategoryColor(const QString &category, const QColor &color) { const QColor baseColor = Utils::creatorTheme()->palette().text().color(); if (color != baseColor) - m_categoryColor.insert(category, color); + s_categoryColor.insert(category, color); else - m_categoryColor.remove(category); + s_categoryColor.remove(category); } void LoggingViewer::showLoggingView() { - ActionManager::command(Constants::LOGGER)->action()->setEnabled(false); - auto widget = new LoggingViewManagerWidget(ICore::dialogParent()); - QObject::connect(widget, &QDialog::finished, widget, [widget] { - ActionManager::command(Constants::LOGGER)->action()->setEnabled(true); - // explicitly disable manager again - widget->deleteLater(); - }); - ICore::registerWindow(widget, Context("Qtc.LogViewer")); - widget->show(); + LoggingViewManagerWidget *staticLogWidget = LoggingViewManagerWidget::instance(); + QTC_ASSERT(staticLogWidget, return); + + staticLogWidget->show(); + staticLogWidget->raise(); + staticLogWidget->activateWindow(); } -} // namespace Internal -} // namespace Core +void LoggingViewer::hideLoggingView() +{ + LoggingViewManagerWidget *staticLogWidget = LoggingViewManagerWidget::instance(); + QTC_ASSERT(staticLogWidget, return); + staticLogWidget->close(); + delete staticLogWidget; +} + +} // namespace Core::Internal #include "loggingviewer.moc" diff --git a/src/plugins/coreplugin/loggingviewer.h b/src/plugins/coreplugin/loggingviewer.h index cb8bf031ca4..4cde2a6501f 100644 --- a/src/plugins/coreplugin/loggingviewer.h +++ b/src/plugins/coreplugin/loggingviewer.h @@ -3,14 +3,13 @@ #pragma once -namespace Core { -namespace Internal { +namespace Core::Internal { class LoggingViewer { public: static void showLoggingView(); + static void hideLoggingView(); }; -} // Internal -} // Core +} // namespace Core::Internal diff --git a/src/plugins/coreplugin/patchtool.cpp b/src/plugins/coreplugin/patchtool.cpp index 89144f7a27d..c17db9ba927 100644 --- a/src/plugins/coreplugin/patchtool.cpp +++ b/src/plugins/coreplugin/patchtool.cpp @@ -97,8 +97,8 @@ static bool runPatchHelper(const QByteArray &input, const FilePath &workingDirec if (!patchProcess.readDataFromProcess(&stdOut, &stdErr)) { patchProcess.stop(); patchProcess.waitForFinished(); - MessageManager::writeFlashing(Tr::tr("A timeout occurred running \"%1\"") - .arg(patch.toUserOutput())); + MessageManager::writeFlashing( + Tr::tr("A timeout occurred running \"%1\".").arg(patch.toUserOutput())); return false; } diff --git a/src/plugins/coreplugin/plugininstallwizard.cpp b/src/plugins/coreplugin/plugininstallwizard.cpp index 85f2f3effef..9a0b92c871e 100644 --- a/src/plugins/coreplugin/plugininstallwizard.cpp +++ b/src/plugins/coreplugin/plugininstallwizard.cpp @@ -58,7 +58,7 @@ static QStringList libraryNameFilter() static bool hasLibSuffix(const FilePath &path) { return (HostOsInfo::isWindowsHost() && path.endsWith(".dll")) - || (HostOsInfo::isLinuxHost() && path.completeSuffix().startsWith(".so")) + || (HostOsInfo::isLinuxHost() && path.completeSuffix().startsWith("so")) || (HostOsInfo::isMacHost() && path.endsWith(".dylib")); } diff --git a/src/plugins/coreplugin/systemsettings.cpp b/src/plugins/coreplugin/systemsettings.cpp index aef7055c975..1477fcf747d 100644 --- a/src/plugins/coreplugin/systemsettings.cpp +++ b/src/plugins/coreplugin/systemsettings.cpp @@ -143,7 +143,7 @@ SystemSettings::SystemSettings() #ifdef ENABLE_CRASHPAD enableCrashReporting.setSettingsKey("CrashReportingEnabled"); enableCrashReporting.setLabelPlacement(BoolAspect::LabelPlacement::Compact); - enableCrashReporting.setLabelText(tr("Enable crash reporting")); + enableCrashReporting.setLabelText(Tr::tr("Enable crash reporting")); enableCrashReporting.setToolTip( Tr::tr("Allow crashes to be automatically reported. Collected reports are " "used for the sole purpose of fixing bugs.")); diff --git a/src/plugins/coreplugin/vcsmanager.cpp b/src/plugins/coreplugin/vcsmanager.cpp index ce4138721fc..4e04a687d80 100644 --- a/src/plugins/coreplugin/vcsmanager.cpp +++ b/src/plugins/coreplugin/vcsmanager.cpp @@ -333,8 +333,9 @@ FilePaths VcsManager::promptToDelete(IVersionControl *vc, const FilePaths &fileP return fp.toUserOutput(); }).join("
  • ") + "
  • "; const QString title = Tr::tr("Version Control"); - const QString msg = Tr::tr("Remove the following files from the version control system (%2)? " - "%1Note: This might remove the local file.").arg(fileListForUi, vc->displayName()); + const QString msg = Tr::tr("Remove the following files from the version control system (%1)?") + .arg(vc->displayName()) + + fileListForUi + Tr::tr("Note: This might remove the local file."); const QMessageBox::StandardButton button = QMessageBox::question(ICore::dialogParent(), title, msg, QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes); if (button != QMessageBox::Yes) diff --git a/src/plugins/cppeditor/compileroptionsbuilder.cpp b/src/plugins/cppeditor/compileroptionsbuilder.cpp index 8376f7d1acc..12403bd1533 100644 --- a/src/plugins/cppeditor/compileroptionsbuilder.cpp +++ b/src/plugins/cppeditor/compileroptionsbuilder.cpp @@ -900,6 +900,10 @@ void CompilerOptionsBuilder::evaluateCompilerFlags() continue; } + // GCC option that clang doesn't know. + if (option.contains("direct-extern-access")) + continue; + // These were already parsed into ProjectPart::includedFiles. if (option == includeFileOptionCl || option == includeFileOptionGcc) { skipNext = true; diff --git a/src/plugins/cppeditor/cppcodemodelsettingspage.cpp b/src/plugins/cppeditor/cppcodemodelsettingspage.cpp index a2639f380b3..2c46504f17f 100644 --- a/src/plugins/cppeditor/cppcodemodelsettingspage.cpp +++ b/src/plugins/cppeditor/cppcodemodelsettingspage.cpp @@ -24,14 +24,15 @@ #include #include #include +#include #include #include #include #include +#include #include #include #include -#include #include @@ -222,21 +223,21 @@ ClangdSettingsWidget::ClangdSettingsWidget(const ClangdSettings::Data &settingsD "

    Background Priority: Minimum priority, runs on idle CPUs. May leave 'performance' " "cores unused.

    " "

    Normal Priority: Reduced priority compared to interactive work.

    " - "Low Priority: Same priority as other clangd work."); + "

    Low Priority: Same priority as other clangd work.

    "); const QString headerSourceSwitchToolTip = Tr::tr( - "

    Which C/C++ backend to use when switching between header and source file." - "

    The clangd implementation has more capabilities, but also has some bugs not present " - "in the built-in variant." - "

    When \"Try Both\" is selected, clangd will be employed only if the built-in variant " - "does not find anything."); + "

    The C/C++ backend to use for switching between header and source files.

    " + "

    While the clangd implementation has more capabilities than the built-in " + "code model, it tends to find false positives.

    " + "

    When \"Try Both\" is selected, clangd is used only if the built-in variant " + "does not find anything.

    "); using RankingModel = ClangdSettings::CompletionRankingModel; const QString completionRankingModelToolTip = Tr::tr( - "

    Which model clangd should use to rank possible completions." - "

    This determines the order of candidates in the combo box when doing code completion." + "

    Which model clangd should use to rank possible completions.

    " + "

    This determines the order of candidates in the combo box when doing code completion.

    " "

    The \"%1\" model used by default results from (pre-trained) machine learning and " - "provides superior results on average." + "provides superior results on average.

    " "

    If you feel that its suggestions stray too much from your expectations for your " - "code base, you can try switching to the hand-crafted \"%2\" model.").arg( + "code base, you can try switching to the hand-crafted \"%2\" model.

    ").arg( ClangdSettings::rankingModelToDisplayString(RankingModel::DecisionForest), ClangdSettings::rankingModelToDisplayString(RankingModel::Heuristics)); const QString workerThreadsToolTip = Tr::tr( @@ -244,10 +245,12 @@ ClangdSettingsWidget::ClangdSettingsWidget(const ClangdSettings::Data &settingsD "worker threads."); const QString autoIncludeToolTip = Tr::tr( "Controls whether clangd may insert header files as part of symbol completion."); - const QString documentUpdateToolTip = Tr::tr( - "Defines the amount of time Qt Creator waits before sending document changes to the " - "server.\n" - "If the document changes again while waiting, this timeout resets."); + const QString documentUpdateToolTip + //: %1 is the application name (Qt Creator) + = Tr::tr("Defines the amount of time %1 waits before sending document changes to the " + "server.\n" + "If the document changes again while waiting, this timeout resets.") + .arg(QGuiApplication::applicationDisplayName()); const QString sizeThresholdToolTip = Tr::tr( "Files greater than this will not be opened as documents in clangd.\n" "The built-in code model will handle highlighting, completion and so on."); diff --git a/src/plugins/cppeditor/cppmodelmanager.cpp b/src/plugins/cppeditor/cppmodelmanager.cpp index 2deaea4290c..e72c630cbf7 100644 --- a/src/plugins/cppeditor/cppmodelmanager.cpp +++ b/src/plugins/cppeditor/cppmodelmanager.cpp @@ -568,9 +568,10 @@ static void checkNextFunctionForUnused( return; const int newProgress = findRefsFuture->progressValue() + 1; findRefsFuture->setProgressValueAndText(newProgress, - Tr::tr("Checked %1 of %n function(s)") - .arg(newProgress) - .arg(findRefsFuture->progressMaximum())); + Tr::tr("Checked %1 of %n function(s)", + nullptr, + findRefsFuture->progressMaximum()) + .arg(newProgress)); QVariantMap data = search->userData().toMap(); QVariant &activeLinks = data["active"]; QVariantList activeLinksList = activeLinks.toList(); diff --git a/src/plugins/cppeditor/cppquickfixes.cpp b/src/plugins/cppeditor/cppquickfixes.cpp index c4f32dc1e31..d3d244b81c0 100644 --- a/src/plugins/cppeditor/cppquickfixes.cpp +++ b/src/plugins/cppeditor/cppquickfixes.cpp @@ -9408,8 +9408,8 @@ public: m_wasCxxStyle(m_kind == T_CPP_COMMENT || m_kind == T_CPP_DOXY_COMMENT), m_isDoxygen(m_kind == T_DOXY_COMMENT || m_kind == T_CPP_DOXY_COMMENT) { - setDescription(m_wasCxxStyle ? Tr::tr("Convert comment to C style") - : Tr::tr("Convert comment to C++ style")); + setDescription(m_wasCxxStyle ? Tr::tr("Convert Comment to C-Style") + : Tr::tr("Convert Comment to C++-Style")); } private: @@ -9631,8 +9631,8 @@ public: : CppQuickFixOperation(interface), m_symbol(symbol), m_commentTokens(commentTokens) { setDescription(direction == Direction::ToDecl - ? Tr::tr("Move function documentation to declaration") - : Tr::tr("Move function documentation to definition")); + ? Tr::tr("Move Function Documentation to Declaration") + : Tr::tr("Move Function Documentation to Definition")); } private: diff --git a/src/plugins/cppeditor/cppvirtualfunctionassistprovider.cpp b/src/plugins/cppeditor/cppvirtualfunctionassistprovider.cpp index 19fc0890257..34aa3d6fd07 100644 --- a/src/plugins/cppeditor/cppvirtualfunctionassistprovider.cpp +++ b/src/plugins/cppeditor/cppvirtualfunctionassistprovider.cpp @@ -94,7 +94,7 @@ public: QTC_ASSERT(m_params.function, return nullptr); auto *hintItem = new VirtualFunctionProposalItem(Utils::Link()); - hintItem->setText(Tr::tr("collecting overrides ...")); + hintItem->setText(Tr::tr("collecting overrides...")); hintItem->setOrder(-1000); QList items; diff --git a/src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp b/src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp index feac4e70fa7..21664ea1402 100644 --- a/src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp +++ b/src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp @@ -449,7 +449,7 @@ F2TestCase::F2TestCase(CppEditorAction action, first.text = ""; expectedImmediate << first; } - expectedImmediate << OverrideItem(QLatin1String("collecting overrides ...")); + expectedImmediate << OverrideItem(QLatin1String("collecting overrides...")); } QCOMPARE(immediateVirtualSymbolResults, expectedImmediate); if (useClangd) { diff --git a/src/plugins/debugger/dap/pydapengine.cpp b/src/plugins/debugger/dap/pydapengine.cpp index 2257aab76ad..4bbb479126f 100644 --- a/src/plugins/debugger/dap/pydapengine.cpp +++ b/src/plugins/debugger/dap/pydapengine.cpp @@ -253,7 +253,7 @@ void PyDapEngine::setupEngine() Utils::InfoBarEntry info(installDebugPyInfoBarId, Tr::tr( - "Python Debugging Support is not available. Please install debugpy package."), + "Python debugging support is not available. Install the debugpy package."), Utils::InfoBarEntry::GlobalSuppression::Enabled); info.addCustomButton(Tr::tr("Install debugpy"), [this] { Core::ICore::infoBar()->removeInfo(installDebugPyInfoBarId); diff --git a/src/plugins/debugger/lldb/lldbengine.cpp b/src/plugins/debugger/lldb/lldbengine.cpp index 9d1717fff54..12da7a86fc4 100644 --- a/src/plugins/debugger/lldb/lldbengine.cpp +++ b/src/plugins/debugger/lldb/lldbengine.cpp @@ -1030,8 +1030,8 @@ void LldbEngine::fetchDisassembler(DisassemblerAgent *agent) void LldbEngine::fetchFullBacktrace() { DebuggerCommand cmd("fetchFullBacktrace"); - cmd.callback = [](const DebuggerResponse &response) { - Internal::openTextEditor("Backtrace $", fromHex(response.data.data())); + cmd.callback = [](const DebuggerResponse &response) { + Internal::openTextEditor("Backtrace $", fromHex(response.data["fulltrace"].data())); }; runCommand(cmd); } diff --git a/src/plugins/docker/dockerdevice.cpp b/src/plugins/docker/dockerdevice.cpp index 17a2e64165c..7dc014eadaf 100644 --- a/src/plugins/docker/dockerdevice.cpp +++ b/src/plugins/docker/dockerdevice.cpp @@ -187,7 +187,7 @@ DockerDeviceSettings::DockerDeviceSettings() mounts.setLabelText(Tr::tr("Paths to mount:")); mounts.setDefaultValue({Core::DocumentManager::projectsDirectory().toString()}); mounts.setToolTip(Tr::tr("Maps paths in this list one-to-one to the docker container.")); - mounts.setPlaceHolderText(Tr::tr("Host directories to mount into the container")); + mounts.setPlaceHolderText(Tr::tr("Host directories to mount into the container.")); extraArgs.setSettingsKey(DockerDeviceExtraArgs); extraArgs.setLabelText(Tr::tr("Extra arguments:")); @@ -220,7 +220,7 @@ DockerDeviceSettings::DockerDeviceSettings() }); cb(items); } else { - QStandardItem *errorItem = new QStandardItem(Tr::tr("Error!")); + QStandardItem *errorItem = new QStandardItem(Tr::tr("Error")); errorItem->setToolTip(result.error()); cb({errorItem}); } @@ -247,7 +247,7 @@ DockerDeviceSettings::DockerDeviceSettings() path = onDevicePath; } else { return make_unexpected( - Tr::tr("Path \"%1\" does not exist.").arg(onDevicePath.toUserOutput())); + Tr::tr("The path \"%1\" does not exist.").arg(onDevicePath.toUserOutput())); } } QString error; @@ -766,32 +766,32 @@ QStringList toMountArg(const DockerDevicePrivate::TemporaryMountInfo &mi) expected_str isValidMountInfo(const DockerDevicePrivate::TemporaryMountInfo &mi) { if (mi.path.needsDevice()) - return make_unexpected(QString("Path \"%1\" is not local").arg(mi.path.toUserOutput())); + return make_unexpected(QString("The path \"%1\" is not local.").arg(mi.path.toUserOutput())); if (mi.path.isEmpty() && mi.containerPath.isEmpty()) - return make_unexpected(QString("Both paths are empty")); + return make_unexpected(QString("Both paths are empty.")); if (mi.path.isEmpty()) { - return make_unexpected(QString("Local path is empty, container path is \"%1\"") + return make_unexpected(QString("The local path is empty, the container path is \"%1\".") .arg(mi.containerPath.toUserOutput())); } if (mi.containerPath.isEmpty()) { return make_unexpected( - QString("Container path is empty, local path is \"%1\"").arg(mi.path.toUserOutput())); + QString("The container path is empty, the local path is \"%1\".").arg(mi.path.toUserOutput())); } if (!mi.path.isAbsolutePath() || !mi.containerPath.isAbsolutePath()) { - return make_unexpected(QString("Path \"%1\" or \"%2\" is not absolute") + return make_unexpected(QString("The path \"%1\" or \"%2\" is not absolute.") .arg(mi.path.toUserOutput()) .arg(mi.containerPath.toUserOutput())); } if (mi.containerPath.isRootPath()) - return make_unexpected(QString("Path \"%1\" is root").arg(mi.containerPath.toUserOutput())); + return make_unexpected(QString("The path \"%1\" is root.").arg(mi.containerPath.toUserOutput())); if (!mi.path.exists()) - return make_unexpected(QString("Path \"%1\" does not exist").arg(mi.path.toUserOutput())); + return make_unexpected(QString("The path \"%1\" does not exist.").arg(mi.path.toUserOutput())); return {}; } @@ -913,10 +913,12 @@ expected_str DockerDevicePrivate::startContainer() qCWarning(dockerDeviceLog) << "Container shell encountered error:" << resultData.m_error; DockerApi::recheckDockerDaemon(); + //: %1 is the application name (Qt Creator) MessageManager::writeFlashing(Tr::tr("Docker daemon appears to be not running. " "Verify daemon is up and running and reset the " "Docker daemon in Docker device preferences " - "or restart Qt Creator.")); + "or restart %1.") + .arg(QGuiApplication::applicationDisplayName())); }); QTC_ASSERT(m_shell, @@ -939,7 +941,7 @@ expected_str DockerDevicePrivate::updateContainerAccess() } if (m_isShutdown) - return make_unexpected(Tr::tr("Device is shutdown")); + return make_unexpected(Tr::tr("Device is shut down")); if (DockerApi::isDockerDaemonAvailable(false).value_or(false) == false) return make_unexpected(Tr::tr("Docker system is not reachable")); @@ -1201,7 +1203,7 @@ public: CommandLine cmd{settings().dockerBinaryPath(), {"images", "--format", "{{.ID}}\\t{{.Repository}}\\t{{.Tag}}\\t{{.Size}}"}}; - m_log->append(Tr::tr("Running \"%1\"\n").arg(cmd.toUserOutput())); + m_log->append(Tr::tr("Running \"%1\"").arg(cmd.toUserOutput()) + "\n"); m_process = new Process(this); m_process->setCommand(cmd); diff --git a/src/plugins/docker/dockerdevicewidget.cpp b/src/plugins/docker/dockerdevicewidget.cpp index 01d80106b68..0e269ee3972 100644 --- a/src/plugins/docker/dockerdevicewidget.cpp +++ b/src/plugins/docker/dockerdevicewidget.cpp @@ -173,7 +173,7 @@ DockerDeviceWidget::DockerDeviceWidget(const IDevice::Ptr &device) deviceSettings->tag, br, deviceSettings->imageId, br, daemonStateLabel, m_daemonReset, m_daemonState, br, - Tr::tr("Container State:"), deviceSettings->containerStatus, br, + Tr::tr("Container state:"), deviceSettings->containerStatus, br, deviceSettings->useLocalUidGid, br, deviceSettings->keepEntryPoint, br, deviceSettings->enableLldbFlags, br, @@ -187,7 +187,7 @@ DockerDeviceWidget::DockerDeviceWidget(const IDevice::Ptr &device) If { dockerDevice->isAutoDetected(), {}, {detectionControls} }, noMargin, },br, - Tr::tr("Command Line:"), createLineLabel, br, + Tr::tr("Command line:"), createLineLabel, br, }.attachTo(this); // clang-format on diff --git a/src/plugins/git/gitplugin.cpp b/src/plugins/git/gitplugin.cpp index 693b12cc028..3f8c55b18d4 100644 --- a/src/plugins/git/gitplugin.cpp +++ b/src/plugins/git/gitplugin.cpp @@ -10,6 +10,7 @@ #include "gitconstants.h" #include "giteditor.h" #include "gitgrep.h" +#include "gitsettings.h" #include "gitsubmiteditor.h" #include "gittr.h" #include "gitutils.h" @@ -247,8 +248,14 @@ public: if (settings().instantBlameIgnoreSpaceChanges() || settings().instantBlameIgnoreLineMoves()) { - result.append(Tr::tr("

    Note: Ignore whitespace changes or line moves" - " is enabled in the instant blame settings.

    ")); + result.append( + "

    " + //: %1 and %2 are the "ignore whitespace changes" and "ignore line moves" options + + Tr::tr("Note: \"%1\" or \"%2\"" + " is enabled in the instant blame settings.") + .arg(GitSettings::trIgnoreWhitespaceChanges(), + GitSettings::trIgnoreLineMoves()) + + "

    "); } return result; } diff --git a/src/plugins/git/gitsettings.cpp b/src/plugins/git/gitsettings.cpp index 79d85566986..cb23f55c9a8 100644 --- a/src/plugins/git/gitsettings.cpp +++ b/src/plugins/git/gitsettings.cpp @@ -91,14 +91,12 @@ GitSettings::GitSettings() Tr::tr("Annotate the current line in the editor with Git \"blame\" output.")); instantBlameIgnoreSpaceChanges.setSettingsKey("GitInstantIgnoreSpaceChanges"); instantBlameIgnoreSpaceChanges.setDefaultValue(false); - instantBlameIgnoreSpaceChanges.setLabelText( - Tr::tr("Ignore whitespace changes")); + instantBlameIgnoreSpaceChanges.setLabelText(trIgnoreWhitespaceChanges()); instantBlameIgnoreSpaceChanges.setToolTip( Tr::tr("Finds the commit that introduced the last real code changes to the line.")); instantBlameIgnoreLineMoves.setSettingsKey("GitInstantIgnoreLineMoves"); instantBlameIgnoreLineMoves.setDefaultValue(false); - instantBlameIgnoreLineMoves.setLabelText( - Tr::tr("Ignore line moves")); + instantBlameIgnoreLineMoves.setLabelText(trIgnoreLineMoves()); instantBlameIgnoreLineMoves.setToolTip( Tr::tr("Finds the commit that introduced the line before it was moved.")); @@ -187,6 +185,16 @@ FilePath GitSettings::gitExecutable(bool *ok, QString *errorMessage) const return resolvedBinPath; } +QString GitSettings::trIgnoreWhitespaceChanges() +{ + return Tr::tr("Ignore whitespace changes"); +} + +QString GitSettings::trIgnoreLineMoves() +{ + return Tr::tr("Ignore line moves"); +} + // GitSettingsPage class GitSettingsPage final : public Core::IOptionsPage diff --git a/src/plugins/git/gitsettings.h b/src/plugins/git/gitsettings.h index f5a83c5e8a9..f6ec650c2e8 100644 --- a/src/plugins/git/gitsettings.h +++ b/src/plugins/git/gitsettings.h @@ -45,6 +45,9 @@ public: mutable bool tryResolve = true; Utils::FilePath gitExecutable(bool *ok = nullptr, QString *errorMessage = nullptr) const; + + static QString trIgnoreWhitespaceChanges(); + static QString trIgnoreLineMoves(); }; GitSettings &settings(); diff --git a/src/plugins/help/helpwidget.cpp b/src/plugins/help/helpwidget.cpp index a2d9eca985a..c79bb052eb5 100644 --- a/src/plugins/help/helpwidget.cpp +++ b/src/plugins/help/helpwidget.cpp @@ -229,11 +229,14 @@ HelpWidget::HelpWidget(const Core::Context &context, WidgetStyle style, QWidget m_toggleSideBarAction->setChecked(false); cmd = Core::ActionManager::registerAction(m_toggleSideBarAction, Core::Constants::TOGGLE_LEFT_SIDEBAR, context); - connect(m_toggleSideBarAction, &QAction::toggled, m_toggleSideBarAction, [this](bool checked) { - m_toggleSideBarAction->setText(::Core::Tr::tr( - checked ? Core::Constants::TR_HIDE_LEFT_SIDEBAR - : Core::Constants::TR_SHOW_LEFT_SIDEBAR)); - }); + connect(m_toggleSideBarAction, + &QAction::toggled, + m_toggleSideBarAction, + [this](bool checked) { + m_toggleSideBarAction->setToolTip( + ::Core::Tr::tr(checked ? Core::Constants::TR_HIDE_LEFT_SIDEBAR + : Core::Constants::TR_SHOW_LEFT_SIDEBAR)); + }); addSideBar(); m_toggleSideBarAction->setChecked(m_sideBar->isVisibleTo(this)); connect(m_toggleSideBarAction, &QAction::triggered, m_sideBar, &Core::SideBar::setVisible); @@ -692,6 +695,8 @@ HelpViewer *HelpWidget::insertViewer(int index, const QUrl &url) if (currentViewer() == viewer) { m_addBookmarkAction->setEnabled(isBookmarkable(url)); m_openOnlineDocumentationAction->setEnabled(LocalHelpManager::canOpenOnlineHelp(url)); + if (m_switchToHelp) + m_switchToHelp->setEnabled(url != QUrl("about:blank")); } }); connect(viewer, &HelpViewer::forwardAvailable, this, [viewer, this](bool available) { diff --git a/src/plugins/ios/iosconfigurations.cpp b/src/plugins/ios/iosconfigurations.cpp index 04ab69b8a25..105ba236eaa 100644 --- a/src/plugins/ios/iosconfigurations.cpp +++ b/src/plugins/ios/iosconfigurations.cpp @@ -12,6 +12,8 @@ #include +#include + #include #include #include @@ -31,6 +33,7 @@ #include #include +#include #include #include @@ -405,7 +408,8 @@ void IosConfigurations::updateSimulators() dev = IDevice::ConstPtr(new IosSimulator(devId)); devManager->addDevice(dev); } - SimulatorControl::updateAvailableSimulators(this); + ExtensionSystem::PluginManager::futureSynchronizer()->addFuture( + SimulatorControl::updateAvailableSimulators(this)); } void IosConfigurations::setDeveloperPath(const FilePath &devPath) diff --git a/src/plugins/languageclient/client.cpp b/src/plugins/languageclient/client.cpp index 2fcfc0210fc..7583b065988 100644 --- a/src/plugins/languageclient/client.cpp +++ b/src/plugins/languageclient/client.cpp @@ -574,6 +574,8 @@ QString Client::stateString() const //: language client state case InitializeRequested: return Tr::tr("initialize requested"); //: language client state + case FailedToInitialize: return Tr::tr("failed to initialize"); + //: language client state case Initialized: return Tr::tr("initialized"); //: language client state case ShutdownRequested: return Tr::tr("shutdown requested"); @@ -1696,7 +1698,7 @@ bool ClientPrivate::reset() void Client::setError(const QString &message) { log(message); - d->m_state = Error; + d->m_state = d->m_state < Initialized ? FailedToInitialize : Error; } ProgressManager *Client::progressManager() diff --git a/src/plugins/languageclient/client.h b/src/plugins/languageclient/client.h index da8c8166644..aba2b996754 100644 --- a/src/plugins/languageclient/client.h +++ b/src/plugins/languageclient/client.h @@ -77,6 +77,7 @@ public: enum State { Uninitialized, InitializeRequested, + FailedToInitialize, Initialized, ShutdownRequested, Shutdown, diff --git a/src/plugins/languageclient/languageclient.qbs b/src/plugins/languageclient/languageclient.qbs index 7f1899927fe..5bb5e1ac11e 100644 --- a/src/plugins/languageclient/languageclient.qbs +++ b/src/plugins/languageclient/languageclient.qbs @@ -67,5 +67,10 @@ QtcPlugin { "snippet.h", ] + Properties { + condition: qbs.toolchain.contains("mingw") + cpp.cxxFlags: "-Wa,-mbig-obj" + } + Export { Depends { name: "LanguageServerProtocol" } } } diff --git a/src/plugins/languageclient/languageclientmanager.cpp b/src/plugins/languageclient/languageclientmanager.cpp index c05b84db4aa..bb655e2d8f8 100644 --- a/src/plugins/languageclient/languageclientmanager.cpp +++ b/src/plugins/languageclient/languageclientmanager.cpp @@ -168,11 +168,12 @@ void LanguageClientManager::clientFinished(Client *client) const bool unexpectedFinish = client->state() != Client::Shutdown && client->state() != Client::ShutdownRequested; + const QList &clientDocs + = managerInstance->m_clientForDocument.keys(client); if (unexpectedFinish) { if (!PluginManager::isShuttingDown()) { - const QList &clientDocs - = managerInstance->m_clientForDocument.keys(client); - if (client->state() == Client::Initialized && client->reset()) { + const bool shouldRestart = client->state() > Client::FailedToInitialize; + if (shouldRestart && client->reset()) { qCDebug(Log) << "restart unexpectedly finished client: " << client->name() << client; client->log( Tr::tr("Unexpectedly finished. Restarting in %1 seconds.").arg(restartTimeoutS)); @@ -186,10 +187,14 @@ void LanguageClientManager::clientFinished(Client *client) } qCDebug(Log) << "client finished unexpectedly: " << client->name() << client; client->log(Tr::tr("Unexpectedly finished.")); - for (TextEditor::TextDocument *document : clientDocs) - managerInstance->m_clientForDocument.remove(document); } } + + if (unexpectedFinish || !QTC_GUARD(clientDocs.isEmpty())) { + for (TextEditor::TextDocument *document : clientDocs) + openDocumentWithClient(document, nullptr); + } + deleteClient(client); if (isShutdownFinished()) emit managerInstance->shutdownFinished(); diff --git a/src/plugins/languageclient/languageclientsettings.cpp b/src/plugins/languageclient/languageclientsettings.cpp index 95d5b1a2e1b..7b6c4a41bfe 100644 --- a/src/plugins/languageclient/languageclientsettings.cpp +++ b/src/plugins/languageclient/languageclientsettings.cpp @@ -1117,10 +1117,10 @@ ProjectSettingsWidget::ProjectSettingsWidget(ProjectExplorer::Project *project) auto layout = new QVBoxLayout; setLayout(layout); - auto group = new QGroupBox(Tr::tr("Language Server Workspace Configuration")); + auto group = new QGroupBox(Tr::tr("Workspace Configuration")); group->setLayout(new QVBoxLayout); group->layout()->addWidget(new QLabel(Tr::tr( - "Additional json configuration sent to all running language servers for this project.\n" + "Additional JSON configuration sent to all running language servers for this project.\n" "See the documentation of the specific language server for valid settings."))); group->layout()->addWidget(editor->widget()); layout->addWidget(group); diff --git a/src/plugins/mcusupport/CMakeLists.txt b/src/plugins/mcusupport/CMakeLists.txt index f52c31b82ab..aa8b4f2bf1b 100644 --- a/src/plugins/mcusupport/CMakeLists.txt +++ b/src/plugins/mcusupport/CMakeLists.txt @@ -1,6 +1,6 @@ add_qtc_plugin(McuSupport DEPENDS Qt::Core QmlJS - PLUGIN_DEPENDS Core BareMetal ProjectExplorer Debugger CMakeProjectManager QtSupport + PLUGIN_DEPENDS Core BareMetal ProjectExplorer Debugger CMakeProjectManager QmlJSTools QtSupport SOURCES mcukitaspect.cpp mcukitaspect.h mcusupport.qrc diff --git a/src/plugins/mcusupport/mcusupport.qbs b/src/plugins/mcusupport/mcusupport.qbs index b14c6a90a23..e944ba5ce97 100644 --- a/src/plugins/mcusupport/mcusupport.qbs +++ b/src/plugins/mcusupport/mcusupport.qbs @@ -14,6 +14,7 @@ QtcPlugin { Depends { name: "Debugger" } Depends { name: "CMakeProjectManager" } Depends { name: "QmlJS" } + Depends { name: "QmlJSTools" } Depends { name: "QtSupport" } Depends { name: "qtc_gtest_gmock"; condition: qtc.withPluginTests; required: false } diff --git a/src/plugins/mcusupport/test/unittest.cpp b/src/plugins/mcusupport/test/unittest.cpp index 5692ceee751..13ed66f8035 100644 --- a/src/plugins/mcusupport/test/unittest.cpp +++ b/src/plugins/mcusupport/test/unittest.cpp @@ -954,34 +954,34 @@ void McuSupportTest::test_legacy_createTargetWithToolchainPackages_data() QTest::newRow("armgcc_mimxrt1050_evk_freertos_json") << armgcc_mimxrt1050_evk_freertos_json << armGccToolchainFilePath - << armGccToolchainFileUnexpandedPath << armGccDir << armGccDirectorySetting + << armGccToolchainFileUnexpandedPath << armGccDir << keyFromString(armGccDirectorySetting) << QStringList{armGccVersion}; QTest::newRow("armgcc_mimxrt1064_evk_freertos_json") << armgcc_mimxrt1064_evk_freertos_json << armGccToolchainFilePath - << armGccToolchainFileUnexpandedPath << armGccDir << armGccDirectorySetting + << armGccToolchainFileUnexpandedPath << armGccDir << keyFromString(armGccDirectorySetting) << QStringList{armGccVersion}; QTest::newRow("armgcc_mimxrt1170_evk_freertos_json") << armgcc_mimxrt1170_evk_freertos_json << armGccToolchainFilePath - << armGccToolchainFileUnexpandedPath << armGccDir << armGccDirectorySetting + << armGccToolchainFileUnexpandedPath << armGccDir << keyFromString(armGccDirectorySetting) << QStringList{armGccVersion}; QTest::newRow("armgcc_stm32h750b_discovery_baremetal_json") << armgcc_stm32h750b_discovery_baremetal_json << armGccToolchainFilePath - << armGccToolchainFileUnexpandedPath << armGccDir << armGccDirectorySetting + << armGccToolchainFileUnexpandedPath << armGccDir << keyFromString(armGccDirectorySetting) << QStringList{armGccVersion}; QTest::newRow("armgcc_stm32f769i_discovery_freertos_json") << armgcc_stm32f769i_discovery_freertos_json << armGccToolchainFilePath - << armGccToolchainFileUnexpandedPath << armGccDir << armGccDirectorySetting + << armGccToolchainFileUnexpandedPath << armGccDir << keyFromString(armGccDirectorySetting) << QStringList{armGccVersion}; QTest::newRow("iar_stm32f469i_discovery_baremetal_json") << iar_stm32f469i_discovery_baremetal_json << iarToolchainFilePath - << iarToolchainFileUnexpandedPath << iarDir << iarSetting << iarVersions; + << iarToolchainFileUnexpandedPath << iarDir << keyFromString(iarSetting) << iarVersions; QTest::newRow("iar_mimxrt1064_evk_freertos_json") << iar_mimxrt1064_evk_freertos_json << iarToolchainFilePath - << iarToolchainFileUnexpandedPath << iarDir << iarSetting << iarVersions; + << iarToolchainFileUnexpandedPath << iarDir << keyFromString(iarSetting) << iarVersions; QTest::newRow("ghs_rh850_d1m1a_baremetal_json") << ghs_rh850_d1m1a_baremetal_json << greenhillToolchainFilePath - << greenhillToolchainFileUnexpandedPath << greenhillCompilerDir << greenhillSetting - << greenhillVersions; + << greenhillToolchainFileUnexpandedPath << greenhillCompilerDir + << keyFromString(greenhillSetting) << greenhillVersions; } void McuSupportTest::test_legacy_createTargetWithToolchainPackages() @@ -1145,22 +1145,22 @@ void McuSupportTest::test_legacy_createFreeRtosPackage_data() QTest::newRow("armgcc_mimxrt1050_evk_freertos_json") << armgcc_mimxrt1050_evk_freertos_json << QStringList{boardSdkVersion} - << QString{Legacy::Constants::SETTINGS_KEY_FREERTOS_PREFIX}.append(nxp1050) + << keyFromString(QString{Legacy::Constants::SETTINGS_KEY_FREERTOS_PREFIX}.append(nxp1050)) << FilePath::fromUserInput(boardSdkDir) / freeRtosNxpPathSuffix << FilePath::fromUserInput(freeRtosDetectionPath); QTest::newRow("armgcc_mimxrt1064_evk_freertos_json") << armgcc_mimxrt1064_evk_freertos_json << QStringList{boardSdkVersion} - << QString{Legacy::Constants::SETTINGS_KEY_FREERTOS_PREFIX}.append(nxp1064) + << keyFromString(QString{Legacy::Constants::SETTINGS_KEY_FREERTOS_PREFIX}.append(nxp1064)) << FilePath::fromUserInput(boardSdkDir) / freeRtosNxpPathSuffix << FilePath::fromUserInput(freeRtosDetectionPath); QTest::newRow("iar_mimxrt1064_evk_freertos_json") << iar_mimxrt1064_evk_freertos_json << QStringList{boardSdkVersion} - << QString{Legacy::Constants::SETTINGS_KEY_FREERTOS_PREFIX}.append(nxp1064) + << keyFromString(QString{Legacy::Constants::SETTINGS_KEY_FREERTOS_PREFIX}.append(nxp1064)) << FilePath::fromUserInput(boardSdkDir) / freeRtosNxpPathSuffix << FilePath::fromUserInput(freeRtosDetectionPath); QTest::newRow("armgcc_stm32f769i_discovery_freertos_json") << armgcc_stm32f769i_discovery_freertos_json << QStringList{"1.16.0"} - << QString{Legacy::Constants::SETTINGS_KEY_FREERTOS_PREFIX}.append(stm32f7) + << keyFromString(QString{Legacy::Constants::SETTINGS_KEY_FREERTOS_PREFIX}.append(stm32f7)) << FilePath::fromUserInput(boardSdkDir) / freeRtosStmPathSuffix << FilePath::fromUserInput(freeRtosDetectionPath); } @@ -1495,7 +1495,7 @@ void McuSupportTest::test_legacy_createThirdPartyPackage_data() QTest::addColumn("json"); QTest::addColumn("path"); QTest::addColumn("defaultPath"); - QTest::addColumn("setting"); + QTest::addColumn("setting"); QTest::addColumn("cmakeVar"); QTest::addColumn("envVar"); QTest::addColumn("label"); @@ -1504,42 +1504,42 @@ void McuSupportTest::test_legacy_createThirdPartyPackage_data() QTest::newRow("armgcc_mimxrt1050_evk_freertos_json mcuXpresso") << PackageCreator{[this]() { return Legacy::createMcuXpressoIdePackage(settingsMockPtr); }} << armgcc_mimxrt1050_evk_freertos_json << xpressoIdePath << xpressoIdePath - << xpressoIdeSetting << xpressoIdeCmakeVar << xpressoIdeEnvVar << xpressoIdeLabel + << keyFromString(xpressoIdeSetting) << xpressoIdeCmakeVar << xpressoIdeEnvVar << xpressoIdeLabel << xpressoIdeDetectionPath; QTest::newRow("armgcc_mimxrt1064_evk_freertos_json mcuXpresso") << PackageCreator{[this]() { return Legacy::createMcuXpressoIdePackage(settingsMockPtr); }} << armgcc_mimxrt1064_evk_freertos_json << xpressoIdePath << xpressoIdePath - << xpressoIdeSetting << xpressoIdeCmakeVar << xpressoIdeEnvVar << xpressoIdeLabel - << xpressoIdeDetectionPath; + << keyFromString(xpressoIdeSetting) << xpressoIdeCmakeVar << xpressoIdeEnvVar + << xpressoIdeLabel << xpressoIdeDetectionPath; QTest::newRow("armgcc_mimxrt1170_evk_freertos_json mcuXpresso") << PackageCreator{[this]() { return Legacy::createMcuXpressoIdePackage(settingsMockPtr); }} << armgcc_mimxrt1170_evk_freertos_json << xpressoIdePath << xpressoIdePath - << xpressoIdeSetting << xpressoIdeCmakeVar << xpressoIdeEnvVar << xpressoIdeLabel - << xpressoIdeDetectionPath; + << keyFromString(xpressoIdeSetting) << xpressoIdeCmakeVar << xpressoIdeEnvVar + << xpressoIdeLabel << xpressoIdeDetectionPath; QTest::newRow("armgcc_stm32h750b_discovery_baremetal_json stmCubeProgrammer") << PackageCreator{[this]() { return Legacy::createStm32CubeProgrammerPackage(settingsMockPtr); }} << armgcc_stm32h750b_discovery_baremetal_json << stmCubeProgrammerPath - << stmCubeProgrammerPath << stmCubeProgrammerSetting << empty << empty + << stmCubeProgrammerPath << keyFromString(stmCubeProgrammerSetting) << empty << empty << stmCubeProgrammerLabel << stmCubeProgrammerDetectionPath; QTest::newRow("armgcc_stm32f769i_discovery_freertos_json stmCubeProgrammer") << PackageCreator{[this]() { return Legacy::createStm32CubeProgrammerPackage(settingsMockPtr); }} << armgcc_stm32f769i_discovery_freertos_json << stmCubeProgrammerPath - << stmCubeProgrammerPath << stmCubeProgrammerSetting << empty << empty + << stmCubeProgrammerPath << keyFromString(stmCubeProgrammerSetting) << empty << empty << stmCubeProgrammerLabel << stmCubeProgrammerDetectionPath; QTest::newRow("ghs_rh850_d1m1a_baremetal_json renesasProgrammer") << PackageCreator{[this]() { return Legacy::createRenesasProgrammerPackage(settingsMockPtr); }} - << ghs_rh850_d1m1a_baremetal_json << empty << empty << renesasProgrammerSetting - << renesasProgrammerCmakeVar << renesasProgrammerEnvVar << renesasProgrammerLabel - << renesasProgrammerDetectionPath; + << ghs_rh850_d1m1a_baremetal_json << empty << empty + << keyFromString(renesasProgrammerSetting) << renesasProgrammerCmakeVar + << renesasProgrammerEnvVar << renesasProgrammerLabel << renesasProgrammerDetectionPath; } void McuSupportTest::test_legacy_createThirdPartyPackage() @@ -1592,33 +1592,34 @@ void McuSupportTest::test_createThirdPartyPackage_data() QTest::newRow("armgcc_mimxrt1050_evk_freertos_json mcuXpresso") << armgcc_mimxrt1050_evk_freertos_json << xpressoIdePath << xpressoIdePath - << xpressoIdeSetting << xpressoIdeCmakeVar << xpressoIdeEnvVar << xpressoIdeLabel - << xpressoIdeDetectionPath; + << keyFromString(xpressoIdeSetting) << xpressoIdeCmakeVar << xpressoIdeEnvVar + << xpressoIdeLabel << xpressoIdeDetectionPath; QTest::newRow("armgcc_mimxrt1064_evk_freertos_json mcuXpresso") << armgcc_mimxrt1064_evk_freertos_json << xpressoIdePath << xpressoIdePath - << xpressoIdeSetting << xpressoIdeCmakeVar << xpressoIdeEnvVar << xpressoIdeLabel - << xpressoIdeDetectionPath; + << keyFromString(xpressoIdeSetting) << xpressoIdeCmakeVar << xpressoIdeEnvVar + << xpressoIdeLabel << xpressoIdeDetectionPath; QTest::newRow("armgcc_mimxrt1170_evk_freertos_json mcuXpresso") << armgcc_mimxrt1170_evk_freertos_json << xpressoIdePath << xpressoIdePath - << xpressoIdeSetting << xpressoIdeCmakeVar << xpressoIdeEnvVar << xpressoIdeLabel + << keyFromString(xpressoIdeSetting) << xpressoIdeCmakeVar << xpressoIdeEnvVar << xpressoIdeLabel << xpressoIdeDetectionPath; QTest::newRow("armgcc_stm32h750b_discovery_baremetal_json stmCubeProgrammer") << armgcc_stm32h750b_discovery_baremetal_json << stmCubeProgrammerPath - << stmCubeProgrammerPath << stmCubeProgrammerSetting << empty << empty + << stmCubeProgrammerPath << keyFromString(stmCubeProgrammerSetting) << empty << empty << stmCubeProgrammerLabel << stmCubeProgrammerDetectionPath; QTest::newRow("armgcc_stm32f769i_discovery_freertos_json stmCubeProgrammer") << armgcc_stm32f769i_discovery_freertos_json << stmCubeProgrammerPath - << stmCubeProgrammerPath << stmCubeProgrammerSetting << empty << empty + << stmCubeProgrammerPath << keyFromString(stmCubeProgrammerSetting) << empty << empty << stmCubeProgrammerLabel << stmCubeProgrammerDetectionPath; QTest::newRow("ghs_rh850_d1m1a_baremetal_json renesasProgrammer") << ghs_rh850_d1m1a_baremetal_json << renesasProgrammerDefaultPath << empty - << "FlashProgrammerPath" << renesasProgrammerCmakeVar << "RenesasFlashProgrammer_PATH" - << renesasProgrammerLabel << renesasProgrammerDetectionPath; + << keyFromString("FlashProgrammerPath") << renesasProgrammerCmakeVar + << "RenesasFlashProgrammer_PATH" << renesasProgrammerLabel + << renesasProgrammerDetectionPath; } void McuSupportTest::test_createThirdPartyPackage() diff --git a/src/plugins/projectexplorer/buildmanager.cpp b/src/plugins/projectexplorer/buildmanager.cpp index dcb0bdf87ff..6c74b5cf828 100644 --- a/src/plugins/projectexplorer/buildmanager.cpp +++ b/src/plugins/projectexplorer/buildmanager.cpp @@ -106,7 +106,8 @@ static const QList buildConfigsForSelection(const Target * } static int queue(const QList &projects, const QList &stepIds, - ConfigSelection configSelection, const RunConfiguration *forRunConfig = nullptr) + ConfigSelection configSelection, const RunConfiguration *forRunConfig = nullptr, + RunControl *starter = nullptr) { if (!ProjectExplorerPlugin::saveModifiedFiles()) return -1; @@ -117,7 +118,10 @@ static int queue(const QList &projects, const QList &stepIds, StopBeforeBuild stopCondition = settings.stopBeforeBuild; if (stopCondition == StopBeforeBuild::SameApp && !forRunConfig) stopCondition = StopBeforeBuild::SameBuildDir; - const auto isStoppableRc = [&projects, stopCondition, configSelection, forRunConfig](RunControl *rc) { + const auto isStoppableRc = [&projects, stopCondition, configSelection, forRunConfig, + starter](RunControl *rc) { + if (rc == starter) + return false; if (!rc->isRunning()) return false; @@ -354,10 +358,11 @@ void BuildManager::rebuildProjectWithoutDependencies(Project *project) ConfigSelection::Active); } -void BuildManager::buildProjectWithDependencies(Project *project, ConfigSelection configSelection) +void BuildManager::buildProjectWithDependencies(Project *project, ConfigSelection configSelection, + RunControl *starter) { queue(ProjectManager::projectOrder(project), {Id(Constants::BUILDSTEPS_BUILD)}, - configSelection); + configSelection, nullptr, starter); } void BuildManager::cleanProjectWithDependencies(Project *project, ConfigSelection configSelection) diff --git a/src/plugins/projectexplorer/buildmanager.h b/src/plugins/projectexplorer/buildmanager.h index 3ad4c84afd2..ec068615ab5 100644 --- a/src/plugins/projectexplorer/buildmanager.h +++ b/src/plugins/projectexplorer/buildmanager.h @@ -14,6 +14,7 @@ namespace ProjectExplorer { class BuildItem; class Project; class RunConfiguration; +class RunControl; class Task; enum class BuildForRunConfigStatus { Building, NotBuilding, BuildFailed }; @@ -33,8 +34,8 @@ public: static void buildProjectWithoutDependencies(Project *project); static void cleanProjectWithoutDependencies(Project *project); static void rebuildProjectWithoutDependencies(Project *project); - static void buildProjectWithDependencies( - Project *project, ConfigSelection configSelection = ConfigSelection::Active); + static void buildProjectWithDependencies(Project *project, + ConfigSelection configSelection = ConfigSelection::Active, RunControl *starter = nullptr); static void cleanProjectWithDependencies(Project *project, ConfigSelection configSelection); static void rebuildProjectWithDependencies(Project *project, ConfigSelection configSelection); static void buildProjects(const QList &projects, ConfigSelection configSelection); diff --git a/src/plugins/projectexplorer/project.cpp b/src/plugins/projectexplorer/project.cpp index 320df648064..20c65655627 100644 --- a/src/plugins/projectexplorer/project.cpp +++ b/src/plugins/projectexplorer/project.cpp @@ -821,7 +821,7 @@ void Project::createTargetFromMap(const Store &map, int index) } Kit *k = KitManager::kit(id); - if (!k) { + if (!k && !ICore::isQtDesignStudio()) { Id deviceTypeId = Id::fromSetting(targetMap.value(Target::deviceTypeKey())); if (!deviceTypeId.isValid()) deviceTypeId = Constants::DESKTOP_DEVICE_TYPE; diff --git a/src/plugins/projectexplorer/projectconfigurationmodel.cpp b/src/plugins/projectexplorer/projectconfigurationmodel.cpp index 23b790a4943..f2b731a6e1a 100644 --- a/src/plugins/projectexplorer/projectconfigurationmodel.cpp +++ b/src/plugins/projectexplorer/projectconfigurationmodel.cpp @@ -93,9 +93,9 @@ QVariant ProjectConfigurationModel::data(const QModelIndex &index, int role) con { if (index.row() >= m_projectConfigurations.size()) return {}; - ProjectConfiguration * const config = m_projectConfigurations.at(index.row()); if (role == Qt::DisplayRole) { + ProjectConfiguration * const config = m_projectConfigurations.at(index.row()); QString displayName = config->expandedDisplayName(); if (const auto rc = qobject_cast(config); rc && !rc->hasCreator()) displayName += QString(" [%1]").arg(Tr::tr("unavailable")); diff --git a/src/plugins/projectexplorer/projectmanager.cpp b/src/plugins/projectexplorer/projectmanager.cpp index 9706a011ae2..4943773f4b0 100644 --- a/src/plugins/projectexplorer/projectmanager.cpp +++ b/src/plugins/projectexplorer/projectmanager.cpp @@ -573,7 +573,8 @@ void ProjectManager::removeProjects(const QList &remove) void ProjectManagerPrivate::restoreDependencies() { - QMap depMap = SessionManager::sessionValue("ProjectDependencies").toMap(); + QMap depMap = mapEntryFromStoreEntry(SessionManager::sessionValue( + "ProjectDependencies")).toMap(); auto i = depMap.constBegin(); while (i != depMap.constEnd()) { const QString &key = i.key(); diff --git a/src/plugins/projectexplorer/projectnodes.h b/src/plugins/projectexplorer/projectnodes.h index 25868d0ed75..5e424b62bbc 100644 --- a/src/plugins/projectexplorer/projectnodes.h +++ b/src/plugins/projectexplorer/projectnodes.h @@ -248,7 +248,7 @@ public: const Utils::FilePath &overrideBaseDir = Utils::FilePath(), const FolderNodeFactory &factory = [](const Utils::FilePath &fn) { return std::make_unique(fn); }); - void compress(); + virtual void compress(); // takes ownership of newNode. // Will delete newNode if oldNode is not a child of this node. diff --git a/src/plugins/projectexplorer/runconfiguration.cpp b/src/plugins/projectexplorer/runconfiguration.cpp index f6cb72bde84..4a1e03d031d 100644 --- a/src/plugins/projectexplorer/runconfiguration.cpp +++ b/src/plugins/projectexplorer/runconfiguration.cpp @@ -140,6 +140,8 @@ void GlobalOrProjectAspect::resetProjectToGlobalSettings() static std::vector theAspectFactories; +static QList g_runConfigurationFactories; + RunConfiguration::RunConfiguration(Target *target, Utils::Id id) : ProjectConfiguration(target, id) { @@ -236,10 +238,13 @@ bool RunConfiguration::isCustomized() const bool RunConfiguration::hasCreator() const { - return Utils::contains(RunConfigurationFactory::creatorsForTarget(target()), - [this](const RunConfigurationCreationInfo &info) { - return info.factory->runConfigurationId() == id() && info.buildKey == buildKey(); - }); + for (RunConfigurationFactory *factory : std::as_const(g_runConfigurationFactories)) { + if (factory->runConfigurationId() == id()) { + if (factory->supportsBuildKey(target(), buildKey())) + return true; + } + } + return false; } void RunConfiguration::setPristineState() @@ -453,8 +458,6 @@ QVariantHash RunConfiguration::extraData() const ExtensionSystem::IPlugin::initialize() method. */ -static QList g_runConfigurationFactories; - /*! Constructs a RunConfigurationFactory instance and registers it into a global list. @@ -522,6 +525,14 @@ RunConfigurationFactory::availableCreators(Target *target) const }); } +bool RunConfigurationFactory::supportsBuildKey(Target *target, const QString &key) const +{ + if (!canHandle(target)) + return false; + const QList buildTargets = target->buildSystem()->applicationTargets(); + return anyOf(buildTargets, [&key](const BuildTargetInfo &info) { return info.buildKey == key; }); +} + /*! Adds a device type for which this RunConfigurationFactory can create RunConfigurations. @@ -674,4 +685,11 @@ FixedRunConfigurationFactory::availableCreators(Target *parent) const return {rci}; } +bool FixedRunConfigurationFactory::supportsBuildKey(Target *target, const QString &key) const +{ + Q_UNUSED(target) + Q_UNUSED(key) + return false; +} + } // namespace ProjectExplorer diff --git a/src/plugins/projectexplorer/runconfiguration.h b/src/plugins/projectexplorer/runconfiguration.h index 85c770a5d36..629fcd2c614 100644 --- a/src/plugins/projectexplorer/runconfiguration.h +++ b/src/plugins/projectexplorer/runconfiguration.h @@ -197,6 +197,7 @@ public: protected: virtual QList availableCreators(Target *target) const; + virtual bool supportsBuildKey(Target *target, const QString &key) const; using RunConfigurationCreator = std::function; @@ -218,6 +219,7 @@ private: RunConfiguration *create(Target *target) const; friend class RunConfigurationCreationInfo; + friend class RunConfiguration; RunConfigurationCreator m_creator; Utils::Id m_runConfigurationId; QList m_supportedProjectTypes; @@ -231,9 +233,10 @@ public: explicit FixedRunConfigurationFactory(const QString &displayName, bool addDeviceName = false); - QList availableCreators(Target *parent) const override; - private: + QList availableCreators(Target *parent) const override; + bool supportsBuildKey(Target *target, const QString &key) const override; + const QString m_fixedBuildTarget; const bool m_decorateTargetName; }; diff --git a/src/plugins/projectexplorer/runsettingspropertiespage.cpp b/src/plugins/projectexplorer/runsettingspropertiespage.cpp index 20758cbc4e3..2c675b0a043 100644 --- a/src/plugins/projectexplorer/runsettingspropertiespage.cpp +++ b/src/plugins/projectexplorer/runsettingspropertiespage.cpp @@ -237,12 +237,15 @@ void RunSettingsWidget::removeRunConfiguration() void RunSettingsWidget::removeAllRunConfigurations() { - QMessageBox msgBox(QMessageBox::Question, Tr::tr("Remove Run Configurations?"), + QMessageBox msgBox(QMessageBox::Question, + Tr::tr("Remove Run Configurations?"), Tr::tr("Do you really want to delete all run configurations?"), - QMessageBox::Yes|QMessageBox::No, this); - msgBox.setDefaultButton(QMessageBox::No); - msgBox.setEscapeButton(QMessageBox::No); - if (msgBox.exec() == QMessageBox::No) + QMessageBox::Cancel, + this); + msgBox.addButton(Tr::tr("Delete"), QMessageBox::YesRole); + msgBox.setDefaultButton(QMessageBox::Cancel); + msgBox.setEscapeButton(QMessageBox::Cancel); + if (msgBox.exec() == QMessageBox::Cancel) return; m_target->removeAllRunConfigurations(); diff --git a/src/plugins/python/pyside.cpp b/src/plugins/python/pyside.cpp index bae0c0753af..a17ae89dca8 100644 --- a/src/plugins/python/pyside.cpp +++ b/src/plugins/python/pyside.cpp @@ -127,7 +127,7 @@ void PySideInstaller::installPyside(const FilePath &python, install->setPackages({PipPackage(pySide)}); } else { QDialog dialog; - dialog.setWindowTitle(Tr::tr("Select PySide version")); + dialog.setWindowTitle(Tr::tr("Select PySide Version")); dialog.setLayout(new QVBoxLayout()); dialog.layout()->addWidget(new QLabel(Tr::tr("Select which PySide version to install:"))); QComboBox *pySideSelector = new QComboBox(); @@ -135,7 +135,7 @@ void PySideInstaller::installPyside(const FilePath &python, for (const Utils::FilePath &version : std::as_const(availablePySides)) { const FilePath dir = version.parentDir(); const QString text - = Tr::tr("PySide %1 wheel (%2)").arg(dir.fileName(), dir.toUserOutput()); + = Tr::tr("PySide %1 Wheel (%2)").arg(dir.fileName(), dir.toUserOutput()); pySideSelector->addItem(text, version.toVariant()); } dialog.layout()->addWidget(pySideSelector); diff --git a/src/plugins/python/pythonsettings.cpp b/src/plugins/python/pythonsettings.cpp index 57d951ec1d2..410714af090 100644 --- a/src/plugins/python/pythonsettings.cpp +++ b/src/plugins/python/pythonsettings.cpp @@ -170,6 +170,8 @@ InterpreterOptionsWidget::InterpreterOptionsWidget() return f; } case Qt::ToolTipRole: + if (interpreter.command.needsDevice()) + break; if (interpreter.command.isEmpty()) return Tr::tr("Executable is empty."); if (!interpreter.command.exists()) @@ -179,6 +181,8 @@ InterpreterOptionsWidget::InterpreterOptionsWidget() .arg(interpreter.command.toUserOutput()); break; case Qt::DecorationRole: + if (interpreter.command.needsDevice()) + break; if (column == 0 && !interpreter.command.isExecutableFile()) return Utils::Icons::CRITICAL.icon(); break; diff --git a/src/plugins/qmakeprojectmanager/addlibrarywizard.cpp b/src/plugins/qmakeprojectmanager/addlibrarywizard.cpp index 856c5fdd1d4..c6500df0cfd 100644 --- a/src/plugins/qmakeprojectmanager/addlibrarywizard.cpp +++ b/src/plugins/qmakeprojectmanager/addlibrarywizard.cpp @@ -45,7 +45,7 @@ static FancyLineEdit::AsyncValidationResult validateLibraryPath(const QString &i { const FilePath filePath = FilePath::fromUserInput(input); if (!filePath.exists()) - return make_unexpected(Tr::tr("File does not exist.")); + return make_unexpected(::QmakeProjectManager::Tr::tr("File does not exist.")); const QString fileName = filePath.fileName(); @@ -61,7 +61,7 @@ static FancyLineEdit::AsyncValidationResult validateLibraryPath(const QString &i if (regExp.match(fileName).hasMatch()) return input; } - return make_unexpected(Tr::tr("File does not match filter.")); + return make_unexpected(::QmakeProjectManager::Tr::tr("File does not match filter.")); } AddLibraryWizard::AddLibraryWizard(const FilePath &proFile, QWidget *parent) diff --git a/src/plugins/qmldesigner/components/connectioneditor/connectionview.cpp b/src/plugins/qmldesigner/components/connectioneditor/connectionview.cpp index b96afd69665..cd63231d5bd 100644 --- a/src/plugins/qmldesigner/components/connectioneditor/connectionview.cpp +++ b/src/plugins/qmldesigner/components/connectioneditor/connectionview.cpp @@ -17,6 +17,7 @@ #include #include #include +#include #include @@ -128,8 +129,8 @@ private: errorString += "\n" + error.toString(); Core::AsynchronousMessageBox::warning( - tr("Cannot Create QtQuick View"), - tr("ConnectionsEditorWidget: %1 cannot be created.%2") + Tr::tr("Cannot Create QtQuick View"), + Tr::tr("ConnectionsEditorWidget: %1 cannot be created.%2") .arg(qmlSourcesPath(), errorString)); return; } diff --git a/src/plugins/qmldesigner/components/edit3d/edit3dview.cpp b/src/plugins/qmldesigner/components/edit3d/edit3dview.cpp index f8c1cc2a7e8..028732cebca 100644 --- a/src/plugins/qmldesigner/components/edit3d/edit3dview.cpp +++ b/src/plugins/qmldesigner/components/edit3d/edit3dview.cpp @@ -716,7 +716,7 @@ void Edit3DView::createEdit3DActions() QmlDesigner::Constants::EDIT3D_EDIT_CAMERA, View3DActionType::CameraToggle, QCoreApplication::translate("CameraToggleAction", - "Toggle Perspective/Orthographic Edit Camera"), + "Toggle Perspective/Orthographic Camera Mode"), QKeySequence(Qt::Key_T), true, false, diff --git a/src/plugins/qmldesigner/generateresource.cpp b/src/plugins/qmldesigner/generateresource.cpp index e2d6dad9a95..de8cd5a80b4 100644 --- a/src/plugins/qmldesigner/generateresource.cpp +++ b/src/plugins/qmldesigner/generateresource.cpp @@ -190,9 +190,10 @@ static bool runRcc(const CommandLine &command, const FilePath &workingDir, QByteArray stdOut; QByteArray stdErr; if (!rccProcess.readDataFromProcess(&stdOut, &stdErr)) { - Core::MessageManager::writeDisrupting(QCoreApplication::translate( - "QmlDesigner::GenerateResource", "A timeout occurred running \"%1\"") - .arg(rccProcess.commandLine().toUserOutput())); + Core::MessageManager::writeDisrupting( + QCoreApplication::translate("QmlDesigner::GenerateResource", + "A timeout occurred running \"%1\".") + .arg(rccProcess.commandLine().toUserOutput())); return false; } if (!stdOut.trimmed().isEmpty()) diff --git a/src/plugins/qmljseditor/qmljseditingsettingspage.cpp b/src/plugins/qmljseditor/qmljseditingsettingspage.cpp index 642a5facc59..11c7985fd1c 100644 --- a/src/plugins/qmljseditor/qmljseditingsettingspage.cpp +++ b/src/plugins/qmljseditor/qmljseditingsettingspage.cpp @@ -578,7 +578,7 @@ QmlJsEditingSettings QmlJsEditingSettings::get() QmlJsEditingSettingsPage::QmlJsEditingSettingsPage() { setId("C.QmlJsEditing"); - setDisplayName(Tr::tr("QML/JS Editing")); + setDisplayName(::QmlJSEditor::Tr::tr("QML/JS Editing")); setCategory(Constants::SETTINGS_CATEGORY_QML); setWidgetCreator([] { return new QmlJsEditingSettingsPageWidget; }); } diff --git a/src/plugins/qmljseditor/qmljseditordocument.cpp b/src/plugins/qmljseditor/qmljseditordocument.cpp index 065e39e0c37..37f49d08712 100644 --- a/src/plugins/qmljseditor/qmljseditordocument.cpp +++ b/src/plugins/qmljseditor/qmljseditordocument.cpp @@ -784,6 +784,7 @@ void QmlJSEditorDocumentPrivate::settingsChanged() case LanguageClient::Client::State::Initialized: setSourcesWithCapabilities(client->capabilities()); break; + case LanguageClient::Client::State::FailedToInitialize: case LanguageClient::Client::State::Error: qCWarning(qmllsLog) << "qmlls" << newQmlls << "requested for document" << q->filePath() << "had errors, skipping setSourcesWithCababilities"; diff --git a/src/plugins/qmljseditor/qmllsclient.cpp b/src/plugins/qmljseditor/qmllsclient.cpp index 6777f267cc1..4cc8769bb1b 100644 --- a/src/plugins/qmljseditor/qmllsclient.cpp +++ b/src/plugins/qmljseditor/qmllsclient.cpp @@ -39,6 +39,7 @@ QmllsClient *QmllsClient::clientForQmlls(const FilePath &qmlls) case Client::State::InitializeRequested: case Client::State::Initialized: return client; + case Client::State::FailedToInitialize: case Client::State::ShutdownRequested: case Client::State::Shutdown: case Client::State::Error: diff --git a/src/plugins/qmlpreview/qmlpreviewplugin.cpp b/src/plugins/qmlpreview/qmlpreviewplugin.cpp index 9d05d0ee398..011b6f43d2f 100644 --- a/src/plugins/qmlpreview/qmlpreviewplugin.cpp +++ b/src/plugins/qmlpreview/qmlpreviewplugin.cpp @@ -44,6 +44,7 @@ #include #include +#include #include #include @@ -174,11 +175,6 @@ QmlPreviewPluginPrivate::QmlPreviewPluginPrivate(QmlPreviewPlugin *parent) menu = Core::ActionManager::actionContainer(Constants::M_FILECONTEXT); action = new QAction(Tr::tr("Preview File"), this); - action->setEnabled(false); - connect(q, &QmlPreviewPlugin::runningPreviewsChanged, - action, [action](const QmlPreviewRunControlList &previews) { - action->setEnabled(!previews.isEmpty()); - }); connect(action, &QAction::triggered, q, &QmlPreviewPlugin::previewCurrentFile); menu->addAction( Core::ActionManager::registerAction(action, "QmlPreview.PreviewFile", Core::Context(Constants::C_PROJECT_TREE)), @@ -336,6 +332,11 @@ void QmlPreviewPlugin::previewCurrentFile() || currentNode->asFileNode()->fileType() != FileType::QML) return; + if (runningPreviews().isEmpty()) + QMessageBox::warning(Core::ICore::dialogParent(), Tr::tr("QML Preview Not Running"), + Tr::tr("Start the QML Preview for the project before selecting " + "a specific file for preview.")); + const QString file = currentNode->filePath().toString(); if (file != d->m_previewedFile) setPreviewedFile(file); @@ -412,6 +413,8 @@ void QmlPreviewPluginPrivate::attachToEditor() void QmlPreviewPluginPrivate::checkEditor() { + if (m_runningPreviews.isEmpty()) + return; QmlJS::Dialect::Enum dialect = QmlJS::Dialect::AnyLanguage; Core::IDocument *doc = m_lastEditor->document(); const QString mimeType = doc->mimeType(); diff --git a/src/plugins/qtsupport/qtoptionspage.cpp b/src/plugins/qtsupport/qtoptionspage.cpp index 741aeeb567c..99a237d7960 100644 --- a/src/plugins/qtsupport/qtoptionspage.cpp +++ b/src/plugins/qtsupport/qtoptionspage.cpp @@ -951,8 +951,8 @@ static FancyLineEdit::AsyncValidationResult validateQtInstallDir(const QString & const QStringList filesToCheck = settingsFilesToCheck() + qtversionFilesToCheck(); return make_unexpected( "" - + Tr::tr("Qt installation information was not found in \"%1\". " - "Choose a directory that contains one of the files %2") + + ::QtSupport::Tr::tr("Qt installation information was not found in \"%1\". " + "Choose a directory that contains one of the files %2") .arg(qtDir.toUserOutput(), "
    " + filesToCheck.join('\n') + "
    ")); } return input; diff --git a/src/plugins/remotelinux/genericdeploystep.cpp b/src/plugins/remotelinux/genericdeploystep.cpp index 9ca4063e390..4ae804689c2 100644 --- a/src/plugins/remotelinux/genericdeploystep.cpp +++ b/src/plugins/remotelinux/genericdeploystep.cpp @@ -90,16 +90,16 @@ GroupItem GenericDeployStep::mkdirTask() { using ResultType = expected_str; - const auto onSetup = [files = m_files](Async &async) { + const auto onSetup = [this](Async &async) { FilePaths remoteDirs; - for (const FileToTransfer &file : std::as_const(files)) + for (const FileToTransfer &file : std::as_const(m_files)) remoteDirs << file.m_target.parentDir(); FilePath::sort(remoteDirs); FilePath::removeDuplicates(remoteDirs); async.setConcurrentCallData([remoteDirs](QPromise &promise) { - for (auto dir : remoteDirs) { + for (const FilePath &dir : remoteDirs) { const expected_str result = dir.ensureWritableDir(); promise.addResult(result); if (!result) @@ -117,7 +117,7 @@ GroupItem GenericDeployStep::mkdirTask() } for (int i = 0; i < numResults; ++i) { - const auto result = async.future().resultAt(i); + const ResultType result = async.future().resultAt(i); if (!result.has_value()) addErrorMessage(result.error()); } diff --git a/src/plugins/remotelinux/linuxdevicetester.cpp b/src/plugins/remotelinux/linuxdevicetester.cpp index 9eb44b8f00c..e908541aa57 100644 --- a/src/plugins/remotelinux/linuxdevicetester.cpp +++ b/src/plugins/remotelinux/linuxdevicetester.cpp @@ -188,12 +188,16 @@ GroupItem GenericLinuxDeviceTesterPrivate::transferTask(FileTransferMethod metho const ProcessResultData resultData = transfer.resultData(); QString error; if (resultData.m_error == QProcess::FailedToStart) { - error = Tr::tr("Failed to start \"%1\": %2\n").arg(methodName, resultData.m_errorString); + error = Tr::tr("Failed to start \"%1\": %2").arg(methodName, resultData.m_errorString) + + "\n"; } else if (resultData.m_exitStatus == QProcess::CrashExit) { - error = Tr::tr("\"%1\" crashed.\n").arg(methodName); + error = Tr::tr("\"%1\" crashed.").arg(methodName) + "\n"; } else if (resultData.m_exitCode != 0) { - error = Tr::tr("\"%1\" failed with exit code %2: %3\n") - .arg(methodName).arg(resultData.m_exitCode).arg(resultData.m_errorString); + error = Tr::tr("\"%1\" failed with exit code %2: %3") + .arg(methodName) + .arg(resultData.m_exitCode) + .arg(resultData.m_errorString) + + "\n"; } emit q->errorMessage(error); if (method == FileTransferMethod::Rsync) @@ -209,8 +213,9 @@ GroupItem GenericLinuxDeviceTesterPrivate::transferTask(FileTransferMethod metho const QString sftp = FileTransfer::transferMethodName(FileTransferMethod::Sftp); const QString rsync = FileTransfer::transferMethodName(FileTransferMethod::Rsync); emit q->progressMessage(Tr::tr("\"%1\" will be used for deployment, because \"%2\" " - "and \"%3\" are not available.\n") - .arg(generic, sftp, rsync)); + "and \"%3\" are not available.") + .arg(generic, sftp, rsync) + + "\n"); } }; return FileTransferTestTask(setup, done, error); @@ -219,16 +224,16 @@ GroupItem GenericLinuxDeviceTesterPrivate::transferTask(FileTransferMethod metho GroupItem GenericLinuxDeviceTesterPrivate::transferTasks() const { TreeStorage storage; - return Group { - continueOnDone, - Tasking::Storage(storage), - transferTask(FileTransferMethod::GenericCopy, storage), - transferTask(FileTransferMethod::Sftp, storage), - transferTask(FileTransferMethod::Rsync, storage), - onGroupError([this] { emit q->errorMessage(Tr::tr("Deployment to this device will not " - "work out of the box.\n")); - }) - }; + return Group{continueOnDone, + Tasking::Storage(storage), + transferTask(FileTransferMethod::GenericCopy, storage), + transferTask(FileTransferMethod::Sftp, storage), + transferTask(FileTransferMethod::Rsync, storage), + onGroupError([this] { + emit q->errorMessage(Tr::tr("Deployment to this device will not " + "work out of the box.") + + "\n"); + })}; } GroupItem GenericLinuxDeviceTesterPrivate::commandTask(const QString &commandName) const diff --git a/src/plugins/resourceeditor/resourcenode.h b/src/plugins/resourceeditor/resourcenode.h index 8e04267768e..d857a643761 100644 --- a/src/plugins/resourceeditor/resourcenode.h +++ b/src/plugins/resourceeditor/resourcenode.h @@ -25,6 +25,8 @@ public: ProjectExplorer::RemovedFilesFromProject removeFiles(const Utils::FilePaths &filePaths, Utils::FilePaths *notRemoved) override; + void compress() override { } // do not compress + bool addPrefix(const QString &prefix, const QString &lang); bool removePrefix(const QString &prefix, const QString &lang); diff --git a/src/plugins/screenrecorder/cropandtrim.cpp b/src/plugins/screenrecorder/cropandtrim.cpp index e7b113cc194..819f0e285b6 100644 --- a/src/plugins/screenrecorder/cropandtrim.cpp +++ b/src/plugins/screenrecorder/cropandtrim.cpp @@ -299,11 +299,11 @@ CropWidget::CropWidget(QWidget *parent) m_warningIcon = new CropSizeWarningIcon(CropSizeWarningIcon::StandardVariant); auto saveImageButton = new QToolButton; - saveImageButton->setToolTip(Tr::tr("Save current, cropped frame as image file...")); + saveImageButton->setToolTip(Tr::tr("Save current, cropped frame as image file.")); saveImageButton->setIcon(Icons::SAVEFILE.icon()); auto copyImageToClipboardAction = new QAction(Tr::tr("Copy current, cropped frame as image " - "into the Clipboard"), this); + "to the clipboard."), this); copyImageToClipboardAction->setIcon(Icons::SNAPSHOT.icon()); copyImageToClipboardAction->setShortcut(QKeySequence::Copy); @@ -783,8 +783,9 @@ CropAndTrimWidget::CropAndTrimWidget(QWidget *parent) void CropAndTrimWidget::setClip(const ClipInfo &clip) { + if (clip.dimensions != m_clipInfo.dimensions) + m_cropRect = {QPoint(), clip.dimensions}; // Reset only if clip size changed m_clipInfo = clip; - m_cropRect = {QPoint(), clip.dimensions}; m_currentFrame = 0; m_trimRange = {m_currentFrame, m_clipInfo.framesCount()}; updateWidgets(); diff --git a/src/plugins/screenrecorder/export.cpp b/src/plugins/screenrecorder/export.cpp index 76696250943..0c9b67d2a34 100644 --- a/src/plugins/screenrecorder/export.cpp +++ b/src/plugins/screenrecorder/export.cpp @@ -155,7 +155,7 @@ ExportWidget::ExportWidget(QWidget *parent) [&lastFormat] (const Format &f) { return f.displayName == lastFormat(); }).fileDialogFilter(); - FilePath file = FileUtils::getSaveFilePath(nullptr, Tr::tr("Save as"), lastDir(), + FilePath file = FileUtils::getSaveFilePath(nullptr, Tr::tr("Save As"), lastDir(), fileDialogFilters(), &selectedFilter); if (!file.isEmpty()) { m_currentFormat = findOr(formats(), defaultFormat, diff --git a/src/plugins/screenrecorder/ffmpegutils.cpp b/src/plugins/screenrecorder/ffmpegutils.cpp index 08a018e0a6e..96223c3781e 100644 --- a/src/plugins/screenrecorder/ffmpegutils.cpp +++ b/src/plugins/screenrecorder/ffmpegutils.cpp @@ -98,7 +98,7 @@ CropSizeWarningIcon::CropSizeWarningIcon(IconVariant backgroundType, QWidget *pa { setMinimumSize(warningIconSize); setToolTip(Tr::tr("Width and height are not both divisible by 2. " - "The Video export for some of the lossy formats will not work.")); + "The video export for some of the lossy formats will not work.")); m_updateTimer = new QTimer(this); m_updateTimer->setInterval(350); m_updateTimer->setSingleShot(true); diff --git a/src/plugins/screenrecorder/record.cpp b/src/plugins/screenrecorder/record.cpp index 60635219bba..40efe047911 100644 --- a/src/plugins/screenrecorder/record.cpp +++ b/src/plugins/screenrecorder/record.cpp @@ -108,7 +108,7 @@ RecordOptionsDialog::RecordOptionsDialog(QWidget *parent) Column { Row { m_screenId, st }, Group { - title(Tr::tr("Recorded screen area")), + title(Tr::tr("Recorded screen area:")), Column { m_cropScene, Row { st, m_cropRectLabel, m_resetButton }, @@ -210,7 +210,7 @@ RecordWidget::RecordWidget(const FilePath &recordFile, QWidget *parent) progressLabel->setEnabled(false); progressLabel->setAlignment(Qt::AlignVCenter | Qt::AlignRight); - m_openClipAction = new QAction(Tr::tr("Open Mov/qtrle rgb24 file"), this); + m_openClipAction = new QAction(Tr::tr("Open Mov/qtrle rgb24 File"), this); addAction(m_openClipAction); setContextMenuPolicy(Qt::ActionsContextMenu); @@ -289,7 +289,7 @@ RecordWidget::RecordWidget(const FilePath &recordFile, QWidget *parent) } else if (!clip.isLossless()) { QMessageBox::critical(Core::ICore::dialogParent(), Tr::tr("Clip Not Supported"), - Tr::tr("Please chose a clip with the \"qtrle\" codec and " + Tr::tr("Choose a clip with the \"qtrle\" codec and " "pixel format \"rgb24\".")); } else { m_clipInfo.duration = 0; diff --git a/src/plugins/screenrecorder/screenrecordersettings.cpp b/src/plugins/screenrecorder/screenrecordersettings.cpp index f5ac792a949..2d492af2509 100644 --- a/src/plugins/screenrecorder/screenrecordersettings.cpp +++ b/src/plugins/screenrecorder/screenrecordersettings.cpp @@ -173,7 +173,7 @@ ScreenRecorderSettings::ScreenRecorderSettings() using namespace Layouting; return Column { Group { - title(Tr::tr("FFmpeg installation")), + title(Tr::tr("FFmpeg Installation")), Form { ffmpegTool, br, ffprobeTool, br, @@ -181,7 +181,7 @@ ScreenRecorderSettings::ScreenRecorderSettings() }, }, Group { - title(Tr::tr("Record settings")), + title(Tr::tr("Record Settings")), Column { captureCursor, captureMouseClicks, @@ -191,7 +191,7 @@ ScreenRecorderSettings::ScreenRecorderSettings() }, }, Group { - title(Tr::tr("Export settings")), + title(Tr::tr("Export Settings")), Column { animatedImagesAsEndlessLoop, }, diff --git a/src/plugins/squish/squishxmloutputhandler.cpp b/src/plugins/squish/squishxmloutputhandler.cpp index a9f59af44a3..d41e4bccc8d 100644 --- a/src/plugins/squish/squishxmloutputhandler.cpp +++ b/src/plugins/squish/squishxmloutputhandler.cpp @@ -50,7 +50,7 @@ void SquishXmlOutputHandler::mergeResultFiles(const Utils::FilePaths &reportFile if (!resultsXML.open(QFile::WriteOnly)) { if (error) *error = Tr::tr("Could not merge results into single results.xml.\n" - "Failed to open file \"%1\"") + "Failed to open file \"%1\".") .arg(resultsXML.fileName()); return; } diff --git a/src/plugins/terminal/terminalpane.cpp b/src/plugins/terminal/terminalpane.cpp index df059d03b3b..a11284ef1bd 100644 --- a/src/plugins/terminal/terminalpane.cpp +++ b/src/plugins/terminal/terminalpane.cpp @@ -26,6 +26,7 @@ #include #include +#include #include #include #include @@ -81,7 +82,9 @@ TerminalPane::TerminalPane(QObject *parent) .toString(QKeySequence::NativeText); if (settings().sendEscapeToTerminal()) { m_escSettingButton->setText(escKey); - m_escSettingButton->setToolTip(Tr::tr("Sends Esc to terminal instead of Qt Creator.")); + //: %1 is the application name (Qt Creator) + m_escSettingButton->setToolTip(Tr::tr("Sends Esc to terminal instead of %1.") + .arg(QGuiApplication::applicationDisplayName())); } else { m_escSettingButton->setText(shiftEsc); m_escSettingButton->setToolTip( @@ -106,10 +109,14 @@ TerminalPane::TerminalPane(QObject *parent) if (settings().lockKeyboard()) { m_lockKeyboardButton->setIcon(LOCK_KEYBOARD_ICON.icon()); m_lockKeyboardButton->setToolTip( - Tr::tr("Qt Creator shortcuts are blocked when focus is inside the terminal.")); + //: %1 is the application name (Qt Creator) + Tr::tr("%1 shortcuts are blocked when focus is inside the terminal.") + .arg(QGuiApplication::applicationDisplayName())); } else { m_lockKeyboardButton->setIcon(UNLOCK_KEYBOARD_ICON.icon()); - m_lockKeyboardButton->setToolTip(Tr::tr("Qt Creator shortcuts take precedence.")); + //: %1 is the application name (Qt Creator) + m_lockKeyboardButton->setToolTip(Tr::tr("%1 shortcuts take precedence.") + .arg(QGuiApplication::applicationDisplayName())); } }; diff --git a/src/plugins/terminal/terminalsettings.cpp b/src/plugins/terminal/terminalsettings.cpp index 63fcdac3bb1..b6bfe3c37c7 100644 --- a/src/plugins/terminal/terminalsettings.cpp +++ b/src/plugins/terminal/terminalsettings.cpp @@ -482,15 +482,14 @@ TerminalSettings::TerminalSettings() sendEscapeToTerminal.setSettingsKey("SendEscapeToTerminal"); sendEscapeToTerminal.setLabelText(Tr::tr("Send escape key to terminal")); - sendEscapeToTerminal.setToolTip( - Tr::tr("Sends the escape key to the terminal when pressed" - "instead of closing the terminal.")); + sendEscapeToTerminal.setToolTip(Tr::tr("Sends the escape key to the terminal when pressed " + "instead of closing the terminal.")); sendEscapeToTerminal.setDefaultValue(false); lockKeyboard.setSettingsKey("LockKeyboard"); lockKeyboard.setLabelText(Tr::tr("Block shortcuts in terminal")); lockKeyboard.setToolTip( - Tr::tr("Keeps Qt Creator short cuts from interfering with the terminal.")); + Tr::tr("Keeps Qt Creator shortcuts from interfering with the terminal.")); lockKeyboard.setDefaultValue(true); audibleBell.setSettingsKey("AudibleBell"); diff --git a/src/plugins/terminal/terminalwidget.cpp b/src/plugins/terminal/terminalwidget.cpp index 44b55c85960..183b843b741 100644 --- a/src/plugins/terminal/terminalwidget.cpp +++ b/src/plugins/terminal/terminalwidget.cpp @@ -85,7 +85,7 @@ void TerminalWidget::setupPty() CommandLine{settings().shell(), settings().shellArguments(), CommandLine::Raw}); if (shellCommand.executable().isRootPath()) { - writeToTerminal(Tr::tr("Connecting ...\r\n").toUtf8(), true); + writeToTerminal((Tr::tr("Connecting...") + "\r\n").toUtf8(), true); // We still have to find the shell to start ... m_findShellWatcher.reset(new QFutureWatcher>()); connect(m_findShellWatcher.get(), &QFutureWatcher::finished, this, [this] { @@ -107,7 +107,7 @@ void TerminalWidget::setupPty() shellCommand.executable()); if (result && !result->isExecutableFile()) return make_unexpected( - Tr::tr("'%1' is not executable.").arg(result->toUserOutput())); + Tr::tr("\"%1\" is not executable.").arg(result->toUserOutput())); return result; })); diff --git a/src/plugins/texteditor/highlighter.h b/src/plugins/texteditor/highlighter.h index b3f10d0671d..0183c9c171e 100644 --- a/src/plugins/texteditor/highlighter.h +++ b/src/plugins/texteditor/highlighter.h @@ -13,8 +13,7 @@ namespace TextEditor { class TextDocument; -class TEXTEDITOR_EXPORT Highlighter : public SyntaxHighlighter, - public KSyntaxHighlighting::AbstractHighlighter +class Highlighter : public SyntaxHighlighter, public KSyntaxHighlighting::AbstractHighlighter { Q_OBJECT Q_INTERFACES(KSyntaxHighlighting::AbstractHighlighter) diff --git a/src/plugins/texteditor/jsoneditor.cpp b/src/plugins/texteditor/jsoneditor.cpp index d49f5efacea..348df6f4d1f 100644 --- a/src/plugins/texteditor/jsoneditor.cpp +++ b/src/plugins/texteditor/jsoneditor.cpp @@ -151,7 +151,7 @@ public: JsonEditorFactory::JsonEditorFactory() { setId(JSON_EDITOR_ID); - setDisplayName(Tr::tr("Json Editor")); + setDisplayName(Tr::tr("JSON Editor")); addMimeType(JSON_MIME_TYPE); setEditorCreator([] { return new BaseTextEditor; }); diff --git a/src/plugins/texteditor/markdowneditor.cpp b/src/plugins/texteditor/markdowneditor.cpp index 0ad3f0ac2f3..935d215f321 100644 --- a/src/plugins/texteditor/markdowneditor.cpp +++ b/src/plugins/texteditor/markdowneditor.cpp @@ -487,7 +487,7 @@ MarkdownEditorFactory::MarkdownEditorFactory() editor->triggerInlineCode(); }); cmd = ActionManager::registerAction(&m_linkAction, LINK_ACTION, textContext); - cmd->setDescription(Tr::tr("Hyper Link")); + cmd->setDescription(Tr::tr("Hyperlink")); QObject::connect(&m_linkAction, &QAction::triggered, EditorManager::instance(), [] { auto editor = qobject_cast(EditorManager::currentEditor()); if (editor) diff --git a/src/plugins/texteditor/texteditor.cpp b/src/plugins/texteditor/texteditor.cpp index 39b38036055..43b0bddb3f7 100644 --- a/src/plugins/texteditor/texteditor.cpp +++ b/src/plugins/texteditor/texteditor.cpp @@ -1100,12 +1100,10 @@ TextEditorWidgetPrivate::TextEditorWidgetPrivate(TextEditorWidget *parent) connect(m_fileLineEnding, &QToolButton::clicked, ActionManager::instance(), [this] { QMenu *menu = new QMenu; - menu->addAction(tr("Unix Line Endings (LF)"), [this] { - q->selectLineEnding(TextFileFormat::LFLineTerminator); - }); - menu->addAction(tr("Windows Line Endings (CRLF)"), [this] { - q->selectLineEnding(TextFileFormat::CRLFLineTerminator); - }); + menu->addAction(Tr::tr("Unix Line Endings (LF)"), + [this] { q->selectLineEnding(TextFileFormat::LFLineTerminator); }); + menu->addAction(Tr::tr("Windows Line Endings (CRLF)"), + [this] { q->selectLineEnding(TextFileFormat::CRLFLineTerminator); }); menu->popup(QCursor::pos()); }); @@ -8247,10 +8245,12 @@ void TextEditorWidget::cut() void TextEditorWidget::selectAll() { - QPlainTextEdit::selectAll(); // Directly update the internal multi text cursor here to prevent calling setTextCursor. - // This would indirectly makes sure the cursor is visible which is not desired for select all. - const_cast(d->m_cursors).setCursors({QPlainTextEdit::textCursor()}); + // This would indirectly make sure the cursor is visible which is not desired for select all. + QTextCursor c = QPlainTextEdit::textCursor(); + c.select(QTextCursor::Document); + const_cast(d->m_cursors).setCursors({c}); + QPlainTextEdit::selectAll(); } void TextEditorWidget::copy() @@ -9240,10 +9240,15 @@ void TextEditorWidget::configureGenericHighlighter(const Utils::MimeType &mimeTy d->removeSyntaxInfoBar(); } -void TextEditorWidget::configureGenericHighlighter(const Highlighter::Definition &definition) +expected_str TextEditorWidget::configureGenericHighlighter(const QString &definitionName) { + Highlighter::Definition definition = TextEditor::Highlighter::definitionForName(definitionName); + if (!definition.isValid()) + return make_unexpected(Tr::tr("Could not find definition.")); + d->configureGenericHighlighter(definition); d->removeSyntaxInfoBar(); + return {}; } int TextEditorWidget::blockNumberForVisibleRow(int row) const diff --git a/src/plugins/texteditor/texteditor.h b/src/plugins/texteditor/texteditor.h index 51f3cadec88..36de773977d 100644 --- a/src/plugins/texteditor/texteditor.h +++ b/src/plugins/texteditor/texteditor.h @@ -6,7 +6,6 @@ #include "texteditor_global.h" #include "codeassist/assistenums.h" -#include "highlighter.h" #include "indenter.h" #include "refactoroverlay.h" #include "snippets/snippetparser.h" @@ -455,7 +454,7 @@ public: void configureGenericHighlighter(const Utils::MimeType &mimeType); /// Overwrite the current highlighter with a new generic highlighter based on the given definition - void configureGenericHighlighter(const Highlighter::Definition &definition); + Utils::expected_str configureGenericHighlighter(const QString &definitionName); Q_INVOKABLE void inSnippetMode(bool *active); // Used by FakeVim. diff --git a/src/plugins/valgrind/xmlprotocol/parser.cpp b/src/plugins/valgrind/xmlprotocol/parser.cpp index 33d78b3ef49..df464e33247 100644 --- a/src/plugins/valgrind/xmlprotocol/parser.cpp +++ b/src/plugins/valgrind/xmlprotocol/parser.cpp @@ -126,11 +126,11 @@ private: QMutexLocker locker(&m_mutex); while (true) { if (m_state == State::Canceled) - return make_unexpected(Tr::tr("Parsing canceled")); + return make_unexpected(Tr::tr("Parsing canceled.")); if (!m_inputBuffer.isEmpty()) return std::exchange(m_inputBuffer, {}); if (m_state == State::Finalized) - return make_unexpected(Tr::tr("Premature end of XML document")); + return make_unexpected(Tr::tr("Premature end of XML document.")); m_waitCondition.wait(&m_mutex); } QTC_CHECK(false); @@ -198,7 +198,7 @@ static qint64 parseInt64(const QString &str, const QString &context) bool ok; const quint64 v = str.toLongLong(&ok); if (!ok) - throw ParserException{Tr::tr("Could not parse hex number from \"%1\" (%2)").arg(str, context)}; + throw ParserException{Tr::tr("Could not parse hex number from \"%1\" (%2).").arg(str, context)}; return v; } @@ -238,7 +238,7 @@ QString ParserThread::blockingReadElementText() //affects at least Qt <= 4.7.1. Reported as QTBUG-14661. if (!m_reader.isStartElement()) - throw ParserException{Tr::tr("Trying to read element text although current position is not start of element")}; + throw ParserException{Tr::tr("Trying to read element text although current position is not start of element.")}; QString result; diff --git a/src/plugins/vcpkg/vcpkgmanifesteditor.cpp b/src/plugins/vcpkg/vcpkgmanifesteditor.cpp index 94774ab7183..3e90b0f7076 100644 --- a/src/plugins/vcpkg/vcpkgmanifesteditor.cpp +++ b/src/plugins/vcpkg/vcpkgmanifesteditor.cpp @@ -99,7 +99,7 @@ public: { const QIcon vcpkgIcon = Utils::Icon({{":/vcpkg/images/vcpkgicon.png", Utils::Theme::IconsBaseColor}}).icon(); - m_searchPkgAction = toolBar()->addAction(vcpkgIcon, Tr::tr("Add vcpkg package...")); + m_searchPkgAction = toolBar()->addAction(vcpkgIcon, Tr::tr("Add vcpkg Package...")); connect(m_searchPkgAction, &QAction::triggered, this, [this] { const Search::VcpkgManifest package = Search::showVcpkgPackageSearchDialog(documentToManifest()); @@ -111,7 +111,7 @@ public: }); const QIcon cmakeIcon = ProjectExplorer::Icons::CMAKE_LOGO_TOOLBAR.icon(); - m_cmakeCodeAction = toolBar()->addAction(cmakeIcon, Tr::tr("CMake code...")); + m_cmakeCodeAction = toolBar()->addAction(cmakeIcon, Tr::tr("CMake Code...")); connect(m_cmakeCodeAction, &QAction::triggered, this, [this] { CMakeCodeDialog dlg(documentToManifest().dependencies); dlg.exec(); diff --git a/src/plugins/vcpkg/vcpkgplugin.cpp b/src/plugins/vcpkg/vcpkgplugin.cpp index 2a0153d49ad..9dc717e08e1 100644 --- a/src/plugins/vcpkg/vcpkgplugin.cpp +++ b/src/plugins/vcpkg/vcpkgplugin.cpp @@ -5,6 +5,7 @@ #include "vcpkg_test.h" #endif // WITH_TESTS #include "vcpkgmanifesteditor.h" +#include "vcpkgsettings.h" #include @@ -35,6 +36,8 @@ public: #endif } + virtual void extensionsInitialized() final { settings().setVcpkgRootEnvironmentVariable(); } + std::unique_ptr d; }; diff --git a/src/plugins/vcpkg/vcpkgsearch.cpp b/src/plugins/vcpkg/vcpkgsearch.cpp index ddf42bd8a61..d5e300893f4 100644 --- a/src/plugins/vcpkg/vcpkgsearch.cpp +++ b/src/plugins/vcpkg/vcpkgsearch.cpp @@ -60,7 +60,7 @@ VcpkgPackageSearchDialog::VcpkgPackageSearchDialog(const VcpkgManifest &preexist , m_projectManifest(preexistingPackages) { resize(920, 400); - setWindowTitle(Tr::tr("Add vcpkg package")); + setWindowTitle(Tr::tr("Add vcpkg Package")); m_packagesFilter = new FancyLineEdit; m_packagesFilter->setFiltering(true); @@ -88,6 +88,7 @@ VcpkgPackageSearchDialog::VcpkgPackageSearchDialog(const VcpkgManifest &preexist m_buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel); + // clang-format off using namespace Layouting; Column { Row { @@ -97,9 +98,9 @@ VcpkgPackageSearchDialog::VcpkgPackageSearchDialog(const VcpkgManifest &preexist m_packagesList, }, Group { - title(Tr::tr("Package details")), + title(Tr::tr("Package Details")), Form { - Tr::tr("Name:"), m_vcpkgName, br, + Tr::tr("Name:"), m_vcpkgName, br, Tr::tr("Version:"), m_vcpkgVersion, br, Tr::tr("License:"), m_vcpkgLicense, br, Tr::tr("Description:"), m_vcpkgDescription, br, @@ -109,6 +110,7 @@ VcpkgPackageSearchDialog::VcpkgPackageSearchDialog(const VcpkgManifest &preexist }, Row { m_infoLabel, m_buttonBox }, }.attachTo(this); + // clang-format on m_allPackages = vcpkgManifests(settings().vcpkgRoot()); diff --git a/src/plugins/vcpkg/vcpkgsettings.cpp b/src/plugins/vcpkg/vcpkgsettings.cpp index da91ef486b6..4ea4496519d 100644 --- a/src/plugins/vcpkg/vcpkgsettings.cpp +++ b/src/plugins/vcpkg/vcpkgsettings.cpp @@ -37,11 +37,13 @@ VcpkgSettings::VcpkgSettings() vcpkgRoot.setExpectedKind(PathChooser::ExistingDirectory); FilePath defaultPath = Environment::systemEnvironment().searchInPath(Constants::VCPKG_COMMAND) .parentDir(); - if (defaultPath.isDir()) + if (!defaultPath.isDir()) defaultPath = FilePath::fromUserInput(qtcEnvironmentVariable(Constants::ENVVAR_VCPKG_ROOT)); if (defaultPath.isDir()) vcpkgRoot.setDefaultValue(defaultPath.toUserOutput()); + connect(this, &AspectContainer::applied, this, &VcpkgSettings::setVcpkgRootEnvironmentVariable); + setLayouter([this] { using namespace Layouting; auto websiteButton = new QToolButton; @@ -70,6 +72,12 @@ VcpkgSettings::VcpkgSettings() readSettings(); } +void VcpkgSettings::setVcpkgRootEnvironmentVariable() +{ + // Set VCPKG_ROOT environment variable so that auto-setup.cmake would pick it up + Environment::modifySystemEnvironment({{Constants::ENVVAR_VCPKG_ROOT, vcpkgRoot.value()}}); +} + class VcpkgSettingsPage : public Core::IOptionsPage { public: diff --git a/src/plugins/vcpkg/vcpkgsettings.h b/src/plugins/vcpkg/vcpkgsettings.h index dd266ad3716..acb41110b40 100644 --- a/src/plugins/vcpkg/vcpkgsettings.h +++ b/src/plugins/vcpkg/vcpkgsettings.h @@ -12,6 +12,8 @@ class VcpkgSettings : public Utils::AspectContainer public: VcpkgSettings(); + void setVcpkgRootEnvironmentVariable(); + Utils::FilePathAspect vcpkgRoot{this}; }; diff --git a/src/plugins/vcsbase/vcsbasesubmiteditor.cpp b/src/plugins/vcsbase/vcsbasesubmiteditor.cpp index 3b78546526e..ccf56e55d29 100644 --- a/src/plugins/vcsbase/vcsbasesubmiteditor.cpp +++ b/src/plugins/vcsbase/vcsbasesubmiteditor.cpp @@ -39,18 +39,19 @@ #include #include +#include +#include +#include #include #include +#include #include #include +#include #include #include #include #include -#include -#include -#include -#include #include @@ -472,13 +473,12 @@ bool VcsBaseSubmitEditor::promptSubmit(VcsBasePluginPrivate *plugin) mb.setWindowTitle(plugin->commitAbortTitle()); mb.setIcon(QMessageBox::Warning); mb.setText(plugin->commitAbortMessage()); - mb.setStandardButtons(QMessageBox::Close | QMessageBox::Cancel); - // On Windows there is no mnemonic for Close. Set it explicitly. - mb.button(QMessageBox::Close)->setText(Tr::tr("&Close")); - mb.button(QMessageBox::Cancel)->setText(Tr::tr("&Keep Editing")); - mb.setDefaultButton(QMessageBox::Cancel); + QPushButton *closeButton = mb.addButton(Tr::tr("&Close"), QMessageBox::AcceptRole); + QPushButton *keepButton = mb.addButton(Tr::tr("&Keep Editing"), QMessageBox::RejectRole); + mb.setDefaultButton(keepButton); + mb.setEscapeButton(keepButton); mb.exec(); - return mb.result() == QMessageBox::Close; + return mb.clickedButton() == closeButton; } QString VcsBaseSubmitEditor::promptForNickName() diff --git a/src/plugins/webassembly/webassemblytoolchain.cpp b/src/plugins/webassembly/webassemblytoolchain.cpp index 3174e0e9548..925b7f5dbfb 100644 --- a/src/plugins/webassembly/webassemblytoolchain.cpp +++ b/src/plugins/webassembly/webassemblytoolchain.cpp @@ -42,6 +42,12 @@ static const Abi &toolChainAbi() static void addRegisteredMinGWToEnvironment(Environment &env) { + if (!ToolChainManager::isLoaded()) { + // Avoid querying the ToolChainManager before it is loaded, which is the case during + // toolchain restoration. The compiler version can be determined without MinGW in path. + return; + } + const ToolChain *toolChain = ToolChainManager::toolChain([](const ToolChain *t){ return t->typeId() == ProjectExplorer::Constants::MINGW_TOOLCHAIN_TYPEID; }); @@ -54,7 +60,7 @@ void WebAssemblyToolChain::addToEnvironment(Environment &env) const const FilePath emSdk = settings().emSdk(); WebAssemblyEmSdk::addToEnvironment(emSdk, env); if (env.osType() == OsTypeWindows) - addRegisteredMinGWToEnvironment(env); + addRegisteredMinGWToEnvironment(env); // qmake based builds require [mingw32-]make.exe } WebAssemblyToolChain::WebAssemblyToolChain() : diff --git a/src/share/3rdparty/package-manager/auto-setup.cmake b/src/share/3rdparty/package-manager/auto-setup.cmake index eafdb91aa68..bae90ee6429 100644 --- a/src/share/3rdparty/package-manager/auto-setup.cmake +++ b/src/share/3rdparty/package-manager/auto-setup.cmake @@ -102,11 +102,11 @@ macro(qtc_auto_setup_conan) project(conan-setup) if (${conan_version} VERSION_GREATER_EQUAL 2.0) + set(CONAN_COMMAND \"${conan_program}\") include(\"${CMAKE_CURRENT_LIST_DIR}/conan_provider.cmake\") conan_profile_detect_default() detect_host_profile(\"${CMAKE_BINARY_DIR}/conan-dependencies/conan_host_profile\") - set(CONAN_COMMAND \"${conan_program}\") conan_install( -pr \"${CMAKE_BINARY_DIR}/conan-dependencies/conan_host_profile\" --build=${QT_CREATOR_CONAN_BUILD_POLICY} @@ -119,6 +119,10 @@ macro(qtc_auto_setup_conan) file(WRITE \"${CMAKE_BINARY_DIR}/conan-dependencies/conan_paths.cmake\" \" list(PREPEND CMAKE_PREFIX_PATH \\\"\${CONAN_GENERATORS_FOLDER}\\\") list(PREPEND CMAKE_MODULE_PATH \\\"\${CONAN_GENERATORS_FOLDER}\\\") + list(REMOVE_DUPLICATES CMAKE_PREFIX_PATH) + list(REMOVE_DUPLICATES CMAKE_MODULE_PATH) + set(CMAKE_PREFIX_PATH \\\"\\\${CMAKE_PREFIX_PATH}\\\" CACHE STRING \\\"\\\" FORCE) + set(CMAKE_MODULE_PATH \\\"\\\${CMAKE_MODULE_PATH}\\\" CACHE STRING \\\"\\\" FORCE) \") endif() else() @@ -165,7 +169,7 @@ macro(qtc_auto_setup_vcpkg) if (EXISTS "${CMAKE_SOURCE_DIR}/vcpkg.json" AND NOT QT_CREATOR_SKIP_VCPKG_SETUP) option(QT_CREATOR_SKIP_VCPKG_SETUP "Skip Qt Creator's vcpkg package manager auto-setup" OFF) - find_program(vcpkg_program vcpkg) + find_program(vcpkg_program vcpkg $ENV{VCPKG_ROOT} ${CMAKE_SOURCE_DIR}/vcpkg) if (NOT vcpkg_program) message(WARNING "Qt Creator: vcpkg executable not found. " "Package manager auto-setup will be skipped. " @@ -222,6 +226,14 @@ macro(qtc_auto_setup_vcpkg) endif() set(CMAKE_TOOLCHAIN_FILE "${CMAKE_BINARY_DIR}/vcpkg-dependencies/toolchain.cmake" CACHE PATH "" FORCE) + + # Save CMAKE_PREFIX_PATH and CMAKE_MODULE_PATH as cache variables + if (CMAKE_VERSION GREATER_EQUAL "3.19") + cmake_language(DEFER CALL list REMOVE_DUPLICATES CMAKE_PREFIX_PATH) + cmake_language(DEFER CALL list REMOVE_DUPLICATES CMAKE_MODULE_PATH) + cmake_language(DEFER CALL set CMAKE_PREFIX_PATH "${CMAKE_PREFIX_PATH}" CACHE STRING "" FORCE) + cmake_language(DEFER CALL set CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}" CACHE STRING "" FORCE) + endif() endif() endmacro() qtc_auto_setup_vcpkg()