diff options
62 files changed, 446 insertions, 292 deletions
diff --git a/cmake/QtCreatorAPI.cmake b/cmake/QtCreatorAPI.cmake index 0f512b9ef8..536fbab357 100644 --- a/cmake/QtCreatorAPI.cmake +++ b/cmake/QtCreatorAPI.cmake @@ -122,7 +122,7 @@ function(get_default_defines varName allow_ascii_casts) endfunction() function(add_qtc_library name) - cmake_parse_arguments(_arg "STATIC;OBJECT;SHARED;SKIP_TRANSLATION;ALLOW_ASCII_CASTS;FEATURE_INFO;SKIP_PCH" + cmake_parse_arguments(_arg "STATIC;OBJECT;SHARED;SKIP_TRANSLATION;ALLOW_ASCII_CASTS;FEATURE_INFO;SKIP_PCH;EXCLUDE_FROM_INSTALL" "DESTINATION;COMPONENT;SOURCES_PREFIX;BUILD_DEFAULT" "CONDITION;DEPENDS;PUBLIC_DEPENDS;DEFINES;PUBLIC_DEFINES;INCLUDES;PUBLIC_INCLUDES;SOURCES;EXPLICIT_MOC;SKIP_AUTOMOC;EXTRA_TRANSLATIONS;PROPERTIES" ${ARGN} ) @@ -272,7 +272,7 @@ function(add_qtc_library name) set(COMPONENT_OPTION "COMPONENT" "${_arg_COMPONENT}") endif() - if (NOT QTC_STATIC_BUILD OR _arg_SHARED) + if (NOT _arg_EXCLUDE_FROM_INSTALL AND (NOT QTC_STATIC_BUILD OR _arg_SHARED)) install(TARGETS ${name} EXPORT QtCreator RUNTIME diff --git a/cmake/QtCreatorIDEBranding.cmake b/cmake/QtCreatorIDEBranding.cmake index 2a2e02fd17..0b9447a85d 100644 --- a/cmake/QtCreatorIDEBranding.cmake +++ b/cmake/QtCreatorIDEBranding.cmake @@ -1,6 +1,6 @@ -set(IDE_VERSION "9.0.83") # The IDE version. -set(IDE_VERSION_COMPAT "9.0.83") # The IDE Compatibility version. -set(IDE_VERSION_DISPLAY "10.0.0-beta2") # The IDE display version. +set(IDE_VERSION "9.0.84") # The IDE version. +set(IDE_VERSION_COMPAT "9.0.84") # The IDE Compatibility version. +set(IDE_VERSION_DISPLAY "10.0.0-rc1") # The IDE display version. set(IDE_COPYRIGHT_YEAR "2023") # The IDE current copyright year. set(IDE_SETTINGSVARIANT "QtProject") # The IDE settings variation. diff --git a/cmake/QtCreatorTranslations.cmake b/cmake/QtCreatorTranslations.cmake index 0c1e2e35c5..a900efa18f 100644 --- a/cmake/QtCreatorTranslations.cmake +++ b/cmake/QtCreatorTranslations.cmake @@ -49,7 +49,7 @@ function(_extract_ts_data_from_targets outprefix) endfunction() function(_create_ts_custom_target name) - cmake_parse_arguments(_arg "" "FILE_PREFIX;TS_TARGET_PREFIX" "LANGUAGES;SOURCES;INCLUDES" ${ARGN}) + cmake_parse_arguments(_arg "EXCLUDE_FROM_ALL" "FILE_PREFIX;TS_TARGET_PREFIX" "SOURCES;INCLUDES" ${ARGN}) if (_arg_UNPARSED_ARGUMENTS) message(FATAL_ERROR "Invalid parameters to _create_ts_custom_target: ${_arg_UNPARSED_ARGUMENTS}.") endif() @@ -58,14 +58,7 @@ function(_create_ts_custom_target name) set(_arg_TS_TARGET_PREFIX "ts_") endif() - set(ts_languages ${_arg_LANGUAGES}) - if (NOT ts_languages) - set(ts_languages "${name}") - endif() - - foreach(l IN ITEMS ${ts_languages}) - list(APPEND ts_files "${CMAKE_CURRENT_SOURCE_DIR}/${_arg_FILE_PREFIX}_${l}.ts") - endforeach() + set(ts_file "${CMAKE_CURRENT_SOURCE_DIR}/${_arg_FILE_PREFIX}_${l}.ts") set(_sources "${_arg_SOURCES}") list(SORT _sources) @@ -91,35 +84,46 @@ function(_create_ts_custom_target name) file(WRITE "${ts_file_list}" "${_sources_str}\n${_includes_str}\n") add_custom_target("${_arg_TS_TARGET_PREFIX}${name}" - COMMAND Qt::lupdate -locations relative -no-ui-lines "@${ts_file_list}" -ts ${ts_files} + COMMAND Qt::lupdate -locations relative -no-ui-lines "@${ts_file_list}" -ts ${ts_file} WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" - COMMENT "Generate .ts files, with obsolete translations and files and line numbers" + COMMENT "Generate .ts file (${name}), with obsolete translations and files and line numbers" DEPENDS ${_sources} VERBATIM) add_custom_target("${_arg_TS_TARGET_PREFIX}${name}_no_locations" - COMMAND Qt::lupdate -locations none -no-ui-lines "@${ts_file_list}" -ts ${ts_files} + COMMAND Qt::lupdate -locations none -no-ui-lines "@${ts_file_list}" -ts ${ts_file} WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" - COMMENT "Generate .ts files, with obsolete translations, without files and line numbers" + COMMENT "Generate .ts file (${name}), with obsolete translations, without files and line numbers" DEPENDS ${_sources} VERBATIM) - # Add cleaned target only for single-ts targets # Uses lupdate + convert instead of just lupdate with '-locations none -no-obsolete' # to keep the same sorting as the non-'cleaned' target and therefore keep the diff small - list(LENGTH ts_files file_count) - if(file_count EQUAL 1) - # get path for lconvert... - get_target_property(_lupdate_binary Qt::lupdate IMPORTED_LOCATION) - get_filename_component(_bin_dir ${_lupdate_binary} DIRECTORY) - - add_custom_target("${_arg_TS_TARGET_PREFIX}${name}_cleaned" - COMMAND Qt::lupdate -locations relative -no-ui-lines "@${ts_file_list}" -ts ${ts_files} - COMMAND ${_bin_dir}/lconvert -locations none -no-ui-lines -no-obsolete ${ts_files} -o ${ts_files} - WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" - COMMENT "Generate .ts files, remove obsolete and vanished translations, and do not add files and line number" - DEPENDS ${_sources} - VERBATIM) + # get path for lconvert... + get_target_property(_lupdate_binary Qt::lupdate IMPORTED_LOCATION) + get_filename_component(_bin_dir ${_lupdate_binary} DIRECTORY) + + add_custom_target("${_arg_TS_TARGET_PREFIX}${name}_cleaned" + COMMAND Qt::lupdate -locations relative -no-ui-lines "@${ts_file_list}" -ts ${ts_file} + COMMAND ${_bin_dir}/lconvert -locations none -no-ui-lines -no-obsolete ${ts_file} -o ${ts_file} + WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" + COMMENT "Generate .ts file (${name}), remove obsolete and vanished translations, and do not add files and line number" + DEPENDS ${_sources} + VERBATIM) + + if (NOT _arg_EXCLUDE_FROM_ALL) + if (NOT TARGET ts_all_cleaned) + add_custom_target(ts_all_cleaned + COMMENT "Generate .ts files, remove obsolete and vanished translations, and do not add files and line numbers") + add_custom_target(ts_all + COMMENT "Generate .ts files, with obsolete translations and files and line numbers") + add_custom_target(ts_all_no_locations + COMMENT "Generate .ts files, with obsolete translations, without files and line numbers") + endif() + + add_dependencies(ts_all_cleaned ${_arg_TS_TARGET_PREFIX}${name}_cleaned) + add_dependencies(ts_all ${_arg_TS_TARGET_PREFIX}${name}) + add_dependencies(ts_all_no_locations ${_arg_TS_TARGET_PREFIX}${name}_no_locations) endif() endfunction() @@ -161,7 +165,8 @@ function(add_translation_targets file_prefix) _create_ts_custom_target(untranslated FILE_PREFIX "${file_prefix}" TS_TARGET_PREFIX "${_arg_TS_TARGET_PREFIX}" - SOURCES ${_to_process_sources} ${_arg_SOURCES} INCLUDES ${_to_process_includes} ${_arg_INCLUDES}) + SOURCES ${_to_process_sources} ${_arg_SOURCES} INCLUDES ${_to_process_includes} ${_arg_INCLUDES} + EXCLUDE_FROM_ALL) if (NOT TARGET "${_arg_ALL_QM_TARGET}") add_custom_target("${_arg_ALL_QM_TARGET}" ALL COMMENT "Generate .qm-files") @@ -187,12 +192,4 @@ function(add_translation_targets file_prefix) add_dependencies("${_arg_ALL_QM_TARGET}" "${_arg_QM_TARGET_PREFIX}${l}") endforeach() - - _create_ts_custom_target(all - LANGUAGES ${_arg_LANGUAGES} - TS_TARGET_PREFIX "${_arg_TS_TARGET_PREFIX}" - FILE_PREFIX "${file_prefix}" - SOURCES ${_to_process_sources} ${_arg_SOURCES} - INCLUDES ${_to_process_includes} ${_arg_INCLUDES} - ) endfunction() diff --git a/dist/changelog/changes-10.0.0.md b/dist/changelog/changes-10.0.0.md index 53bcd7e162..27577ae85a 100644 --- a/dist/changelog/changes-10.0.0.md +++ b/dist/changelog/changes-10.0.0.md @@ -33,7 +33,8 @@ Editing * Added renaming of includes when renaming `.ui` files (QTCREATORBUG-14259) * Added automatic refactoring of C++ code when forms in `.ui` files are renamed (QTCREATORBUG-1179) -* Added the option to ignore files for indexing (QTCREATORBUG-28313) +* Added the option to ignore files for indexing to `Preferences > C++ > + Code Model` (QTCREATORBUG-28313) * Added `Tools > C++ > Find Unused Functions`, and `Find Unused C/C++ Functions` to the `Projects` view context menu (QTCREATORBUG-6772) * Fixed text codec when rewriting headers as part of renaming @@ -61,9 +62,11 @@ Editing ### QML * Updated code model to Qt 6.5 -* Added experimental support for the QML language server +* Added experimental support for the QML language server (qmlls) to `Edit > + Preferences > Qt Quick > QML/JS Editing` * Added a color preview tooltip (QTCREATORBUG-28446) -* Added the option to apply `qmlformat` on file save (QTCREATORBUG-28192, +* Added the option to apply `qmlformat` on file save to `Edit > Preferences > + Qt Quick > QML/JS Editing > Command` (QTCREATORBUG-28192, QTCREATORBUG-26602) * Added `Follow Symbol` for QRC paths in string literals (QTCREATORBUG-28087) * Adapted the Qt Quick Application wizard template to new features in Qt 6.4 @@ -79,24 +82,28 @@ Editing Projects -------- -* Moved the preference page for `Devices` to below `Kits` +* Moved the `Preferences` page for `Devices` to below `Kits` * Added `Build > Run Generator` for exporting projects to other build systems (QTCREATORBUG-28149) * Added the option to browse remote file systems for remote builds and targets -* Added support for opening remote terminals + in `Projects > Build Settings > Build directory > Browse`, for example +* Added support for opening remote terminals from `Projects > Build Settings > + Build Environment > Open Terminal` * Fixed that wizards did not create target directories (QTCREATORBUG-28346) * Fixed that absolute paths could be shown when relative paths would be preferable (QTCREATORBUG-288) ### CMake -* Added a deployment method with `cmake --install` (QTCREATORBUG-25880) -* Added the option to use `cmake-format` for CMake files +* Added a deployment method with `cmake --install` to `Projects > Run Settings > + Add Deploy Step > CMake Install` (QTCREATORBUG-25880) +* Added the option to use `cmake-format` for CMake files to `Edit > Preferences > + CMake > Formatter` ([cmake-format Documentation](https://cmake-format.readthedocs.io/en/latest/)) -* Added the option to show advanced configure items by default +* Added `Show advanced options by default` to `Edit > Preferences > CMake > Tools` * Added support for the `external` strategy for the architecture and toolset of presets (QTCREATORBUG-28693) -* Moved `Autorun CMake` to global settings +* Moved `Autorun CMake` to `Edit > Preferences > CMake > General` * Changed the environment for running CMake to be based on the build environment by default (QTCREATORBUG-28513) * Fixed that `Package manager auto setup` created a dependency of the project @@ -112,10 +119,6 @@ Projects * Removed the wizard template for dynamically loaded `.ui` projects (QTCREATORBUG-25807) -### Qt Quick UI Prototype - -* Added support for running on remote Linux devices - Debugging --------- @@ -180,6 +183,10 @@ Platforms * Removed service management from the manifest editor (QTCREATORBUG-28024) * Fixed `Open package location after build` (QTCREATORBUG-28791) +### Boot to Qt + +* Fixed the deployment of Qt Quick UI Prototype projects + ### Docker * Added support for the remote code model via a remote Clangd diff --git a/dist/copyright_template.txt b/dist/copyright_template.txt index ae24032a65..974656016d 100644 --- a/dist/copyright_template.txt +++ b/dist/copyright_template.txt @@ -1,3 +1,3 @@ -// Copyright (C) 2022 The Qt Company Ltd. +// Copyright (C) 2023 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 diff --git a/doc/qtcreator/images/qtcreator-build-settings-cmake-configure.webp b/doc/qtcreator/images/qtcreator-build-settings-cmake-configure.webp Binary files differnew file mode 100644 index 0000000000..4b38b162f4 --- /dev/null +++ b/doc/qtcreator/images/qtcreator-build-settings-cmake-configure.webp diff --git a/doc/qtcreator/images/qtcreator-build-settings-cmake-current.webp b/doc/qtcreator/images/qtcreator-build-settings-cmake-current.webp Binary files differnew file mode 100644 index 0000000000..24278f8dcc --- /dev/null +++ b/doc/qtcreator/images/qtcreator-build-settings-cmake-current.webp diff --git a/doc/qtcreator/images/qtcreator-build-settings-cmake-initial.webp b/doc/qtcreator/images/qtcreator-build-settings-cmake-initial.webp Binary files differnew file mode 100644 index 0000000000..cee22f09f6 --- /dev/null +++ b/doc/qtcreator/images/qtcreator-build-settings-cmake-initial.webp diff --git a/doc/qtcreator/images/qtcreator-clang-tidy-view.webp b/doc/qtcreator/images/qtcreator-clang-tidy-view.webp Binary files differnew file mode 100644 index 0000000000..1a914a683a --- /dev/null +++ b/doc/qtcreator/images/qtcreator-clang-tidy-view.webp diff --git a/doc/qtcreator/images/qtcreator-cmake-build-settings-initial.png b/doc/qtcreator/images/qtcreator-cmake-build-settings-initial.png Binary files differdeleted file mode 100644 index 3392c8ee67..0000000000 --- a/doc/qtcreator/images/qtcreator-cmake-build-settings-initial.png +++ /dev/null diff --git a/doc/qtcreator/images/qtcreator-cmake-build-settings.png b/doc/qtcreator/images/qtcreator-cmake-build-settings.png Binary files differdeleted file mode 100644 index 9c88b064d6..0000000000 --- a/doc/qtcreator/images/qtcreator-cmake-build-settings.png +++ /dev/null diff --git a/doc/qtcreator/images/qtcreator-files-to-analyze.png b/doc/qtcreator/images/qtcreator-files-to-analyze.png Binary files differdeleted file mode 100644 index add972f337..0000000000 --- a/doc/qtcreator/images/qtcreator-files-to-analyze.png +++ /dev/null diff --git a/doc/qtcreator/images/qtcreator-files-to-analyze.webp b/doc/qtcreator/images/qtcreator-files-to-analyze.webp Binary files differnew file mode 100644 index 0000000000..c219e48ec8 --- /dev/null +++ b/doc/qtcreator/images/qtcreator-files-to-analyze.webp diff --git a/doc/qtcreator/images/qtcreator-pprunsettings.png b/doc/qtcreator/images/qtcreator-pprunsettings.png Binary files differdeleted file mode 100644 index dab1d9e1cf..0000000000 --- a/doc/qtcreator/images/qtcreator-pprunsettings.png +++ /dev/null diff --git a/doc/qtcreator/images/qtcreator-preferences-cmake-formatter.webp b/doc/qtcreator/images/qtcreator-preferences-cmake-formatter.webp Binary files differnew file mode 100644 index 0000000000..a61b2d7270 --- /dev/null +++ b/doc/qtcreator/images/qtcreator-preferences-cmake-formatter.webp diff --git a/doc/qtcreator/images/qtcreator-preferences-cmake-general.png b/doc/qtcreator/images/qtcreator-preferences-cmake-general.png Binary files differdeleted file mode 100644 index fc096178c7..0000000000 --- a/doc/qtcreator/images/qtcreator-preferences-cmake-general.png +++ /dev/null diff --git a/doc/qtcreator/images/qtcreator-preferences-cmake-general.webp b/doc/qtcreator/images/qtcreator-preferences-cmake-general.webp Binary files differnew file mode 100644 index 0000000000..2eef4e57ee --- /dev/null +++ b/doc/qtcreator/images/qtcreator-preferences-cmake-general.webp diff --git a/doc/qtcreator/images/qtcreator-preferences-cmake-tools.png b/doc/qtcreator/images/qtcreator-preferences-cmake-tools.png Binary files differdeleted file mode 100644 index c7abce1977..0000000000 --- a/doc/qtcreator/images/qtcreator-preferences-cmake-tools.png +++ /dev/null diff --git a/doc/qtcreator/images/qtcreator-preferences-cmake-tools.webp b/doc/qtcreator/images/qtcreator-preferences-cmake-tools.webp Binary files differnew file mode 100644 index 0000000000..2e5e7d4ef9 --- /dev/null +++ b/doc/qtcreator/images/qtcreator-preferences-cmake-tools.webp diff --git a/doc/qtcreator/images/qtcreator-settings-run-desktop.webp b/doc/qtcreator/images/qtcreator-settings-run-desktop.webp Binary files differnew file mode 100644 index 0000000000..989eaee8a7 --- /dev/null +++ b/doc/qtcreator/images/qtcreator-settings-run-desktop.webp diff --git a/doc/qtcreator/images/qtcreator-settings-run.png b/doc/qtcreator/images/qtcreator-settings-run.png Binary files differdeleted file mode 100644 index 3df81e9daf..0000000000 --- a/doc/qtcreator/images/qtcreator-settings-run.png +++ /dev/null diff --git a/doc/qtcreator/images/qtcreator-settings-run.webp b/doc/qtcreator/images/qtcreator-settings-run.webp Binary files differnew file mode 100644 index 0000000000..b998f92bdb --- /dev/null +++ b/doc/qtcreator/images/qtcreator-settings-run.webp diff --git a/doc/qtcreator/src/analyze/creator-clang-static-analyzer.qdoc b/doc/qtcreator/src/analyze/creator-clang-static-analyzer.qdoc index 5723591dc9..06f5e6275b 100644 --- a/doc/qtcreator/src/analyze/creator-clang-static-analyzer.qdoc +++ b/doc/qtcreator/src/analyze/creator-clang-static-analyzer.qdoc @@ -1,4 +1,4 @@ -// Copyright (C) 2020 The Qt Company Ltd. +// Copyright (C) 2023 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only // ********************************************************************** @@ -31,73 +31,74 @@ \endlist \note The Clang static analyzer checks are a part of Clang-Tidy. To use - the checks you must create a custom configuration for the Clang tools and + the checks, you must create a custom configuration for the Clang tools and enable them for Clang-Tidy. - Clang tools are delivered and installed with \QC, and therefore you do not - need to set them up separately. + \QC comes with the Clang tools, so you do not need to set them up separately. In addition to running the tools to collect diagnostics, you can select \inlineimage icons/open.png to load diagnostics from \l{https://yaml.org/}{YAML} files that you exported using the \c {-export fixes} option. - \section1 Running Clang Tools + \section1 Running Clang-Tidy and Clazy - To run the Clang tools to analyze the currently open file: + To run Clang-Tidy or Clazy to analyze the currently open file: \list \li Select the \inlineimage icons/debugger_singleinstructionmode.png - (\uicontrol {Analyze File}) button on the editor toolbar. + (\uicontrol {Analyze File}) button on the editor toolbar, and then + select the tool: \uicontrol {Clang-Tidy} or \uicontrol {Clazy}. \li Select \uicontrol Tools > \uicontrol {C++} > - \uicontrol {Analyze Current File}. + \uicontrol {Analyze Current File with Clang-Tidy} or + \uicontrol {Analyze Current File with Clazy}. \endlist - To run the Clang tools to analyze an open project: + To run Clang-Tidy or Clazy to analyze an open project: \list 1 - \li Select \uicontrol Analyze > \uicontrol {Clang-Tidy and Clazy}. - - \image qtcreator-files-to-analyze.png "Files to Analyze dialog" + \li Select \uicontrol Analyze > \uicontrol {Clang-Tidy} or + \uicontrol {Clazy}. \li Select the files to apply the checks to. + \image qtcreator-files-to-analyze.webp {Files to Analyze dialog} + \li Select \uicontrol Analyze to start the checks. \endlist - The found issues are displayed in the \uicontrol {Clang-Tidy and Clazy} - view: + The \uicontrol {Clang-Tidy} or \uicontrol {Clazy} view shows the issues: - \image qtcreator-clang-tools.png "Clang-Tidy and Clazy view" + \image qtcreator-clang-tidy-view.webp {Clang-Tidy view} \note If you select \uicontrol Debug in the mode selector to open the - \uicontrol Debug mode and then select \uicontrol {Clang-Tidy and Clazy}, - you must select the \inlineimage icons/qtcreator-analyze-start-button.png - (\uicontrol Start) button to open the \uicontrol {Files to Analyze} - dialog. + \uicontrol Debug mode and then select \uicontrol {Clang-Tidy} or + \uicontrol {Clazy}, you must select the + \inlineimage icons/qtcreator-analyze-start-button.png + (\uicontrol Start) button to open the \uicontrol {Files to Analyze} dialog. Double-click an issue to move to the location where the issue appears in the code editor. If a fixit exists for an issue, you can select the check box next to the issue to schedule it for fixing. Select the \uicontrol {Select Fixits} - check box to select all fixits. You can see the status of an issue by - hovering the mouse pointer over the icon next to the check box. + check box to select all fixits. To see the status of an issue, hover the + mouse pointer over the icon next to the check box. To see more information about an issue that is marked with the \inlineimage icons/refactormarker.png icon, hover the mouse pointer over the line. - You can disable particular type of checks either globally or for a - particular project by selecting \uicontrol {Disable This Check} or + To disable checks of a particular type either globally or for a + particular project, select \uicontrol {Disable This Check} or \uicontrol {Disable These Checks} in the context menu. Select the \inlineimage icons/settings.png button to customize Clang diagnostics for the current project. - \image qtcreator-clang-tools-options-customized.png "Clang Tools customized settings" + \image qtcreator-clang-tools-options-customized.png {Clang Tools customized settings} To restore the global settings, select \uicontrol {Restore Global Settings}. To view and modify the global settings, select the link in @@ -113,14 +114,14 @@ \li Select \uicontrol Edit > \uicontrol Preferences > \uicontrol Analyzer > \uicontrol {Clang Tools}. - \image qtcreator-clang-tools-options.png "Clang Tools preferences" + \image qtcreator-clang-tools-options.png {Clang Tools preferences} \li In the \uicontrol Clang-Tidy and \uicontrol Clazy-Standalone fields, set the paths to the executables to use. \li To build the project before running the Clang tools, select the \uicontrol {Build the project before analysis} check box. The Clang - tools do not require the project to be built before analysis, but + tools do not require that you build the project before analysis, but they might display misleading warnings about files missing that are generated during the build. For big projects, not building the project might save some time. @@ -137,11 +138,11 @@ \uicontrol {Diagnostic Configurations} dialog, where you can select and edit the checks to perform. - \image qtcreator-clang-tools-diagnostics-configuration.png "Diagnostics Configuration dialog" + \image qtcreator-clang-tools-diagnostics-configuration.png {Diagnostics Configuration dialog} \li Select \uicontrol Copy to copy the selected diagnostics for editing. - \image qtcreator-clang-copy-diagnostic-configuration.png "Copy Diagnostic Configuration dialog" + \image qtcreator-clang-copy-diagnostic-configuration.png {Copy Diagnostic Configuration dialog} \li In the \uicontrol {Diagnostic configuration name} field, give the configuration a name, and then select \uicontrol OK. @@ -157,7 +158,7 @@ To filter the checks, enter a string in the \uicontrol {Filter by name} field. - \image qtcreator-clang-tidy.png "Clang-Tidy Checks tab" + \image qtcreator-clang-tidy.png {Clang-Tidy Checks tab} For more information about the available checkers, see \l{https://clang-analyzer.llvm.org/available_checks.html} @@ -169,7 +170,7 @@ \li In the \uicontrol {Clazy Checks} tab, select the level of Clazy checks to perform. - \image qtcreator-clazy.png "Clazy Checks tab" + \image qtcreator-clazy.png {Clazy Checks tab} \li In the \uicontrol Filters field, select topics to view only checks related to those areas in the \uicontrol Checks field. diff --git a/doc/qtcreator/src/cmake/creator-projects-cmake-building.qdoc b/doc/qtcreator/src/cmake/creator-projects-cmake-building.qdoc index 1359eceda1..dac77727a8 100644 --- a/doc/qtcreator/src/cmake/creator-projects-cmake-building.qdoc +++ b/doc/qtcreator/src/cmake/creator-projects-cmake-building.qdoc @@ -16,42 +16,47 @@ the \l{Specifying Build Settings}{Build Settings} of the project. Alternatively, you can use CMake presets to configure CMake. - The \uicontrol Configuration field displays the effective CMake call that - is constructed by using the values of the \uicontrol {Build directory} and + The \uicontrol Configure field displays the effective CMake call that + \QC constructs using the values of the \uicontrol {Build directory} and \uicontrol {Build type} fields. - \image qtcreator-cmake-build-settings-initial.png "CMake build settings" - - \uicontrol {Initial Configuration} lists the variables that are used to - configure the CMake project for the first time. The default values that - are inherited from the kit's CMake configuration are displayed in italic. - The initial configuration list of variables is saved in the project's source - directory as the \e CMakeLists.txt.user file. - - \uicontrol {Current Configuration} lists the CMake variables in the - \c cmake-file-api JSON export in the \c {.cmake/api/v1/reply} directory. - The variables that are inherited from the initial configuration are - displayed in italic. Mismatched values are displayed in red. - - You can view and edit the actual values of the variables that are passed - to CMake. Variable names are listed in the \uicontrol Key column and their - current values in the \uicontrol Value column. For more information about - the available variables, select \uicontrol Help in the context menu or see - \l{CMake: cmake-variables(7)}. For more information about Qt-specific - variables, see \l{CMake Variable Reference}. + \image qtcreator-build-settings-cmake-configure.webp {CMake configure command} You can specify additional CMake options, such as \c {--find-debug}, \c {--trace-expand}, or \c {--warn-uninitialized}, in \uicontrol {Additional CMake options}. For more information about - the available options, click the link in the field name or see - \l{CMake: cmake(1)}. - - After successfully running CMake, you can view and modify the current - configuration in \uicontrol {Current Configuration}. + the options, click the link in the field name or see \l{CMake: cmake(1)}. Select \uicontrol {Kit Configuration} to edit the CMake settings for the build and run kit selected for the project. + \section1 Initial Configuration + + \image qtcreator-build-settings-cmake-initial.webp {Initial CMake configuration} + + \uicontrol {Initial Configuration} lists the variables that \QC uses to + configure the CMake project for the first time. It shows the default values + that come from the kit's CMake configuration in italics. \QC saves the + initial configuration list of variables in the project's source + directory as the \e CMakeLists.txt.user file. + + \section1 Current Configuration + + \image qtcreator-build-settings-cmake-current.webp {Current CMake configuration} + + \uicontrol {Current Configuration} lists the CMake variables in the + \c cmake-file-api JSON export in the \c {.cmake/api/v1/reply} directory. + It shows the variables that come from the initial configuration in italics + and mismatched values in red. + + After selecting the \uicontrol {Run CMake} button, you can view and + change the actual values of the variables that \QC passes to CMake. + The \uicontrol Key column lists variable names, and the \uicontrol Value + column lists their current values. For more information about the variables, + select \uicontrol Help in the context menu or see + \l{CMake: cmake-variables(7)}. For more information about Qt-specific + variables, see \l{CMake Variable Reference}. + \section1 CMake Presets You can use CMake presets files to specify common configure, build, and test @@ -63,21 +68,21 @@ \l{https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html} {cmake-presets(7)} and store them in project's root directory. - \QC supports presets up to version 3 (introduced in CMake 3.21), but version - checking is not enforced. All the fields from version 3 are read and used if - present. Test presets are not supported. + \QC supports presets up to version 3 (introduced in CMake 3.21), but does not + enforce version checking. It reads and uses all the fields from version 3 if + present. It does not support test presets. You can import the presets the first time you \l {Opening Projects} {open a project}, when no \c CMakeLists.txt.user file exists or you have disabled all kits in the project. To update changes to the \c CMakePresets.json file, delete the \c CMakeLists.txt.user file. - \image qtcreator-cmake-presets-configure.webp "Opening a project that has Cmake presets" + \image qtcreator-cmake-presets-configure.webp {Opening a project that has CMake presets} You can view the presets in the \uicontrol {Initial Configuration} field and in the environment configuration field below it. - \image qtcreator-cmake-presets-environment.webp "CMake environment configuration" + \image qtcreator-cmake-presets-environment.webp {CMake environment configuration} \section2 Configure Presets @@ -189,6 +194,47 @@ \uicontrol Edit > \uicontrol Preferences > \uicontrol CMake > \uicontrol Tools. + \section2 MSVC Example + + When using MSVC compilers with NMAKE Makefiles, Ninja, or Ninja + Multi-Config generators, you can use the \c external strategy for + the \c architecture and \c toolset fields. This lets \QC set up + the Visual C++ environment before invoking CMake. + + For example: + + \badcode + "generator": "Ninja Multi-Config", + "toolset": { + "value": "v142,host=x64", + "strategy": "external" + }, + "architecture": { + "value": "x64", + "strategy": "external" + }, + \endcode + + If you use MSVC compilers with non-VS generators and have several compilers + in the \c PATH, you might also have to specify the compiler to use in + \c cacheVariables or \c environmentVariables: + + \badcode + "generator": "Ninja Multi-Config", + "toolset": { + "value": "v142,host=x64", + "strategy": "external" + }, + "architecture": { + "value": "x64", + "strategy": "external" + }, + "cacheVariables": { + "CMAKE_C_COMPILER": "cl.exe", + "CMAKE_CXX_COMPILER": "cl.exe" + } + \endcode + \section2 Using Conditions The following configure presets are used if they match \c condition. That is, @@ -251,9 +297,19 @@ are passed to CMake in \uicontrol {Initial Configuration} or \uicontrol {Current Configuration}. - \image qtcreator-cmake-build-settings.png "CMake variables" + \image qtcreator-build-settings-cmake-current.webp {Current CMake configuration} - To view all variables, select the \uicontrol Advanced check box. + You can select several variables and apply an action to them. To clear + the selection, click anywhere in the view. + + To change the environment variable values for the CMake build environment, + select \uicontrol {Batch Edit}. For more information, see \l{Batch Editing}. + + To build using the current configuration, select \uicontrol {Run CMake}. + While building, the button text changes to \uicontrol {Stop CMake}. Select + the button to cancel the current build. + + \section2 Adding Variables To add variables, select \uicontrol Add, and then select the type of the variable that you are adding: \uicontrol Boolean, \uicontrol String, @@ -268,36 +324,40 @@ To copy the name or value of the selected variable to the clipboard, select \uicontrol Copy in the context menu. - To modify the value of a variable, double-click it, or select it, + \section2 Changing Variable Values + + To change the value of a variable, double-click it, or select it, and then select \uicontrol Edit. If the initial, current, and kit configuration get out of sync, select \uicontrol {Apply Kit Value} or \uicontrol {Apply Initial Configuration Value} in the context menu in \uicontrol {Initial Configuration} or \uicontrol {Current Configuration}. - You can apply actions to multiple variables at a time. To clear - the selection, select \uicontrol {Clear Selection}. - - To remove the selected variables, select \uicontrol Unset. To undo - the removal, select \uicontrol Set. - To reset all the changes that you made, select \uicontrol Reset. - To modify the environment variable values for the CMake build environment, - select \uicontrol {Batch Edit}. For more information, see \l{Batch Editing}. - - To build using the current configuration, select \uicontrol {Run CMake}. - While building, the button text changes to \uicontrol {Stop CMake}. Select - the button to cancel the current build. - The variable values that you change are passed via \c -D<option>=<value> to CMake, which stores the options in the CMakeCache.txt file. This means that if you remove the build directory, all the custom variables that are not part of the initial CMake configuration are also removed. - To reconfigure a project using the modified variable values, + To reconfigure a project using the changed variable values, select \uicontrol Build > \uicontrol {Clear CMake Configuration}, which removes the CMakeCache.txt file. This enables you to do a full rebuild. + \section2 Removing Variables + + To remove the selected variables, select \uicontrol Unset. To undo + the removal, select \uicontrol Set. + + \section2 Viewing Advanced Variables + + 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}. + + \image qtcreator-preferences-cmake-general.webp "General tab in CMake Preferences" + \section1 Re-configuring with Initial Variables To reset CMake variables to the initial ones, select @@ -311,21 +371,19 @@ \uicontrol Preferences > \uicontrol CMake > \uicontrol General > \uicontrol {Ask before re-configuring with initial parameters}. - \image qtcreator-preferences-cmake-general.png "General tab in CMake Preferences" - \section1 Viewing CMake Output Output from CMake is displayed next to the \uicontrol {Build Settings} and \uicontrol {Run Settings} panes in the \uicontrol Projects mode. - \image qtcreator-build-cmake-output.png "CMake output in Projects mode" + \image qtcreator-build-cmake-output.png {CMake output in Projects mode} To clear the search results, select the \inlineimage icons/clean_pane_small.png (\uicontrol Clear) button. You can enter a string in the \uicontrol Filter field to filter output. To specify filtering options, select the - \inlineimage icons/magnifier.png "Filtering options menu" + \inlineimage icons/magnifier.png {Filtering options menu} button. You can filter output by using regular expressions or case-sensitivity. Select \uicontrol {Show Non-matching Lines} to hide the lines that match the filter. @@ -350,7 +408,7 @@ You can add arguments to pass to CMake and the generator and targets for the build command in \uicontrol {Build Steps}. - \image qtcreator-cmake-build-steps.png "CMake build steps" + \image qtcreator-cmake-build-steps.png {CMake build steps} \note While the other CMake generators are installed together with Qt, you usually need to install Ninja yourself. @@ -366,10 +424,10 @@ variable. \li In \uicontrol Projects > \uicontrol {Build & Run} > \uicontrol Build > \uicontrol {Build Settings}, select \uicontrol {Kit Configuration}. - \image qtcreator-cmake-kit-configuration.png "Kit CMake Configuration dialog" + \image qtcreator-cmake-kit-configuration.png {Kit CMake Configuration dialog} \li Select \uicontrol Change next to the \uicontrol {CMake generator} field to open the \uicontrol {CMake Generator} dialog. - \image qtcreator-cmake-generator.png "CMake Generator dialog" + \image qtcreator-cmake-generator.png {CMake Generator dialog} \li In \uicontrol Generator, select \uicontrol Ninja. \li Select \uicontrol OK to save your changes and close the dialog. \li Select \uicontrol Close to close the diff --git a/doc/qtcreator/src/cmake/creator-projects-cmake.qdoc b/doc/qtcreator/src/cmake/creator-projects-cmake.qdoc index 34e98d8d30..a646b5ff53 100644 --- a/doc/qtcreator/src/cmake/creator-projects-cmake.qdoc +++ b/doc/qtcreator/src/cmake/creator-projects-cmake.qdoc @@ -1,4 +1,4 @@ -// Copyright (C) 2022 The Qt Company Ltd. +// Copyright (C) 2023 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only // ********************************************************************** @@ -34,9 +34,12 @@ \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. + 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. - \image qtcreator-projects-view-edit.png "CMake project in Projects view" + \image qtcreator-projects-view-edit.png {CMake project in Projects view} If \QC cannot load the CMake project, the \l Projects view shows a \uicontrol {<File System>} project node to avoid scanning the file @@ -85,7 +88,7 @@ \li Select \uicontrol Edit > \uicontrol Preferences > \uicontrol CMake > \uicontrol Tools. - \image qtcreator-preferences-cmake-tools.png "Tools tab in CMake Preferences" + \image qtcreator-preferences-cmake-tools.webp {Tools tab in CMake Preferences} \li The \uicontrol Name field displays a name for the CMake installation. @@ -96,10 +99,6 @@ \li The \uicontrol {Help file} field displays the path to the CMake help file (.qch) that comes with CMake. - \li Deselect the \uicontrol {Autorun CMake} check box if you do not want - to automatically run CMake every time when you save changes to - \c {CMakeLists.txt} files. - \li Select \uicontrol Apply to save your changes. \endlist @@ -120,7 +119,7 @@ The kit also specifies the CMake generator that is used for producing project files for \QC and the initial configuration parameters: - \image qtcreator-kits-cmake.png + \image qtcreator-kits-cmake.png {Kits preferences} For more information, see \l {Adding Kits}. @@ -155,6 +154,33 @@ Warnings and errors are displayed in \l {Issues}. + \section1 Formatting CMake Files + + You can use the \c {cmake-format} tool to format any text in CMake files that + you do not guard with a pair of fences. You must install the tool and tell + \QC where you installed it. For more information about the tool and how to + install it, see \l{https://cmake-format.readthedocs.io/en/latest/index.html} + {cmake language tools}. + + To automatically format CMake files upon file save: + + \list 1 + \li Select \uicontrol Edit > \uicontrol 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}. + \li Select \uicontrol {Enable auto format on file save} to automatically + format CMake files when you save them. + \li In \uicontrol {Restrict to MIME types}, add the \l{Adding MIME Types} + {MIME types} of the files to format, separated by semicolons. The + default value, \c {text/x-cmake} formats CMake files. If the field is + empty, all files are formatted. + \li Select the \uicontrol {Restrict to files contained in the current + project} check box to only format CMake files that belong to the + current project. + \endlist + \section1 Adding External Libraries to CMake Projects Through external libraries, \QC can support code completion and syntax diff --git a/doc/qtcreator/src/debugger/creator-only/creator-debugger.qdoc b/doc/qtcreator/src/debugger/creator-only/creator-debugger.qdoc index d775a87d58..17d03346c3 100644 --- a/doc/qtcreator/src/debugger/creator-only/creator-debugger.qdoc +++ b/doc/qtcreator/src/debugger/creator-only/creator-debugger.qdoc @@ -734,8 +734,9 @@ \title Examining Data - Use the \l {Debug Mode Views}{Debug mode views} to examine the data in more - detail. + Use the \l{Local Variables and Function Parameters}{Locals} and + \l{Evaluating Expressions}{Expressions} views to examine the data + in more detail. You can use the following keyboard shortcuts: @@ -767,6 +768,40 @@ \section1 Stepping Into Code + Use the following buttons to step through the code: + + \table + \header + \li Button + \li Function + \li Description + \row + \li \inlineimage icons/qtcreator-debug-button-stop.png + \li \uicontrol {Stop Debugger} + \li Stops the debugger. + \row + \li \inlineimage icons/debugger_stepover_small.png + \li \uicontrol {Step Over} + \li Steps over the next line inside the function being debugged. It + executes the call and moves to the next line to be executed in + the function. + \row + \li \inlineimage icons/debugger_stepinto_small.png + \li \uicontrol {Step Into} + \li Steps into the line that it is currently on. For a function call, + goes into the function and is ready to continue. + \row + \li \inlineimage icons/debugger_stepout_small.png + \li \uicontrol {Step Out} + \li Finishes executing the function and exits to the function that + it was called from. + \row + \li \inlineimage icons/qtcreator-debugging-continue.png + \li \uicontrol {Continue} + \li Resumes application execution at the address where it last + stopped. + \endtable + When using GDB as the debugging backend, you can compress several steps into one step for less noisy debugging. For more information, see \l{Specifying GDB Settings}. diff --git a/doc/qtcreator/src/linux-mobile/b2qtdev.qdoc b/doc/qtcreator/src/linux-mobile/b2qtdev.qdoc index 11167b35fe..dd3a884f8e 100644 --- a/doc/qtcreator/src/linux-mobile/b2qtdev.qdoc +++ b/doc/qtcreator/src/linux-mobile/b2qtdev.qdoc @@ -1,4 +1,4 @@ -// Copyright (C) 2021 The Qt Company Ltd. +// Copyright (C) 2023 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only /*! @@ -18,7 +18,7 @@ To be able to run and debug applications on Boot2Qt devices, you must add devices and select them in the \QC - \l{glossary-buildandrun-kit}{kit}. + \l{Adding Kits}{kit}. \section1 Enabling the Boot2Qt Plugin @@ -33,21 +33,27 @@ \section1 Adding Boot2Qt Devices - You use a wizard to create the connections. You can use either a - network connection or a USB connection. If \QC does not automatically - detect a device you connected with USB, you can use a wizard to - create a network connection to the device. + If \QC does not automatically detect a device you connected with USB, you can + use a wizard to create either a network connection or a USB connection to + it. - \note On Ubuntu Linux, the development user account must have access to - plugged in devices. To allow the development user access to the device - via USB, create a new \c udev rule, as described in + \note On Ubuntu Linux, the development user account must have access to the + plugged-in devices. To grant them access to the device via USB, create a new + \c udev rule, as described in \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 > \uicontrol Devices > \uicontrol Devices. - \image qtcreator-boot2qt-device-configurations.png "Devices dialog" + \image qtcreator-boot2qt-device-configurations.png {Devices dialog} + + To reboot the selected device, select \uicontrol {Reboot Device}. + + To restore the default application to the device, select + \uicontrol {Restore Default App}. + + \section2 Protecting Connections You can protect the connections between \QC and a device by using an \l{https://www.openssh.com/}{OpenSSH} connection. OpenSSH is a @@ -57,17 +63,19 @@ \QC. For more information, see \l {Configuring SSH Connections}. You need either a password or an SSH public and private key pair for - authentication. If you do not have an SSH key, you can use the ssh-keygen + authentication. If you do not have an SSH key, you can use the \c ssh-keygen tool to create it in \QC. For more information, see \l {Generating SSH Keys}. - \note \QC does not store passwords. If you use password authentication, - you may need to enter the password on every connection to the device, - or, if caching is enabled, at every \QC restart. - - To reboot the selected device, select \uicontrol {Reboot Device}. + \QC does not store passwords. If you use password authentication, you may + 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 + 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. - To restore the default application to the device, select - \uicontrol {Restore Default App}. + \image qtcreator-ssh-options.png {SSH preferences} \section1 Flashing Boot2Qt Devices @@ -75,7 +83,7 @@ \uicontrol Tools > \uicontrol {Flash Boot to Qt Device} and follow the instructions of the wizard. - \image qtcreator-boot2qt-flashing-wizard.png "Boot2Qt Flashing Wizard" + \image qtcreator-boot2qt-flashing-wizard.png {Boot2Qt Flashing Wizard} \section1 Configuring Connections @@ -83,8 +91,8 @@ specify build and run settings for the device: \list 1 - \li Make sure that your device can be reached via an IP address or - connect it with a USB connection. + \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. @@ -100,7 +108,7 @@ \li Select \uicontrol Edit > \uicontrol Preferences > \uicontrol Devices > \uicontrol Devices > \uicontrol Add > \uicontrol Boot2Qt. - \image qtcreator-devices-boot2qt.png "Boot2Qt Network Device Setup wizard" + \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 diff --git a/doc/qtcreator/src/overview/creator-only/creator-getting-started.qdoc b/doc/qtcreator/src/overview/creator-only/creator-getting-started.qdoc index 218442555c..a7ae08afba 100644 --- a/doc/qtcreator/src/overview/creator-only/creator-getting-started.qdoc +++ b/doc/qtcreator/src/overview/creator-only/creator-getting-started.qdoc @@ -1,4 +1,4 @@ -// Copyright (C) 2020 The Qt Company Ltd. +// Copyright (C) 2023 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only // ********************************************************************** @@ -14,6 +14,9 @@ \title Getting Started + To learn the basics of \QC, take the \e {Getting Started with Qt Creator} + course in \l{https://www.qt.io/courses/}{Qt Learning}. + \table \row \li \inlineimage front-gs.png diff --git a/doc/qtcreator/src/overview/creator-only/creator-glossary.qdoc b/doc/qtcreator/src/overview/creator-only/creator-glossary.qdoc index 7a20f1fa87..c6cc117b1b 100644 --- a/doc/qtcreator/src/overview/creator-only/creator-glossary.qdoc +++ b/doc/qtcreator/src/overview/creator-only/creator-glossary.qdoc @@ -31,7 +31,8 @@ additional debug symbols that you need for debugging the application but that you can leave out from the release version. Generally, you use the debug configuration for testing and the - release configuration for creating the final installation file. + release configuration for creating the final installation + binary package. \row \li Build step 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 d67f493dd1..acf362877d 100644 --- a/doc/qtcreator/src/projects/creator-only/creator-projects-building.qdoc +++ b/doc/qtcreator/src/projects/creator-only/creator-projects-building.qdoc @@ -99,11 +99,11 @@ \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 Tools. Select the + \uicontrol 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.png "Tools tab in CMake Preferences" + \image qtcreator-preferences-cmake-tools.webp "Tools tab in CMake Preferences" For more information, see \l {Setting Up CMake}. 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 c076889921..141e6eab2a 100644 --- a/doc/qtcreator/src/projects/creator-only/creator-projects-creating.qdoc +++ b/doc/qtcreator/src/projects/creator-only/creator-projects-creating.qdoc @@ -118,10 +118,6 @@ you to generate a Python file from the .ui file, to import it directly into your application. \row - \li Window UI - Dynamic load - \li Creates a Qt for Python application that has an empty - window with a widget-based UI. - \row \li Qt Quick Application - Empty \li Creates a Python project that has an empty Qt Quick Application. diff --git a/doc/qtcreator/src/projects/creator-only/creator-projects-settings-build-qbs.qdoc b/doc/qtcreator/src/projects/creator-only/creator-projects-settings-build-qbs.qdoc index 45b08dcb4f..71b13ce437 100644 --- a/doc/qtcreator/src/projects/creator-only/creator-projects-settings-build-qbs.qdoc +++ b/doc/qtcreator/src/projects/creator-only/creator-projects-settings-build-qbs.qdoc @@ -8,7 +8,7 @@ \title Qbs Build Configuration - \image qtcreator-build-settings-qbs.png "Qbs build settings" + \image qtcreator-build-settings-qbs.png {Qbs build settings} Qbs builds projects in the directory specified in the \uicontrol {Build Directory} field. @@ -33,15 +33,22 @@ \section1 Qbs Build Steps - \image creator-qbs-build-app.png "Qbs build steps" + \image creator-qbs-build-app.png {Qbs build steps} To specify build steps for Qbs: \list 1 - \li In the \uicontrol {Build variant} field, select \uicontrol Debug to - include debug symbols in the build for debugging the application and - \uicontrol Release to create the final installation file. + \li In the \uicontrol {Build variant} field, select: + \list + \li \uicontrol Debug to include debug symbols in the build for + debugging the application. + \li \uicontrol Profile for an optimized release build that is + delivered with separate debug information. It is best suited + for analyzing applications. + \li \uicontrol Release to create the final installation binary + package. + \endlist \li In the \uicontrol ABIs field, select the ABIs for the \l{Connecting Android Devices}{Android} device @@ -56,18 +63,18 @@ \l{http://doc.qt.io/qbs/language-introduction.html} {Modules} in the Qbs Manual. - \li In the \uicontrol Flags field: + \li In the \uicontrol Flags field, select: \list - \li Select \uicontrol {Keep going} to continue building when + \li \uicontrol {Keep going} to continue building when errors occur, if possible. - \li Select \uicontrol {Show command lines} to print actual + \li \uicontrol {Show command lines} to print actual command lines to \l{Compile Output} instead of high-level descriptions. - \li Select \uicontrol {Force probes} to force re-execution of + \li \uicontrol {Force probes} to force re-execution of the configure scripts of \l{https://doc.qt.io/qbs/qbsprobes-qmlmodule.html}{Probes}. @@ -108,7 +115,7 @@ When building with Qbs, you can specify flags in \uicontrol {Clean Steps}: - \image creator-qbs-build-clean.png "Qbs clean steps" + \image creator-qbs-build-clean.png {Qbs clean steps} \list diff --git a/doc/qtcreator/src/projects/creator-only/creator-projects-settings-build.qdoc b/doc/qtcreator/src/projects/creator-only/creator-projects-settings-build.qdoc index 1ab5ef2fab..53f14c0c34 100644 --- a/doc/qtcreator/src/projects/creator-only/creator-projects-settings-build.qdoc +++ b/doc/qtcreator/src/projects/creator-only/creator-projects-settings-build.qdoc @@ -20,11 +20,11 @@ debug symbols that you need for debugging the application but that you can leave out from the release version. Generally, you use the debug configuration for testing and the release configuration for creating - the final installation file. + the final installation binary package. If you selected CMake as the build system for the project, you can use a \e {minimum size release} build configuration to create the - final installation file. It is a release build that makes the size + final installation binary package. It is a release build that makes the size of the binary package as small as possible, even if this makes the application slower. 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 f39a31fb0a..27fe9ade25 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 @@ -10,6 +10,15 @@ and the working directory to use. The working directory defaults to the directory of the build result. + Select \uicontrol {Add Deploy Step} > \uicontrol {CMake Install} to add the + \l{https://cmake.org/cmake/help/latest/manual/cmake.1.html#install-a-project} + {install} option. It runs installation without using the generated build + system or the native build tool. \QC automatically adds the value of the + \uicontrol {Working directory} field as the installation directory in the + \c {--install} signature. + + \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. @@ -18,8 +27,6 @@ \uicontrol {Run Environment} section. For more information, see \l {Selecting the Run Environment}. - \image qtcreator-pprunsettings.png - When building an application, \QC creates a list of directories where the linker will look for libraries that the application links to. By default, the linked libraries are made visible to the executable that 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 581dcd73e9..6f489f4b30 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 @@ -21,7 +21,7 @@ To view and modify them, select \uicontrol Projects > \uicontrol {Build & Run} > \uicontrol Run. - \image qtcreator-settings-run.png "Run Settings" + \image qtcreator-settings-run.webp {Run Settings} To prevent \QC from automatically creating run configurations, select \uicontrol Edit > \uicontrol Preferences > \uicontrol {Build & Run}, @@ -104,7 +104,7 @@ You can edit existing environment variables or add, reset and unset new variables. - \image qtcreator-run-environment.png "Run Environment section" + \image qtcreator-run-environment.png {Run Environment section} When running on the desktop, the \uicontrol {Build Environment} is used by default, but you can also use the \uicontrol {System Environment} without the @@ -130,7 +130,7 @@ Specify the executable to run, command line arguments, working directory, and environment variables to use. - \image qmldesigner-run-custom-exe.png "Run settings for custom executables" + \image qmldesigner-run-custom-exe.png {Run settings for custom executables} \include qtquick/creator-projects-settings-run-qtquick.qdocinc run settings qt quick ui \include python/creator-python-run.qdocinc run settings python diff --git a/doc/qtcreator/src/qtquick/qtquick-from-qmlproject-to-pro.qdoc b/doc/qtcreator/src/qtquick/qtquick-from-qmlproject-to-pro.qdoc index b89ff1442b..158aac049c 100644 --- a/doc/qtcreator/src/qtquick/qtquick-from-qmlproject-to-pro.qdoc +++ b/doc/qtcreator/src/qtquick/qtquick-from-qmlproject-to-pro.qdoc @@ -76,8 +76,7 @@ If you only install Qt Creator and Qt, remember to also select the Qt Quick Timeline module for installation. If your Qt is older than 5.14, you must build the Qt Quick Timeline module and install it to - your Qt to be able to build your project. For more information, see - \l{Adding Qt Quick Timeline Module to Qt Installations}. + your Qt to be able to build your project. \section1 Converting into qmake Projects diff --git a/qbs/modules/qtc/qtc.qbs b/qbs/modules/qtc/qtc.qbs index b4688986a3..14529677fe 100644 --- a/qbs/modules/qtc/qtc.qbs +++ b/qbs/modules/qtc/qtc.qbs @@ -6,16 +6,16 @@ import qbs.Utilities Module { Depends { name: "cpp"; required: false } - property string qtcreator_display_version: '10.0.0-beta2' + property string qtcreator_display_version: '10.0.0-rc1' property string ide_version_major: '9' property string ide_version_minor: '0' - property string ide_version_release: '83' + property string ide_version_release: '84' property string qtcreator_version: ide_version_major + '.' + ide_version_minor + '.' + ide_version_release property string ide_compat_version_major: '9' property string ide_compat_version_minor: '0' - property string ide_compat_version_release: '83' + property string ide_compat_version_release: '84' property string qtcreator_compat_version: ide_compat_version_major + '.' + ide_compat_version_minor + '.' + ide_compat_version_release diff --git a/qbs/modules/qtc_gtest_gmock/qtc_gtest_gmock.qbs b/qbs/modules/qtc_gtest_gmock/qtc_gtest_gmock.qbs index 5229db1440..02bbb8a302 100644 --- a/qbs/modules/qtc_gtest_gmock/qtc_gtest_gmock.qbs +++ b/qbs/modules/qtc_gtest_gmock/qtc_gtest_gmock.qbs @@ -49,15 +49,15 @@ Module { } Properties { - condition: qtc_gtest_gmock.useRepo + condition: useRepo cpp.includePaths: [ - FileInfo.joinPaths(qtc_gtest_gmock.gtestDir, "include"), - FileInfo.joinPaths(qtc_gtest_gmock.gmockDir, "include"), + FileInfo.joinPaths(gtestDir, "include"), + FileInfo.joinPaths(gmockDir, "include"), ] } validate: { - if (!qtc_gtest_gmock.externalLibsPresent && !gtestProbe.found) { + if (!externalLibsPresent && !gtestProbe.found) { console.warn("No GTest found."); throw new Error(); } diff --git a/share/qtcreator/templates/wizards/autotest/files/tst.txt b/share/qtcreator/templates/wizards/autotest/files/tst.txt index 5852153e89..7e1bd4c46e 100644 --- a/share/qtcreator/templates/wizards/autotest/files/tst.txt +++ b/share/qtcreator/templates/wizards/autotest/files/tst.txt @@ -49,6 +49,9 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON) # no need to copy around qml test files for shadow builds - just set the respective define add_definitions(-DQUICK_TEST_SOURCE_DIR="${CMAKE_CURRENT_SOURCE_DIR}") +file(GLOB_RECURSE QML_FILES *.qml) +add_custom_target(qmlfiles SOURCES ${QML_FILES}) + @if "%{UseSetupCode}" === "true" add_executable(%{TestCaseName} %{MainCppName} setup.cpp setup.h) diff --git a/src/plugins/android/androidmanager.cpp b/src/plugins/android/androidmanager.cpp index e77c38ea26..fd5e442cdb 100644 --- a/src/plugins/android/androidmanager.cpp +++ b/src/plugins/android/androidmanager.cpp @@ -278,18 +278,15 @@ QString packageSubPath(PackageFormat format, BuildConfiguration::BuildType build const bool deb = (buildType == BuildConfiguration::Debug); if (format == Apk) { - if (deb) + if (deb) { return sig ? packageSubPath(Apk, BuildConfiguration::Release, true) // Intentional : QLatin1String("apk/debug/android-build-debug.apk"); - else - return QLatin1String(sig ? "apk/release/android-build-release-signed.apk" - : "apk/release/android-build-release-unsigned.apk"); - } else { - return QLatin1String(deb ? "bundle/debug/android-build-debug.aab" - : "bundle/release/android-build-release.aab"); + } + return QLatin1String(sig ? "apk/release/android-build-release-signed.apk" + : "apk/release/android-build-release-unsigned.apk"); } - - return {}; + return QLatin1String(deb ? "bundle/debug/android-build-debug.aab" + : "bundle/release/android-build-release.aab"); } FilePath AndroidManager::packagePath(const Target *target) diff --git a/src/plugins/android/androidrunnerworker.cpp b/src/plugins/android/androidrunnerworker.cpp index d54a0677f8..14dc9112e8 100644 --- a/src/plugins/android/androidrunnerworker.cpp +++ b/src/plugins/android/androidrunnerworker.cpp @@ -736,10 +736,10 @@ void AndroidRunnerWorker::handleJdbSettled() { qCDebug(androidRunWorkerLog) << "Handle JDB settled"; auto waitForCommand = [this] { - for (int i= 0; i < 5 && m_jdbProcess->state() == QProcess::Running; ++i) { + for (int i = 0; i < 120 && m_jdbProcess->state() == QProcess::Running; ++i) { m_jdbProcess->waitForReadyRead(500); QByteArray lines = m_jdbProcess->readAll(); - const auto linesList = lines.split('\n'); + const auto linesList = lines.split('\n'); for (const auto &line : linesList) { auto msg = line.trimmed(); if (msg.startsWith(">")) @@ -748,24 +748,29 @@ void AndroidRunnerWorker::handleJdbSettled() } return false; }; - if (waitForCommand()) { - m_jdbProcess->write("cont\n"); - if (m_jdbProcess->waitForBytesWritten(5000) && waitForCommand()) { - m_jdbProcess->write("exit\n"); - m_jdbProcess->waitForBytesWritten(5000); - if (!m_jdbProcess->waitForFinished(5000)) { - m_jdbProcess->terminate(); - if (!m_jdbProcess->waitForFinished(5000)) { - qCDebug(androidRunWorkerLog) << "Killing JDB process"; - m_jdbProcess->kill(); - m_jdbProcess->waitForFinished(); - } - } else if (m_jdbProcess->exitStatus() == QProcess::NormalExit && m_jdbProcess->exitCode() == 0) { - qCDebug(androidRunWorkerLog) << "JDB settled"; - return; - } + + const QStringList commands{"threads", "cont", "exit"}; + const int jdbTimeout = 5000; + + for (const QString &command : commands) { + if (waitForCommand()) { + m_jdbProcess->write(QString("%1\n").arg(command).toLatin1()); + m_jdbProcess->waitForBytesWritten(jdbTimeout); } } + + if (!m_jdbProcess->waitForFinished(jdbTimeout)) { + m_jdbProcess->terminate(); + if (!m_jdbProcess->waitForFinished(jdbTimeout)) { + qCDebug(androidRunWorkerLog) << "Killing JDB process"; + m_jdbProcess->kill(); + m_jdbProcess->waitForFinished(); + } + } else if (m_jdbProcess->exitStatus() == QProcess::NormalExit && m_jdbProcess->exitCode() == 0) { + qCDebug(androidRunWorkerLog) << "JDB settled"; + return; + } + emit remoteProcessFinished(Tr::tr("Cannot attach JDB to the running application.")); } diff --git a/src/plugins/autotest/gtest/gtestoutputreader.cpp b/src/plugins/autotest/gtest/gtestoutputreader.cpp index 2ec1d4afcd..6ee766b28a 100644 --- a/src/plugins/autotest/gtest/gtestoutputreader.cpp +++ b/src/plugins/autotest/gtest/gtestoutputreader.cpp @@ -68,13 +68,8 @@ void GTestOutputReader::processOutputLine(const QByteArray &outputLine) m_iteration = match.captured(1).toInt(); m_description.clear(); } else if (line.startsWith(QStringLiteral("Note:"))) { - m_description = line; - if (m_iteration > 1) - m_description.append(' ' + Tr::tr("(iteration %1)").arg(m_iteration)); - GTestResult testResult(id(), {}, m_projectFile); - testResult.setResult(ResultType::MessageInternal); - testResult.setDescription(m_description); - reportResult(testResult); + // notes contain insignificant information we fail to include properly into the + // visual tree, so ignore them here as they are available inside the text display anyhow m_description.clear(); } else if (ExactMatch match = disabledTests.match(line)) { m_disabled = match.captured(1).toInt(); diff --git a/src/plugins/autotest/qtest/qttestresult.cpp b/src/plugins/autotest/qtest/qttestresult.cpp index 83ea4754f3..1f15b3e82d 100644 --- a/src/plugins/autotest/qtest/qttestresult.cpp +++ b/src/plugins/autotest/qtest/qttestresult.cpp @@ -177,6 +177,8 @@ static ResultHooks::DirectParentHook directParentHook(const QString &functionNam return (functionName.isEmpty() && dataTag.isEmpty()) || (functionName == otherData.m_function && other.result() != ResultType::TestStart); + } else if (other.result() == ResultType::MessageInternal) { + return other.name() == result.name(); } } return false; diff --git a/src/plugins/clangcodemodel/clangmodelmanagersupport.cpp b/src/plugins/clangcodemodel/clangmodelmanagersupport.cpp index 0cde889e45..79f2760a7c 100644 --- a/src/plugins/clangcodemodel/clangmodelmanagersupport.cpp +++ b/src/plugins/clangcodemodel/clangmodelmanagersupport.cpp @@ -342,16 +342,10 @@ void ClangModelManagerSupport::findUsages(const CppEditor::CursorInEditor &curso void ClangModelManagerSupport::switchHeaderSource(const FilePath &filePath, bool inNextSplit) { - if (ClangdClient * const client = clientForFile(filePath)) { - // The fast, synchronous approach works most of the time, so let's try that one first. - const FilePath otherFile = correspondingHeaderOrSource(filePath); - if (!otherFile.isEmpty()) - openEditor(otherFile, inNextSplit); - else - client->switchHeaderSource(filePath, inNextSplit); - return; - } - CppModelManager::switchHeaderSource(inNextSplit, CppModelManager::Backend::Builtin); + if (ClangdClient * const client = clientForFile(filePath)) + client->switchHeaderSource(filePath, inNextSplit); + else + CppModelManager::switchHeaderSource(inNextSplit, CppModelManager::Backend::Builtin); } void ClangModelManagerSupport::checkUnused(const Link &link, Core::SearchResult *search, diff --git a/src/plugins/cmakeprojectmanager/cmakeprojectimporter.cpp b/src/plugins/cmakeprojectmanager/cmakeprojectimporter.cpp index ce01fcdc6b..3d5b4c02c1 100644 --- a/src/plugins/cmakeprojectmanager/cmakeprojectimporter.cpp +++ b/src/plugins/cmakeprojectmanager/cmakeprojectimporter.cpp @@ -154,7 +154,9 @@ FilePaths CMakeProjectImporter::importCandidates() } static CMakeConfig configurationFromPresetProbe( - const FilePath &importPath, const PresetsDetails::ConfigurePreset &configurePreset) + const FilePath &importPath, + const FilePath &sourceDirectory, + const PresetsDetails::ConfigurePreset &configurePreset) { const FilePath cmakeListTxt = importPath / "CMakeLists.txt"; cmakeListTxt.writeFileContents(QByteArray("cmake_minimum_required(VERSION 3.15)\n" @@ -169,7 +171,7 @@ static CMakeConfig configurationFromPresetProbe( const FilePath cmakeExecutable = FilePath::fromString(configurePreset.cmakeExecutable.value()); Environment env = cmakeExecutable.deviceEnvironment(); - CMakePresets::Macros::expand(configurePreset, env, importPath); + CMakePresets::Macros::expand(configurePreset, env, sourceDirectory); env.setupEnglishOutput(); cmake.setEnvironment(env); @@ -208,9 +210,14 @@ static CMakeConfig configurationFromPresetProbe( : CMakeConfig(); auto expandCacheValue = - [configurePreset, env, importPath, cache](const QString &key) -> QString { + [configurePreset, env, sourceDirectory, cache](const QString &key) -> QString { QString result = cache.stringValueOf(key.toUtf8()); - CMakePresets::Macros::expand(configurePreset, env, importPath, result); + CMakePresets::Macros::expand(configurePreset, env, sourceDirectory, result); + + // all usages involve file paths, so make sure they are cleaned up + const FilePaths paths = transform(result.split(";"), &FilePath::fromUserInput); + result = transform(paths, &FilePath::path).join(";"); + return result; }; @@ -665,7 +672,7 @@ QList<void *> CMakeProjectImporter::examineDirectory(const FilePath &importPath, if (cache.valueOf("CMAKE_C_COMPILER").isEmpty() && cache.valueOf("CMAKE_CXX_COMPILER").isEmpty()) { QApplication::setOverrideCursor(Qt::WaitCursor); - config = configurationFromPresetProbe(importPath, configurePreset); + config = configurationFromPresetProbe(importPath, projectDirectory(), configurePreset); QApplication::restoreOverrideCursor(); if (!configurePreset.generator) { diff --git a/src/plugins/cmakeprojectmanager/presetsmacros.cpp b/src/plugins/cmakeprojectmanager/presetsmacros.cpp index d267e29541..370131777b 100644 --- a/src/plugins/cmakeprojectmanager/presetsmacros.cpp +++ b/src/plugins/cmakeprojectmanager/presetsmacros.cpp @@ -140,6 +140,9 @@ void expand(const PresetType &preset, Environment &env, const FilePath &sourceDi return env.value(macroName); }); + // Make sure to expand the CMake macros also for environment variables + expandAllButEnv(preset, sourceDirectory, value); + if (append) env.appendOrSet(key, value, sep); else @@ -173,6 +176,9 @@ void expand(const PresetType &preset, EnvironmentItems &envItems, const FilePath return QString("${%1}").arg(macroName); }); + // Make sure to expand the CMake macros also for environment variables + expandAllButEnv(preset, sourceDirectory, value); + envItems.emplace_back(Utils::EnvironmentItem(key, value, operation)); }); } @@ -193,6 +199,9 @@ void expand(const PresetType &preset, value = expandMacroEnv("penv", value, [env](const QString ¯oName) { return env.value(macroName); }); + + // Make sure to expand the CMake macros also for environment variables + expandAllButEnv(preset, sourceDirectory, value); } void updateToolchainFile( diff --git a/src/plugins/coreplugin/locator/locatorwidget.cpp b/src/plugins/coreplugin/locator/locatorwidget.cpp index 64adb039c3..ba717ea0f9 100644 --- a/src/plugins/coreplugin/locator/locatorwidget.cpp +++ b/src/plugins/coreplugin/locator/locatorwidget.cpp @@ -1085,7 +1085,6 @@ LocatorPopup *createLocatorPopup(Locator *locator, QWidget *parent) else popup->layout()->addWidget(widget); popup->setWindowFlags(Qt::Popup); - popup->setAttribute(Qt::WA_DeleteOnClose); return popup; } diff --git a/src/plugins/debugger/cdb/cdbengine.cpp b/src/plugins/debugger/cdb/cdbengine.cpp index 5c5d8b1e74..450d36b8f0 100644 --- a/src/plugins/debugger/cdb/cdbengine.cpp +++ b/src/plugins/debugger/cdb/cdbengine.cpp @@ -244,7 +244,6 @@ void CdbEngine::adjustOperateByInstruction(bool operateByInstruction) return; m_lastOperateByInstruction = operateByInstruction; runCommand({QLatin1String(m_lastOperateByInstruction ? "l-t" : "l+t"), NoFlags}); - runCommand({QLatin1String(m_lastOperateByInstruction ? "l-s" : "l+s"), NoFlags}); } bool CdbEngine::canHandleToolTip(const DebuggerToolTipContext &context) const diff --git a/src/plugins/debugger/debuggerengine.cpp b/src/plugins/debugger/debuggerengine.cpp index aa2283a073..a9609584c6 100644 --- a/src/plugins/debugger/debuggerengine.cpp +++ b/src/plugins/debugger/debuggerengine.cpp @@ -380,10 +380,6 @@ public: void doShutdownEngine() { m_engine->setState(EngineShutdownRequested); - if (m_engine->isDying()) { - m_engine->notifyEngineShutdownFinished(); - return; - } m_engine->startDying(); m_engine->showMessage("CALL: SHUTDOWN ENGINE"); m_engine->shutdownEngine(); diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp index 3fd126a4b0..b8ba1441ed 100644 --- a/src/plugins/debugger/gdb/gdbengine.cpp +++ b/src/plugins/debugger/gdb/gdbengine.cpp @@ -1624,10 +1624,6 @@ QString GdbEngine::cleanupFullName(const QString &fileName) void GdbEngine::shutdownInferior() { CHECK_STATE(InferiorShutdownRequested); - if (runParameters().startMode == AttachToCore) { - notifyInferiorShutdownFinished(); - return; - } DebuggerCommand cmd; cmd.function = QLatin1String(runParameters().closeMode == DetachAtClose ? "detach " : "kill "); cmd.callback = CB(handleInferiorShutdown); @@ -1715,6 +1711,8 @@ void GdbEngine::handleThreadGroupExited(const GdbMi &result) notifyExitCode(exitCode); if (m_rerunPending) m_rerunPending = false; + else if (state() == EngineShutdownRequested) + notifyEngineShutdownFinished(); else notifyInferiorExited(); } diff --git a/src/plugins/debugger/lldb/lldbengine.cpp b/src/plugins/debugger/lldb/lldbengine.cpp index 38fe8c6b01..020c9e7758 100644 --- a/src/plugins/debugger/lldb/lldbengine.cpp +++ b/src/plugins/debugger/lldb/lldbengine.cpp @@ -282,12 +282,12 @@ void LldbEngine::handleLldbStarted() cmd2.arg("attachpid", attachedPID); } else { - cmd2.arg("startmode", rp.startMode); // it is better not to check the start mode on the python sid (as we would have to duplicate the // enum values), and thus we assume that if the rp.attachPID is valid we really have to attach - QTC_CHECK(!rp.attachPID.isValid() || (rp.startMode == AttachToCrashedProcess - || rp.startMode == AttachToLocalProcess)); + QTC_CHECK(rp.attachPID.isValid() && (rp.startMode == AttachToRemoteProcess + || rp.startMode == AttachToLocalProcess + || rp.startMode == AttachToRemoteServer)); cmd2.arg("attachpid", rp.attachPID.pid()); cmd2.arg("sysroot", rp.deviceSymbolsRoot.isEmpty() ? rp.sysRoot.toString() : rp.deviceSymbolsRoot); diff --git a/src/plugins/debugger/logwindow.cpp b/src/plugins/debugger/logwindow.cpp index c89fa7d254..a8b519aad0 100644 --- a/src/plugins/debugger/logwindow.cpp +++ b/src/plugins/debugger/logwindow.cpp @@ -576,6 +576,7 @@ void LogWindow::clearContents() { m_combinedText->clear(); m_inputText->clear(); + theGlobalLog->clearContents(); } void LogWindow::setCursor(const QCursor &cursor) diff --git a/src/plugins/gitlab/gitlabdialog.cpp b/src/plugins/gitlab/gitlabdialog.cpp index 22c362788a..9375c057f5 100644 --- a/src/plugins/gitlab/gitlabdialog.cpp +++ b/src/plugins/gitlab/gitlabdialog.cpp @@ -338,7 +338,7 @@ void GitLabDialog::handleProjects(const Projects &projects) // TODO use a real model / delegate..? listModel->setDataAccessor([](Project *data, int /*column*/, int role) -> QVariant { if (role == Qt::DisplayRole) - return QString(data->displayName + " (" + data->visibility + ')'); + return data->displayName; if (role == Qt::UserRole) return QVariant::fromValue(*data); return QVariant(); diff --git a/src/plugins/gitlab/resultparser.cpp b/src/plugins/gitlab/resultparser.cpp index 80fe316013..e2497c8bf1 100644 --- a/src/plugins/gitlab/resultparser.cpp +++ b/src/plugins/gitlab/resultparser.cpp @@ -144,7 +144,7 @@ static Project projectFromJson(const QJsonObject &jsonObj) project.displayName = jsonObj.value("name_with_namespace").toString(); project.pathName = jsonObj.value("path_with_namespace").toString(); project.id = jsonObj.value("id").toInt(-1); - project.visibility = jsonObj.value("visibility").toString("public"); + project.visibility = jsonObj.value("visibility").toString(); project.httpUrl = jsonObj.value("http_url_to_repo").toString(); project.sshUrl = jsonObj.value("ssh_url_to_repo").toString(); if (jsonObj.contains("forks_count")) diff --git a/src/plugins/ios/iostoolhandler.cpp b/src/plugins/ios/iostoolhandler.cpp index 0cf9fed5ce..0331ba2cca 100644 --- a/src/plugins/ios/iostoolhandler.cpp +++ b/src/plugins/ios/iostoolhandler.cpp @@ -72,14 +72,12 @@ public: // The future is canceled when app on simulator is stoped. QEventLoop loop; QFutureWatcher<void> watcher; - connect(&watcher, &QFutureWatcher<void>::canceled, this, [&] { - loop.quit(); - }); + connect(&watcher, &QFutureWatcher<void>::canceled, &loop, [&] { loop.quit(); }); watcher.setFuture(fi.future()); // Process to print the console output while app is running. - auto logProcess = [this, fi](QProcess *tailProcess, std::shared_ptr<QTemporaryFile> file) { - QObject::connect(tailProcess, &QProcess::readyReadStandardOutput, this, [=] { + auto logProcess = [&](QProcess *tailProcess, std::shared_ptr<QTemporaryFile> file) { + QObject::connect(tailProcess, &QProcess::readyReadStandardOutput, &loop, [=] { if (!fi.isCanceled()) emit logMessage(QString::fromLocal8Bit(tailProcess->readAll())); }); diff --git a/src/plugins/mcusupport/mcusupportplugin.cpp b/src/plugins/mcusupport/mcusupportplugin.cpp index 7be98fb005..6d33e0481a 100644 --- a/src/plugins/mcusupport/mcusupportplugin.cpp +++ b/src/plugins/mcusupport/mcusupportplugin.cpp @@ -76,8 +76,6 @@ void updateMCUProjectTree(ProjectExplorer::Project *p) const FilePath inputsJsonFile = projectBuildFolder / "CMakeFiles" / (targetName + ".dir") / "config/input.json"; - printMessage("found Input json file " + inputsJsonFile.absoluteFilePath().toString(), true); - if (!inputsJsonFile.exists()) return; diff --git a/src/plugins/mcusupport/wizards/qmlproject/CMakeLists.txt b/src/plugins/mcusupport/wizards/qmlproject/CMakeLists.txt index 4a47af2de0..49a4a8f949 100644 --- a/src/plugins/mcusupport/wizards/qmlproject/CMakeLists.txt +++ b/src/plugins/mcusupport/wizards/qmlproject/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.15) +cmake_minimum_required (VERSION 3.21.1) project(%{CorrectedProjectName} VERSION 0.0.1 LANGUAGES C CXX ASM) diff --git a/src/plugins/mcusupport/wizards/qmlproject/wizard.json b/src/plugins/mcusupport/wizards/qmlproject/wizard.json index 0dd565d731..173c430eeb 100644 --- a/src/plugins/mcusupport/wizards/qmlproject/wizard.json +++ b/src/plugins/mcusupport/wizards/qmlproject/wizard.json @@ -56,13 +56,8 @@ "openAsProject": true }, { - "source": "project.qmlproject.tpl", - "target": "%{ProjectDirectory}/%{QmlProjectFile}", - "openInEditor": true - }, - { - "source": "main.qml.tpl", - "target": "%{ProjectDirectory}/%{MainQmlFile}", + "source": "BackendObject.h", + "target": "%{ProjectDirectory}/src/%{InterfaceFile}", "openInEditor": true }, { @@ -76,8 +71,13 @@ "openInEditor": true }, { - "source": "BackendObject.h", - "target": "%{ProjectDirectory}/src/%{InterfaceFile}", + "source": "project.qmlproject.tpl", + "target": "%{ProjectDirectory}/%{QmlProjectFile}", + "openInEditor": true + }, + { + "source": "main.qml.tpl", + "target": "%{ProjectDirectory}/%{MainQmlFile}", "openInEditor": true }, { @@ -98,7 +98,7 @@ { "source": "translation.nb_NO.ts", "target": "%{ProjectDirectory}/translations/%{TsFile}", - "openInEditor": true + "openInEditor": false }, { "source": "%{IDE:ResourcePath}/templates/wizards/projects/git.ignore", diff --git a/src/plugins/projectexplorer/addrunconfigdialog.cpp b/src/plugins/projectexplorer/addrunconfigdialog.cpp index acdb397704..b0b502f9ed 100644 --- a/src/plugins/projectexplorer/addrunconfigdialog.cpp +++ b/src/plugins/projectexplorer/addrunconfigdialog.cpp @@ -118,6 +118,7 @@ AddRunConfigDialog::AddRunConfigDialog(Target *target, QWidget *parent) const auto proxyModel = new ProxyModel(this); proxyModel->setSourceModel(model); const auto filterEdit = new FancyLineEdit(this); + filterEdit->setFocus(); filterEdit->setFiltering(true); filterEdit->setPlaceholderText(Tr::tr("Filter candidates by name")); m_view->setSelectionMode(TreeView::SingleSelection); diff --git a/src/plugins/qmldesigner/CMakeLists.txt b/src/plugins/qmldesigner/CMakeLists.txt index fae93b19a8..d8c4ff8a71 100644 --- a/src/plugins/qmldesigner/CMakeLists.txt +++ b/src/plugins/qmldesigner/CMakeLists.txt @@ -43,6 +43,7 @@ add_qtc_library(QmlDesignerUtils STATIC ) add_qtc_library(QmlDesignerCore STATIC + EXCLUDE_FROM_INSTALL DEPENDS Threads::Threads Qt::CorePrivate @@ -428,7 +429,12 @@ extend_qtc_plugin(QmlDesigner ${CMAKE_CURRENT_LIST_DIR}/components/texteditor PUBLIC_INCLUDES ${CMAKE_CURRENT_LIST_DIR} + ${CMAKE_CURRENT_LIST_DIR}/designercore + ${CMAKE_CURRENT_LIST_DIR}/designercore/include PUBLIC_DEPENDS + QmlDesignerUtils + QmlPuppetCommunication + DEPENDS QmlDesignerCore SOURCES designmodecontext.cpp designmodecontext.h diff --git a/src/shared/qbs b/src/shared/qbs -Subproject 7cbd3803c32ed8c0141e9dd3d116df3d84d72e8 +Subproject 1a6cfb0af220926f8b00219c5dd7feb36bcaa0d diff --git a/tests/system/README b/tests/system/README index 4edd21f056..45fd2e498b 100644 --- a/tests/system/README +++ b/tests/system/README @@ -5,9 +5,10 @@ Squish tests inside this folder have several prerequisites to get them running. First - and most important - you have to own a valid Squish license. At least Squish 6.0 is required. Second - some of the test suites/test cases expect Qt versions to be installed in their default -locations. On Linux/macOS this is ~/Qt5.x.1 and on Windows this is C:\Qt\Qt5.x.1 and for Qt6 using -an online installer located in SYSTEST_QTOI_BASEPATH which defaults to ~/Qt on UNIX and C:\Qt on -Windows - alternatively set it to the base path of the Qt installation used by the online installer. +locations. For Qt5, this is ~/Qt5.x.1 on Linux/macOS or C:\Qt\Qt5.x.1 on Windows. For Qt6, this is +an installation from the online installer located in ~/Qt on Linux/macOS or C:\Qt on Windows. +Alternatively, you can set the environment variable SYSTEST_QTOI_BASEPATH to a different base path +of the Qt installation from the online installer. It's easiest to use installations of the official opensource Qt packages. Just install the Qt version for the respective toolchain with the components (if available): - (Desktop) <toolchain> <bitness>, e.g. Desktop gcc 64-bit |