Merge remote-tracking branch 'origin/10.0'
Conflicts: src/shared/qbs Change-Id: I33e13270c8c15a51b4ce4eaa6b4584041ed124e0
@@ -122,7 +122,7 @@ function(get_default_defines varName allow_ascii_casts)
|
|||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
function(add_qtc_library name)
|
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"
|
"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}
|
"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}")
|
set(COMPONENT_OPTION "COMPONENT" "${_arg_COMPONENT}")
|
||||||
endif()
|
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}
|
install(TARGETS ${name}
|
||||||
EXPORT QtCreator
|
EXPORT QtCreator
|
||||||
RUNTIME
|
RUNTIME
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
set(IDE_VERSION "9.0.83") # The IDE version.
|
set(IDE_VERSION "9.0.84") # The IDE version.
|
||||||
set(IDE_VERSION_COMPAT "9.0.83") # The IDE Compatibility version.
|
set(IDE_VERSION_COMPAT "9.0.84") # The IDE Compatibility version.
|
||||||
set(IDE_VERSION_DISPLAY "10.0.0-beta2") # The IDE display 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_COPYRIGHT_YEAR "2023") # The IDE current copyright year.
|
||||||
|
|
||||||
set(IDE_SETTINGSVARIANT "QtProject") # The IDE settings variation.
|
set(IDE_SETTINGSVARIANT "QtProject") # The IDE settings variation.
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ function(_extract_ts_data_from_targets outprefix)
|
|||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
function(_create_ts_custom_target name)
|
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)
|
if (_arg_UNPARSED_ARGUMENTS)
|
||||||
message(FATAL_ERROR "Invalid parameters to _create_ts_custom_target: ${_arg_UNPARSED_ARGUMENTS}.")
|
message(FATAL_ERROR "Invalid parameters to _create_ts_custom_target: ${_arg_UNPARSED_ARGUMENTS}.")
|
||||||
endif()
|
endif()
|
||||||
@@ -58,14 +58,7 @@ function(_create_ts_custom_target name)
|
|||||||
set(_arg_TS_TARGET_PREFIX "ts_")
|
set(_arg_TS_TARGET_PREFIX "ts_")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(ts_languages ${_arg_LANGUAGES})
|
set(ts_file "${CMAKE_CURRENT_SOURCE_DIR}/${_arg_FILE_PREFIX}_${l}.ts")
|
||||||
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(_sources "${_arg_SOURCES}")
|
set(_sources "${_arg_SOURCES}")
|
||||||
list(SORT _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")
|
file(WRITE "${ts_file_list}" "${_sources_str}\n${_includes_str}\n")
|
||||||
|
|
||||||
add_custom_target("${_arg_TS_TARGET_PREFIX}${name}"
|
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}"
|
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}
|
DEPENDS ${_sources}
|
||||||
VERBATIM)
|
VERBATIM)
|
||||||
|
|
||||||
add_custom_target("${_arg_TS_TARGET_PREFIX}${name}_no_locations"
|
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}"
|
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}
|
DEPENDS ${_sources}
|
||||||
VERBATIM)
|
VERBATIM)
|
||||||
|
|
||||||
# Add cleaned target only for single-ts targets
|
|
||||||
# Uses lupdate + convert instead of just lupdate with '-locations none -no-obsolete'
|
# 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
|
# 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 path for lconvert...
|
||||||
get_target_property(_lupdate_binary Qt::lupdate IMPORTED_LOCATION)
|
get_target_property(_lupdate_binary Qt::lupdate IMPORTED_LOCATION)
|
||||||
get_filename_component(_bin_dir ${_lupdate_binary} DIRECTORY)
|
get_filename_component(_bin_dir ${_lupdate_binary} DIRECTORY)
|
||||||
|
|
||||||
add_custom_target("${_arg_TS_TARGET_PREFIX}${name}_cleaned"
|
add_custom_target("${_arg_TS_TARGET_PREFIX}${name}_cleaned"
|
||||||
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}
|
||||||
COMMAND ${_bin_dir}/lconvert -locations none -no-ui-lines -no-obsolete ${ts_files} -o ${ts_files}
|
COMMAND ${_bin_dir}/lconvert -locations none -no-ui-lines -no-obsolete ${ts_file} -o ${ts_file}
|
||||||
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
|
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||||
COMMENT "Generate .ts files, remove obsolete and vanished translations, and do not add files and line number"
|
COMMENT "Generate .ts file (${name}), remove obsolete and vanished translations, and do not add files and line number"
|
||||||
DEPENDS ${_sources}
|
DEPENDS ${_sources}
|
||||||
VERBATIM)
|
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()
|
endif()
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
@@ -161,7 +165,8 @@ function(add_translation_targets file_prefix)
|
|||||||
|
|
||||||
_create_ts_custom_target(untranslated
|
_create_ts_custom_target(untranslated
|
||||||
FILE_PREFIX "${file_prefix}" TS_TARGET_PREFIX "${_arg_TS_TARGET_PREFIX}"
|
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}")
|
if (NOT TARGET "${_arg_ALL_QM_TARGET}")
|
||||||
add_custom_target("${_arg_ALL_QM_TARGET}" ALL COMMENT "Generate .qm-files")
|
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}")
|
add_dependencies("${_arg_ALL_QM_TARGET}" "${_arg_QM_TARGET_PREFIX}${l}")
|
||||||
endforeach()
|
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()
|
endfunction()
|
||||||
|
|||||||
33
dist/changelog/changes-10.0.0.md
vendored
@@ -33,7 +33,8 @@ Editing
|
|||||||
* Added renaming of includes when renaming `.ui` files (QTCREATORBUG-14259)
|
* Added renaming of includes when renaming `.ui` files (QTCREATORBUG-14259)
|
||||||
* Added automatic refactoring of C++ code when forms in `.ui` files are renamed
|
* Added automatic refactoring of C++ code when forms in `.ui` files are renamed
|
||||||
(QTCREATORBUG-1179)
|
(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`
|
* Added `Tools > C++ > Find Unused Functions`, and `Find Unused C/C++ Functions`
|
||||||
to the `Projects` view context menu (QTCREATORBUG-6772)
|
to the `Projects` view context menu (QTCREATORBUG-6772)
|
||||||
* Fixed text codec when rewriting headers as part of renaming
|
* Fixed text codec when rewriting headers as part of renaming
|
||||||
@@ -61,9 +62,11 @@ Editing
|
|||||||
### QML
|
### QML
|
||||||
|
|
||||||
* Updated code model to Qt 6.5
|
* 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 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)
|
QTCREATORBUG-26602)
|
||||||
* Added `Follow Symbol` for QRC paths in string literals (QTCREATORBUG-28087)
|
* 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
|
* Adapted the Qt Quick Application wizard template to new features in Qt 6.4
|
||||||
@@ -79,24 +82,28 @@ Editing
|
|||||||
Projects
|
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
|
* Added `Build > Run Generator` for exporting projects to other build systems
|
||||||
(QTCREATORBUG-28149)
|
(QTCREATORBUG-28149)
|
||||||
* Added the option to browse remote file systems for remote builds and targets
|
* 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 wizards did not create target directories (QTCREATORBUG-28346)
|
||||||
* Fixed that absolute paths could be shown when relative paths would be
|
* Fixed that absolute paths could be shown when relative paths would be
|
||||||
preferable (QTCREATORBUG-288)
|
preferable (QTCREATORBUG-288)
|
||||||
|
|
||||||
### CMake
|
### CMake
|
||||||
|
|
||||||
* Added a deployment method with `cmake --install` (QTCREATORBUG-25880)
|
* Added a deployment method with `cmake --install` to `Projects > Run Settings >
|
||||||
* Added the option to use `cmake-format` for CMake files
|
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/))
|
([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
|
* Added support for the `external` strategy for the architecture and toolset of
|
||||||
presets (QTCREATORBUG-28693)
|
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
|
* Changed the environment for running CMake to be based on the build environment
|
||||||
by default (QTCREATORBUG-28513)
|
by default (QTCREATORBUG-28513)
|
||||||
* Fixed that `Package manager auto setup` created a dependency of the project
|
* 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
|
* Removed the wizard template for dynamically loaded `.ui` projects
|
||||||
(QTCREATORBUG-25807)
|
(QTCREATORBUG-25807)
|
||||||
|
|
||||||
### Qt Quick UI Prototype
|
|
||||||
|
|
||||||
* Added support for running on remote Linux devices
|
|
||||||
|
|
||||||
Debugging
|
Debugging
|
||||||
---------
|
---------
|
||||||
|
|
||||||
@@ -180,6 +183,10 @@ Platforms
|
|||||||
* Removed service management from the manifest editor (QTCREATORBUG-28024)
|
* Removed service management from the manifest editor (QTCREATORBUG-28024)
|
||||||
* Fixed `Open package location after build` (QTCREATORBUG-28791)
|
* Fixed `Open package location after build` (QTCREATORBUG-28791)
|
||||||
|
|
||||||
|
### Boot to Qt
|
||||||
|
|
||||||
|
* Fixed the deployment of Qt Quick UI Prototype projects
|
||||||
|
|
||||||
### Docker
|
### Docker
|
||||||
|
|
||||||
* Added support for the remote code model via a remote Clangd
|
* Added support for the remote code model via a remote Clangd
|
||||||
|
|||||||
2
dist/copyright_template.txt
vendored
@@ -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
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||||
|
|
||||||
|
|||||||
|
After Width: | Height: | Size: 5.1 KiB |
BIN
doc/qtcreator/images/qtcreator-build-settings-cmake-current.webp
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
doc/qtcreator/images/qtcreator-build-settings-cmake-initial.webp
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
doc/qtcreator/images/qtcreator-clang-tidy-view.webp
Normal file
|
After Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 5.3 KiB |
BIN
doc/qtcreator/images/qtcreator-files-to-analyze.webp
Normal file
|
After Width: | Height: | Size: 4.3 KiB |
|
Before Width: | Height: | Size: 13 KiB |
BIN
doc/qtcreator/images/qtcreator-preferences-cmake-formatter.webp
Normal file
|
After Width: | Height: | Size: 4.2 KiB |
|
Before Width: | Height: | Size: 4.0 KiB |
BIN
doc/qtcreator/images/qtcreator-preferences-cmake-general.webp
Normal file
|
After Width: | Height: | Size: 3.9 KiB |
|
Before Width: | Height: | Size: 17 KiB |
BIN
doc/qtcreator/images/qtcreator-preferences-cmake-tools.webp
Normal file
|
After Width: | Height: | Size: 8.5 KiB |
BIN
doc/qtcreator/images/qtcreator-settings-run-desktop.webp
Normal file
|
After Width: | Height: | Size: 9.9 KiB |
|
Before Width: | Height: | Size: 24 KiB |
BIN
doc/qtcreator/images/qtcreator-settings-run.webp
Normal file
|
After Width: | Height: | Size: 19 KiB |
@@ -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
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
|
||||||
|
|
||||||
// **********************************************************************
|
// **********************************************************************
|
||||||
@@ -31,73 +31,74 @@
|
|||||||
\endlist
|
\endlist
|
||||||
|
|
||||||
\note The Clang static analyzer checks are a part of Clang-Tidy. To use
|
\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.
|
enable them for Clang-Tidy.
|
||||||
|
|
||||||
Clang tools are delivered and installed with \QC, and therefore you do not
|
\QC comes with the Clang tools, so you do not need to set them up separately.
|
||||||
need to set them up separately.
|
|
||||||
|
|
||||||
In addition to running the tools to collect diagnostics, you can select
|
In addition to running the tools to collect diagnostics, you can select
|
||||||
\inlineimage icons/open.png
|
\inlineimage icons/open.png
|
||||||
to load diagnostics from \l{https://yaml.org/}{YAML} files that you exported
|
to load diagnostics from \l{https://yaml.org/}{YAML} files that you exported
|
||||||
using the \c {-export fixes} option.
|
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
|
\list
|
||||||
\li Select the \inlineimage icons/debugger_singleinstructionmode.png
|
\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++} >
|
\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
|
\endlist
|
||||||
|
|
||||||
To run the Clang tools to analyze an open project:
|
To run Clang-Tidy or Clazy to analyze an open project:
|
||||||
|
|
||||||
\list 1
|
\list 1
|
||||||
|
|
||||||
\li Select \uicontrol Analyze > \uicontrol {Clang-Tidy and Clazy}.
|
\li Select \uicontrol Analyze > \uicontrol {Clang-Tidy} or
|
||||||
|
\uicontrol {Clazy}.
|
||||||
\image qtcreator-files-to-analyze.png "Files to Analyze dialog"
|
|
||||||
|
|
||||||
\li Select the files to apply the checks to.
|
\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.
|
\li Select \uicontrol Analyze to start the checks.
|
||||||
|
|
||||||
\endlist
|
\endlist
|
||||||
|
|
||||||
The found issues are displayed in the \uicontrol {Clang-Tidy and Clazy}
|
The \uicontrol {Clang-Tidy} or \uicontrol {Clazy} view shows the issues:
|
||||||
view:
|
|
||||||
|
|
||||||
\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
|
\note If you select \uicontrol Debug in the mode selector to open the
|
||||||
\uicontrol Debug mode and then select \uicontrol {Clang-Tidy and Clazy},
|
\uicontrol Debug mode and then select \uicontrol {Clang-Tidy} or
|
||||||
you must select the \inlineimage icons/qtcreator-analyze-start-button.png
|
\uicontrol {Clazy}, you must select the
|
||||||
(\uicontrol Start) button to open the \uicontrol {Files to Analyze}
|
\inlineimage icons/qtcreator-analyze-start-button.png
|
||||||
dialog.
|
(\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
|
Double-click an issue to move to the location where the issue appears in
|
||||||
the code editor.
|
the code editor.
|
||||||
|
|
||||||
If a fixit exists for an issue, you can select the check box next to the
|
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}
|
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
|
check box to select all fixits. To see the status of an issue, hover the
|
||||||
hovering the mouse pointer over the icon next to the check box.
|
mouse pointer over the icon next to the check box.
|
||||||
|
|
||||||
To see more information about an issue that is marked with the
|
To see more information about an issue that is marked with the
|
||||||
\inlineimage icons/refactormarker.png
|
\inlineimage icons/refactormarker.png
|
||||||
icon, hover the mouse pointer over the line.
|
icon, hover the mouse pointer over the line.
|
||||||
|
|
||||||
You can disable particular type of checks either globally or for a
|
To disable checks of a particular type either globally or for a
|
||||||
particular project by selecting \uicontrol {Disable This Check} or
|
particular project, select \uicontrol {Disable This Check} or
|
||||||
\uicontrol {Disable These Checks} in the context menu.
|
\uicontrol {Disable These Checks} in the context menu.
|
||||||
|
|
||||||
Select the \inlineimage icons/settings.png
|
Select the \inlineimage icons/settings.png
|
||||||
button to customize Clang diagnostics for the current project.
|
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 restore the global settings, select \uicontrol {Restore Global Settings}.
|
||||||
To view and modify the global settings, select the link in
|
To view and modify the global settings, select the link in
|
||||||
@@ -113,14 +114,14 @@
|
|||||||
\li Select \uicontrol Edit > \uicontrol Preferences > \uicontrol Analyzer >
|
\li Select \uicontrol Edit > \uicontrol Preferences > \uicontrol Analyzer >
|
||||||
\uicontrol {Clang Tools}.
|
\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,
|
\li In the \uicontrol Clang-Tidy and \uicontrol Clazy-Standalone fields,
|
||||||
set the paths to the executables to use.
|
set the paths to the executables to use.
|
||||||
|
|
||||||
\li To build the project before running the Clang tools, select the
|
\li To build the project before running the Clang tools, select the
|
||||||
\uicontrol {Build the project before analysis} check box. The Clang
|
\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
|
they might display misleading warnings about files missing that are
|
||||||
generated during the build. For big projects, not building the
|
generated during the build. For big projects, not building the
|
||||||
project might save some time.
|
project might save some time.
|
||||||
@@ -137,11 +138,11 @@
|
|||||||
\uicontrol {Diagnostic Configurations} dialog, where you can
|
\uicontrol {Diagnostic Configurations} dialog, where you can
|
||||||
select and edit the checks to perform.
|
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.
|
\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
|
\li In the \uicontrol {Diagnostic configuration name} field, give the
|
||||||
configuration a name, and then select \uicontrol OK.
|
configuration a name, and then select \uicontrol OK.
|
||||||
@@ -157,7 +158,7 @@
|
|||||||
To filter the checks, enter a string in the
|
To filter the checks, enter a string in the
|
||||||
\uicontrol {Filter by name} field.
|
\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
|
For more information about the available checkers, see
|
||||||
\l{https://clang-analyzer.llvm.org/available_checks.html}
|
\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
|
\li In the \uicontrol {Clazy Checks} tab, select the level of Clazy
|
||||||
checks to perform.
|
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
|
\li In the \uicontrol Filters field, select topics to view
|
||||||
only checks related to those areas in the \uicontrol Checks field.
|
only checks related to those areas in the \uicontrol Checks field.
|
||||||
|
|||||||
@@ -16,42 +16,47 @@
|
|||||||
the \l{Specifying Build Settings}{Build Settings} of the project.
|
the \l{Specifying Build Settings}{Build Settings} of the project.
|
||||||
Alternatively, you can use CMake presets to configure CMake.
|
Alternatively, you can use CMake presets to configure CMake.
|
||||||
|
|
||||||
The \uicontrol Configuration field displays the effective CMake call that
|
The \uicontrol Configure field displays the effective CMake call that
|
||||||
is constructed by using the values of the \uicontrol {Build directory} and
|
\QC constructs using the values of the \uicontrol {Build directory} and
|
||||||
\uicontrol {Build type} fields.
|
\uicontrol {Build type} fields.
|
||||||
|
|
||||||
\image qtcreator-cmake-build-settings-initial.png "CMake build settings"
|
\image qtcreator-build-settings-cmake-configure.webp {CMake configure command}
|
||||||
|
|
||||||
\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}.
|
|
||||||
|
|
||||||
You can specify additional CMake options, such as \c {--find-debug},
|
You can specify additional CMake options, such as \c {--find-debug},
|
||||||
\c {--trace-expand}, or \c {--warn-uninitialized}, in
|
\c {--trace-expand}, or \c {--warn-uninitialized}, in
|
||||||
\uicontrol {Additional CMake options}. For more information about
|
\uicontrol {Additional CMake options}. For more information about
|
||||||
the available options, click the link in the field name or see
|
the options, click the link in the field name or see \l{CMake: cmake(1)}.
|
||||||
\l{CMake: cmake(1)}.
|
|
||||||
|
|
||||||
After successfully running CMake, you can view and modify the current
|
|
||||||
configuration in \uicontrol {Current Configuration}.
|
|
||||||
|
|
||||||
Select \uicontrol {Kit Configuration} to edit the CMake settings for the
|
Select \uicontrol {Kit Configuration} to edit the CMake settings for the
|
||||||
build and run kit selected for the project.
|
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
|
\section1 CMake Presets
|
||||||
|
|
||||||
You can use CMake presets files to specify common configure, build, and test
|
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}
|
\l{https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html}
|
||||||
{cmake-presets(7)} and store them in project's root directory.
|
{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
|
\QC supports presets up to version 3 (introduced in CMake 3.21), but does not
|
||||||
checking is not enforced. All the fields from version 3 are read and used if
|
enforce version checking. It reads and uses all the fields from version 3 if
|
||||||
present. Test presets are not supported.
|
present. It does not support test presets.
|
||||||
|
|
||||||
You can import the presets the first time you \l {Opening Projects}
|
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
|
{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
|
disabled all kits in the project. To update changes to the
|
||||||
\c CMakePresets.json file, delete the \c CMakeLists.txt.user file.
|
\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
|
You can view the presets in the \uicontrol {Initial Configuration} field and
|
||||||
in the environment configuration field below it.
|
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
|
\section2 Configure Presets
|
||||||
|
|
||||||
@@ -189,6 +194,47 @@
|
|||||||
\uicontrol Edit > \uicontrol Preferences > \uicontrol CMake >
|
\uicontrol Edit > \uicontrol Preferences > \uicontrol CMake >
|
||||||
\uicontrol Tools.
|
\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
|
\section2 Using Conditions
|
||||||
|
|
||||||
The following configure presets are used if they match \c condition. That is,
|
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
|
are passed to CMake in \uicontrol {Initial Configuration} or
|
||||||
\uicontrol {Current Configuration}.
|
\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
|
To add variables, select \uicontrol Add, and then select the type of
|
||||||
the variable that you are adding: \uicontrol Boolean, \uicontrol String,
|
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,
|
To copy the name or value of the selected variable to the clipboard,
|
||||||
select \uicontrol Copy in the context menu.
|
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
|
and then select \uicontrol Edit. If the initial, current, and kit
|
||||||
configuration get out of sync, select \uicontrol {Apply Kit Value} or
|
configuration get out of sync, select \uicontrol {Apply Kit Value} or
|
||||||
\uicontrol {Apply Initial Configuration Value} in the context menu in
|
\uicontrol {Apply Initial Configuration Value} in the context menu in
|
||||||
\uicontrol {Initial Configuration} or \uicontrol {Current Configuration}.
|
\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 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>
|
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
|
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
|
that if you remove the build directory, all the custom variables that are
|
||||||
not part of the initial CMake configuration are also removed.
|
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
|
select \uicontrol Build > \uicontrol {Clear CMake Configuration}, which
|
||||||
removes the CMakeCache.txt file. This enables you to do a full rebuild.
|
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
|
\section1 Re-configuring with Initial Variables
|
||||||
|
|
||||||
To reset CMake variables to the initial ones, select
|
To reset CMake variables to the initial ones, select
|
||||||
@@ -311,21 +371,19 @@
|
|||||||
\uicontrol Preferences > \uicontrol CMake > \uicontrol General >
|
\uicontrol Preferences > \uicontrol CMake > \uicontrol General >
|
||||||
\uicontrol {Ask before re-configuring with initial parameters}.
|
\uicontrol {Ask before re-configuring with initial parameters}.
|
||||||
|
|
||||||
\image qtcreator-preferences-cmake-general.png "General tab in CMake Preferences"
|
|
||||||
|
|
||||||
\section1 Viewing CMake Output
|
\section1 Viewing CMake Output
|
||||||
|
|
||||||
Output from CMake is displayed next to the \uicontrol {Build Settings} and
|
Output from CMake is displayed next to the \uicontrol {Build Settings} and
|
||||||
\uicontrol {Run Settings} panes in the \uicontrol Projects mode.
|
\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
|
To clear the search results, select the \inlineimage icons/clean_pane_small.png
|
||||||
(\uicontrol Clear) button.
|
(\uicontrol Clear) button.
|
||||||
|
|
||||||
You can enter a string in the \uicontrol Filter field to filter output.
|
You can enter a string in the \uicontrol Filter field to filter output.
|
||||||
To specify filtering options, select the
|
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
|
button. You can filter output by using regular expressions or
|
||||||
case-sensitivity. Select \uicontrol {Show Non-matching Lines} to
|
case-sensitivity. Select \uicontrol {Show Non-matching Lines} to
|
||||||
hide the lines that match the filter.
|
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
|
You can add arguments to pass to CMake and the generator and targets for
|
||||||
the build command in \uicontrol {Build Steps}.
|
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,
|
\note While the other CMake generators are installed together with Qt,
|
||||||
you usually need to install Ninja yourself.
|
you usually need to install Ninja yourself.
|
||||||
@@ -366,10 +424,10 @@
|
|||||||
variable.
|
variable.
|
||||||
\li In \uicontrol Projects > \uicontrol {Build & Run} > \uicontrol Build
|
\li In \uicontrol Projects > \uicontrol {Build & Run} > \uicontrol Build
|
||||||
> \uicontrol {Build Settings}, select \uicontrol {Kit Configuration}.
|
> \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}
|
\li Select \uicontrol Change next to the \uicontrol {CMake generator}
|
||||||
field to open the \uicontrol {CMake Generator} dialog.
|
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 In \uicontrol Generator, select \uicontrol Ninja.
|
||||||
\li Select \uicontrol OK to save your changes and close the dialog.
|
\li Select \uicontrol OK to save your changes and close the dialog.
|
||||||
\li Select \uicontrol Close to close the
|
\li Select \uicontrol Close to close the
|
||||||
|
|||||||
@@ -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
|
// 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
|
\QC automatically runs CMake to refresh project information when you edit
|
||||||
a \c CMakeLists.txt configuration file in a project. Project information is
|
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
|
If \QC cannot load the CMake project, the \l Projects view shows a
|
||||||
\uicontrol {<File System>} project node to avoid scanning the file
|
\uicontrol {<File System>} project node to avoid scanning the file
|
||||||
@@ -85,7 +88,7 @@
|
|||||||
\li Select \uicontrol Edit > \uicontrol Preferences > \uicontrol CMake >
|
\li Select \uicontrol Edit > \uicontrol Preferences > \uicontrol CMake >
|
||||||
\uicontrol Tools.
|
\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
|
\li The \uicontrol Name field displays a name for the CMake
|
||||||
installation.
|
installation.
|
||||||
@@ -96,10 +99,6 @@
|
|||||||
\li The \uicontrol {Help file} field displays the path to the
|
\li The \uicontrol {Help file} field displays the path to the
|
||||||
CMake help file (.qch) that comes with CMake.
|
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.
|
\li Select \uicontrol Apply to save your changes.
|
||||||
|
|
||||||
\endlist
|
\endlist
|
||||||
@@ -120,7 +119,7 @@
|
|||||||
The kit also specifies the CMake generator that is used for producing
|
The kit also specifies the CMake generator that is used for producing
|
||||||
project files for \QC and the initial configuration parameters:
|
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}.
|
For more information, see \l {Adding Kits}.
|
||||||
|
|
||||||
@@ -155,6 +154,33 @@
|
|||||||
|
|
||||||
Warnings and errors are displayed in \l {Issues}.
|
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
|
\section1 Adding External Libraries to CMake Projects
|
||||||
|
|
||||||
Through external libraries, \QC can support code completion and syntax
|
Through external libraries, \QC can support code completion and syntax
|
||||||
|
|||||||
@@ -734,8 +734,9 @@
|
|||||||
|
|
||||||
\title Examining Data
|
\title Examining Data
|
||||||
|
|
||||||
Use the \l {Debug Mode Views}{Debug mode views} to examine the data in more
|
Use the \l{Local Variables and Function Parameters}{Locals} and
|
||||||
detail.
|
\l{Evaluating Expressions}{Expressions} views to examine the data
|
||||||
|
in more detail.
|
||||||
|
|
||||||
You can use the following keyboard shortcuts:
|
You can use the following keyboard shortcuts:
|
||||||
|
|
||||||
@@ -767,6 +768,40 @@
|
|||||||
|
|
||||||
\section1 Stepping Into Code
|
\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
|
When using GDB as the debugging backend, you can compress several steps
|
||||||
into one step for less noisy debugging. For more information, see
|
into one step for less noisy debugging. For more information, see
|
||||||
\l{Specifying GDB Settings}.
|
\l{Specifying GDB Settings}.
|
||||||
|
|||||||
@@ -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
|
// 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,
|
To be able to run and debug applications on Boot2Qt devices,
|
||||||
you must add devices and select them in the \QC
|
you must add devices and select them in the \QC
|
||||||
\l{glossary-buildandrun-kit}{kit}.
|
\l{Adding Kits}{kit}.
|
||||||
|
|
||||||
\section1 Enabling the Boot2Qt Plugin
|
\section1 Enabling the Boot2Qt Plugin
|
||||||
|
|
||||||
@@ -33,21 +33,27 @@
|
|||||||
|
|
||||||
\section1 Adding Boot2Qt Devices
|
\section1 Adding Boot2Qt Devices
|
||||||
|
|
||||||
You use a wizard to create the connections. You can use either a
|
If \QC does not automatically detect a device you connected with USB, you can
|
||||||
network connection or a USB connection. If \QC does not automatically
|
use a wizard to create either a network connection or a USB connection to
|
||||||
detect a device you connected with USB, you can use a wizard to
|
it.
|
||||||
create a network connection to the device.
|
|
||||||
|
|
||||||
\note On Ubuntu Linux, the development user account must have access to
|
\note On Ubuntu Linux, the development user account must have access to the
|
||||||
plugged in devices. To allow the development user access to the device
|
plugged-in devices. To grant them access to the device via USB, create a new
|
||||||
via USB, create a new \c udev rule, as described in
|
\c udev rule, as described in
|
||||||
\l{https://doc.qt.io/Boot2Qt/b2qt-requirements-x11.html#setting-up-usb-access-to-embedded-devices}
|
\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}.
|
{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 \uicontrol Edit > \uicontrol Preferences >
|
||||||
\uicontrol Devices > \uicontrol Devices.
|
\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
|
You can protect the connections between \QC and a device by using an
|
||||||
\l{https://www.openssh.com/}{OpenSSH} connection. OpenSSH is a
|
\l{https://www.openssh.com/}{OpenSSH} connection. OpenSSH is a
|
||||||
@@ -57,17 +63,19 @@
|
|||||||
\QC. For more information, see \l {Configuring SSH Connections}.
|
\QC. For more information, see \l {Configuring SSH Connections}.
|
||||||
|
|
||||||
You need either a password or an SSH public and private key pair for
|
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}.
|
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,
|
\QC does not store passwords. If you use password authentication, you may
|
||||||
you may need to enter the password on every connection to the device,
|
need to enter the password upon every connection to the device, or if
|
||||||
or, if caching is enabled, at every \QC restart.
|
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 reboot the selected device, select \uicontrol {Reboot Device}.
|
\image qtcreator-ssh-options.png {SSH preferences}
|
||||||
|
|
||||||
To restore the default application to the device, select
|
|
||||||
\uicontrol {Restore Default App}.
|
|
||||||
|
|
||||||
\section1 Flashing Boot2Qt Devices
|
\section1 Flashing Boot2Qt Devices
|
||||||
|
|
||||||
@@ -75,7 +83,7 @@
|
|||||||
\uicontrol Tools > \uicontrol {Flash Boot to Qt Device} and follow the
|
\uicontrol Tools > \uicontrol {Flash Boot to Qt Device} and follow the
|
||||||
instructions of the wizard.
|
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
|
\section1 Configuring Connections
|
||||||
|
|
||||||
@@ -83,8 +91,8 @@
|
|||||||
specify build and run settings for the device:
|
specify build and run settings for the device:
|
||||||
|
|
||||||
\list 1
|
\list 1
|
||||||
\li Make sure that your device can be reached via an IP address or
|
\li Check that you can reach the IP address of the device, or use USB to
|
||||||
connect it with a USB connection.
|
connect it.
|
||||||
\li Select \uicontrol Edit > \uicontrol Preferences > \uicontrol Kits >
|
\li Select \uicontrol Edit > \uicontrol Preferences > \uicontrol Kits >
|
||||||
\uicontrol {Qt Versions} > \uicontrol Add to add the Qt version
|
\uicontrol {Qt Versions} > \uicontrol Add to add the Qt version
|
||||||
for Boot2Qt.
|
for Boot2Qt.
|
||||||
@@ -100,7 +108,7 @@
|
|||||||
\li Select \uicontrol Edit > \uicontrol Preferences >
|
\li Select \uicontrol Edit > \uicontrol Preferences >
|
||||||
\uicontrol Devices > \uicontrol Devices > \uicontrol Add >
|
\uicontrol Devices > \uicontrol Devices > \uicontrol Add >
|
||||||
\uicontrol Boot2Qt.
|
\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
|
\li In the \uicontrol {Device name} field, enter a name for
|
||||||
the connection.
|
the connection.
|
||||||
\li In the \uicontrol {Device address} field, enter the host
|
\li In the \uicontrol {Device address} field, enter the host
|
||||||
|
|||||||
@@ -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
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
|
||||||
|
|
||||||
// **********************************************************************
|
// **********************************************************************
|
||||||
@@ -14,6 +14,9 @@
|
|||||||
|
|
||||||
\title Getting Started
|
\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
|
\table
|
||||||
\row
|
\row
|
||||||
\li \inlineimage front-gs.png
|
\li \inlineimage front-gs.png
|
||||||
|
|||||||
@@ -31,7 +31,8 @@
|
|||||||
additional debug symbols that you need for debugging the
|
additional debug symbols that you need for debugging the
|
||||||
application but that you can leave out from the release version.
|
application but that you can leave out from the release version.
|
||||||
Generally, you use the debug configuration for testing and the
|
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
|
\row
|
||||||
\li Build step
|
\li Build step
|
||||||
|
|||||||
@@ -99,11 +99,11 @@
|
|||||||
|
|
||||||
\QC automatically runs CMake when you make changes to \c {CMakeLists.txt}
|
\QC automatically runs CMake when you make changes to \c {CMakeLists.txt}
|
||||||
files. To disable this feature, select \uicontrol Edit >
|
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}
|
CMake executable to edit, and then deselect the \uicontrol {Autorun CMake}
|
||||||
check box.
|
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}.
|
For more information, see \l {Setting Up CMake}.
|
||||||
|
|
||||||
|
|||||||
@@ -117,10 +117,6 @@
|
|||||||
window with a widget-based UI. Preferred approach that requires
|
window with a widget-based UI. Preferred approach that requires
|
||||||
you to generate a Python file from the .ui file, to import
|
you to generate a Python file from the .ui file, to import
|
||||||
it directly into your application.
|
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
|
\row
|
||||||
\li Qt Quick Application - Empty
|
\li Qt Quick Application - Empty
|
||||||
\li Creates a Python project that has an empty Qt Quick
|
\li Creates a Python project that has an empty Qt Quick
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
\title Qbs Build Configuration
|
\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
|
Qbs builds projects in the directory specified in the
|
||||||
\uicontrol {Build Directory} field.
|
\uicontrol {Build Directory} field.
|
||||||
@@ -33,15 +33,22 @@
|
|||||||
|
|
||||||
\section1 Qbs Build Steps
|
\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:
|
To specify build steps for Qbs:
|
||||||
|
|
||||||
\list 1
|
\list 1
|
||||||
|
|
||||||
\li In the \uicontrol {Build variant} field, select \uicontrol Debug to
|
\li In the \uicontrol {Build variant} field, select:
|
||||||
include debug symbols in the build for debugging the application and
|
\list
|
||||||
\uicontrol Release to create the final installation file.
|
\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
|
\li In the \uicontrol ABIs field, select the ABIs for
|
||||||
the \l{Connecting Android Devices}{Android} device
|
the \l{Connecting Android Devices}{Android} device
|
||||||
@@ -56,18 +63,18 @@
|
|||||||
\l{http://doc.qt.io/qbs/language-introduction.html}
|
\l{http://doc.qt.io/qbs/language-introduction.html}
|
||||||
{Modules} in the Qbs Manual.
|
{Modules} in the Qbs Manual.
|
||||||
|
|
||||||
\li In the \uicontrol Flags field:
|
\li In the \uicontrol Flags field, select:
|
||||||
|
|
||||||
\list
|
\list
|
||||||
|
|
||||||
\li Select \uicontrol {Keep going} to continue building when
|
\li \uicontrol {Keep going} to continue building when
|
||||||
errors occur, if possible.
|
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
|
command lines to \l{Compile Output} instead of
|
||||||
high-level descriptions.
|
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
|
the configure scripts of
|
||||||
\l{https://doc.qt.io/qbs/qbsprobes-qmlmodule.html}{Probes}.
|
\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}:
|
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
|
\list
|
||||||
|
|
||||||
|
|||||||
@@ -20,11 +20,11 @@
|
|||||||
debug symbols that you need for debugging the application but that you
|
debug symbols that you need for debugging the application but that you
|
||||||
can leave out from the release version. Generally, you use the debug
|
can leave out from the release version. Generally, you use the debug
|
||||||
configuration for testing and the release configuration for creating
|
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
|
If you selected CMake as the build system for the project, you can
|
||||||
use a \e {minimum size release} build configuration to create the
|
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
|
of the binary package as small as possible, even if this makes the
|
||||||
application slower.
|
application slower.
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,15 @@
|
|||||||
and the working directory to use. The working directory defaults to
|
and the working directory to use. The working directory defaults to
|
||||||
the directory of the build result.
|
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.
|
For console applications, check the \uicontrol{Run in terminal} check box.
|
||||||
To specify the terminal to use on Linux and \macos, select \uicontrol Edit
|
To specify the terminal to use on Linux and \macos, select \uicontrol Edit
|
||||||
> \uicontrol Preferences > \uicontrol Environment > \uicontrol System.
|
> \uicontrol Preferences > \uicontrol Environment > \uicontrol System.
|
||||||
@@ -18,8 +27,6 @@
|
|||||||
\uicontrol {Run Environment} section. For more information, see
|
\uicontrol {Run Environment} section. For more information, see
|
||||||
\l {Selecting the Run Environment}.
|
\l {Selecting the Run Environment}.
|
||||||
|
|
||||||
\image qtcreator-pprunsettings.png
|
|
||||||
|
|
||||||
When building an application, \QC creates a list of directories where the
|
When building an application, \QC creates a list of directories where the
|
||||||
linker will look for libraries that the application links to. By
|
linker will look for libraries that the application links to. By
|
||||||
default, the linked libraries are made visible to the executable that
|
default, the linked libraries are made visible to the executable that
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
To view and modify them, select \uicontrol Projects >
|
To view and modify them, select \uicontrol Projects >
|
||||||
\uicontrol {Build & Run} > \uicontrol Run.
|
\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
|
To prevent \QC from automatically creating run configurations, select
|
||||||
\uicontrol Edit > \uicontrol Preferences > \uicontrol {Build & Run},
|
\uicontrol Edit > \uicontrol Preferences > \uicontrol {Build & Run},
|
||||||
@@ -104,7 +104,7 @@
|
|||||||
You can edit existing environment variables or add, reset and unset new
|
You can edit existing environment variables or add, reset and unset new
|
||||||
variables.
|
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
|
When running on the desktop, the \uicontrol {Build Environment} is used by
|
||||||
default, but you can also use the \uicontrol {System Environment} without the
|
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,
|
Specify the executable to run, command line arguments, working directory,
|
||||||
and environment variables to use.
|
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 qtquick/creator-projects-settings-run-qtquick.qdocinc run settings qt quick ui
|
||||||
\include python/creator-python-run.qdocinc run settings python
|
\include python/creator-python-run.qdocinc run settings python
|
||||||
|
|||||||
@@ -76,8 +76,7 @@
|
|||||||
If you only install Qt Creator and Qt, remember to also select the
|
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
|
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
|
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
|
your Qt to be able to build your project.
|
||||||
\l{Adding Qt Quick Timeline Module to Qt Installations}.
|
|
||||||
|
|
||||||
\section1 Converting into qmake Projects
|
\section1 Converting into qmake Projects
|
||||||
|
|
||||||
|
|||||||
@@ -6,16 +6,16 @@ import qbs.Utilities
|
|||||||
Module {
|
Module {
|
||||||
Depends { name: "cpp"; required: false }
|
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_major: '9'
|
||||||
property string ide_version_minor: '0'
|
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 + '.'
|
property string qtcreator_version: ide_version_major + '.' + ide_version_minor + '.'
|
||||||
+ ide_version_release
|
+ ide_version_release
|
||||||
|
|
||||||
property string ide_compat_version_major: '9'
|
property string ide_compat_version_major: '9'
|
||||||
property string ide_compat_version_minor: '0'
|
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 + '.'
|
property string qtcreator_compat_version: ide_compat_version_major + '.'
|
||||||
+ ide_compat_version_minor + '.' + ide_compat_version_release
|
+ ide_compat_version_minor + '.' + ide_compat_version_release
|
||||||
|
|
||||||
|
|||||||
@@ -49,15 +49,15 @@ Module {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Properties {
|
Properties {
|
||||||
condition: qtc_gtest_gmock.useRepo
|
condition: useRepo
|
||||||
cpp.includePaths: [
|
cpp.includePaths: [
|
||||||
FileInfo.joinPaths(qtc_gtest_gmock.gtestDir, "include"),
|
FileInfo.joinPaths(gtestDir, "include"),
|
||||||
FileInfo.joinPaths(qtc_gtest_gmock.gmockDir, "include"),
|
FileInfo.joinPaths(gmockDir, "include"),
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
validate: {
|
validate: {
|
||||||
if (!qtc_gtest_gmock.externalLibsPresent && !gtestProbe.found) {
|
if (!externalLibsPresent && !gtestProbe.found) {
|
||||||
console.warn("No GTest found.");
|
console.warn("No GTest found.");
|
||||||
throw new Error();
|
throw new Error();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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
|
# 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}")
|
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"
|
@if "%{UseSetupCode}" === "true"
|
||||||
add_executable(%{TestCaseName} %{MainCppName}
|
add_executable(%{TestCaseName} %{MainCppName}
|
||||||
setup.cpp setup.h)
|
setup.cpp setup.h)
|
||||||
|
|||||||
@@ -278,20 +278,17 @@ QString packageSubPath(PackageFormat format, BuildConfiguration::BuildType build
|
|||||||
const bool deb = (buildType == BuildConfiguration::Debug);
|
const bool deb = (buildType == BuildConfiguration::Debug);
|
||||||
|
|
||||||
if (format == Apk) {
|
if (format == Apk) {
|
||||||
if (deb)
|
if (deb) {
|
||||||
return sig ? packageSubPath(Apk, BuildConfiguration::Release, true) // Intentional
|
return sig ? packageSubPath(Apk, BuildConfiguration::Release, true) // Intentional
|
||||||
: QLatin1String("apk/debug/android-build-debug.apk");
|
: QLatin1String("apk/debug/android-build-debug.apk");
|
||||||
else
|
}
|
||||||
return QLatin1String(sig ? "apk/release/android-build-release-signed.apk"
|
return QLatin1String(sig ? "apk/release/android-build-release-signed.apk"
|
||||||
: "apk/release/android-build-release-unsigned.apk");
|
: "apk/release/android-build-release-unsigned.apk");
|
||||||
} else {
|
}
|
||||||
return QLatin1String(deb ? "bundle/debug/android-build-debug.aab"
|
return QLatin1String(deb ? "bundle/debug/android-build-debug.aab"
|
||||||
: "bundle/release/android-build-release.aab");
|
: "bundle/release/android-build-release.aab");
|
||||||
}
|
}
|
||||||
|
|
||||||
return {};
|
|
||||||
}
|
|
||||||
|
|
||||||
FilePath AndroidManager::packagePath(const Target *target)
|
FilePath AndroidManager::packagePath(const Target *target)
|
||||||
{
|
{
|
||||||
QTC_ASSERT(target, return {});
|
QTC_ASSERT(target, return {});
|
||||||
|
|||||||
@@ -736,7 +736,7 @@ void AndroidRunnerWorker::handleJdbSettled()
|
|||||||
{
|
{
|
||||||
qCDebug(androidRunWorkerLog) << "Handle JDB settled";
|
qCDebug(androidRunWorkerLog) << "Handle JDB settled";
|
||||||
auto waitForCommand = [this] {
|
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);
|
m_jdbProcess->waitForReadyRead(500);
|
||||||
QByteArray lines = m_jdbProcess->readAll();
|
QByteArray lines = m_jdbProcess->readAll();
|
||||||
const auto linesList = lines.split('\n');
|
const auto linesList = lines.split('\n');
|
||||||
@@ -748,14 +748,20 @@ void AndroidRunnerWorker::handleJdbSettled()
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const QStringList commands{"threads", "cont", "exit"};
|
||||||
|
const int jdbTimeout = 5000;
|
||||||
|
|
||||||
|
for (const QString &command : commands) {
|
||||||
if (waitForCommand()) {
|
if (waitForCommand()) {
|
||||||
m_jdbProcess->write("cont\n");
|
m_jdbProcess->write(QString("%1\n").arg(command).toLatin1());
|
||||||
if (m_jdbProcess->waitForBytesWritten(5000) && waitForCommand()) {
|
m_jdbProcess->waitForBytesWritten(jdbTimeout);
|
||||||
m_jdbProcess->write("exit\n");
|
}
|
||||||
m_jdbProcess->waitForBytesWritten(5000);
|
}
|
||||||
if (!m_jdbProcess->waitForFinished(5000)) {
|
|
||||||
|
if (!m_jdbProcess->waitForFinished(jdbTimeout)) {
|
||||||
m_jdbProcess->terminate();
|
m_jdbProcess->terminate();
|
||||||
if (!m_jdbProcess->waitForFinished(5000)) {
|
if (!m_jdbProcess->waitForFinished(jdbTimeout)) {
|
||||||
qCDebug(androidRunWorkerLog) << "Killing JDB process";
|
qCDebug(androidRunWorkerLog) << "Killing JDB process";
|
||||||
m_jdbProcess->kill();
|
m_jdbProcess->kill();
|
||||||
m_jdbProcess->waitForFinished();
|
m_jdbProcess->waitForFinished();
|
||||||
@@ -764,8 +770,7 @@ void AndroidRunnerWorker::handleJdbSettled()
|
|||||||
qCDebug(androidRunWorkerLog) << "JDB settled";
|
qCDebug(androidRunWorkerLog) << "JDB settled";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
emit remoteProcessFinished(Tr::tr("Cannot attach JDB to the running application."));
|
emit remoteProcessFinished(Tr::tr("Cannot attach JDB to the running application."));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -68,13 +68,8 @@ void GTestOutputReader::processOutputLine(const QByteArray &outputLine)
|
|||||||
m_iteration = match.captured(1).toInt();
|
m_iteration = match.captured(1).toInt();
|
||||||
m_description.clear();
|
m_description.clear();
|
||||||
} else if (line.startsWith(QStringLiteral("Note:"))) {
|
} else if (line.startsWith(QStringLiteral("Note:"))) {
|
||||||
m_description = line;
|
// notes contain insignificant information we fail to include properly into the
|
||||||
if (m_iteration > 1)
|
// visual tree, so ignore them here as they are available inside the text display anyhow
|
||||||
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);
|
|
||||||
m_description.clear();
|
m_description.clear();
|
||||||
} else if (ExactMatch match = disabledTests.match(line)) {
|
} else if (ExactMatch match = disabledTests.match(line)) {
|
||||||
m_disabled = match.captured(1).toInt();
|
m_disabled = match.captured(1).toInt();
|
||||||
|
|||||||
@@ -177,6 +177,8 @@ static ResultHooks::DirectParentHook directParentHook(const QString &functionNam
|
|||||||
return (functionName.isEmpty() && dataTag.isEmpty())
|
return (functionName.isEmpty() && dataTag.isEmpty())
|
||||||
|| (functionName == otherData.m_function
|
|| (functionName == otherData.m_function
|
||||||
&& other.result() != ResultType::TestStart);
|
&& other.result() != ResultType::TestStart);
|
||||||
|
} else if (other.result() == ResultType::MessageInternal) {
|
||||||
|
return other.name() == result.name();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -342,15 +342,9 @@ void ClangModelManagerSupport::findUsages(const CppEditor::CursorInEditor &curso
|
|||||||
|
|
||||||
void ClangModelManagerSupport::switchHeaderSource(const FilePath &filePath, bool inNextSplit)
|
void ClangModelManagerSupport::switchHeaderSource(const FilePath &filePath, bool inNextSplit)
|
||||||
{
|
{
|
||||||
if (ClangdClient * const client = clientForFile(filePath)) {
|
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);
|
client->switchHeaderSource(filePath, inNextSplit);
|
||||||
return;
|
else
|
||||||
}
|
|
||||||
CppModelManager::switchHeaderSource(inNextSplit, CppModelManager::Backend::Builtin);
|
CppModelManager::switchHeaderSource(inNextSplit, CppModelManager::Backend::Builtin);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -154,7 +154,9 @@ FilePaths CMakeProjectImporter::importCandidates()
|
|||||||
}
|
}
|
||||||
|
|
||||||
static CMakeConfig configurationFromPresetProbe(
|
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";
|
const FilePath cmakeListTxt = importPath / "CMakeLists.txt";
|
||||||
cmakeListTxt.writeFileContents(QByteArray("cmake_minimum_required(VERSION 3.15)\n"
|
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());
|
const FilePath cmakeExecutable = FilePath::fromString(configurePreset.cmakeExecutable.value());
|
||||||
|
|
||||||
Environment env = cmakeExecutable.deviceEnvironment();
|
Environment env = cmakeExecutable.deviceEnvironment();
|
||||||
CMakePresets::Macros::expand(configurePreset, env, importPath);
|
CMakePresets::Macros::expand(configurePreset, env, sourceDirectory);
|
||||||
|
|
||||||
env.setupEnglishOutput();
|
env.setupEnglishOutput();
|
||||||
cmake.setEnvironment(env);
|
cmake.setEnvironment(env);
|
||||||
@@ -208,9 +210,14 @@ static CMakeConfig configurationFromPresetProbe(
|
|||||||
: CMakeConfig();
|
: CMakeConfig();
|
||||||
|
|
||||||
auto expandCacheValue =
|
auto expandCacheValue =
|
||||||
[configurePreset, env, importPath, cache](const QString &key) -> QString {
|
[configurePreset, env, sourceDirectory, cache](const QString &key) -> QString {
|
||||||
QString result = cache.stringValueOf(key.toUtf8());
|
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;
|
return result;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -665,7 +672,7 @@ QList<void *> CMakeProjectImporter::examineDirectory(const FilePath &importPath,
|
|||||||
if (cache.valueOf("CMAKE_C_COMPILER").isEmpty()
|
if (cache.valueOf("CMAKE_C_COMPILER").isEmpty()
|
||||||
&& cache.valueOf("CMAKE_CXX_COMPILER").isEmpty()) {
|
&& cache.valueOf("CMAKE_CXX_COMPILER").isEmpty()) {
|
||||||
QApplication::setOverrideCursor(Qt::WaitCursor);
|
QApplication::setOverrideCursor(Qt::WaitCursor);
|
||||||
config = configurationFromPresetProbe(importPath, configurePreset);
|
config = configurationFromPresetProbe(importPath, projectDirectory(), configurePreset);
|
||||||
QApplication::restoreOverrideCursor();
|
QApplication::restoreOverrideCursor();
|
||||||
|
|
||||||
if (!configurePreset.generator) {
|
if (!configurePreset.generator) {
|
||||||
|
|||||||
@@ -140,6 +140,9 @@ void expand(const PresetType &preset, Environment &env, const FilePath &sourceDi
|
|||||||
return env.value(macroName);
|
return env.value(macroName);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Make sure to expand the CMake macros also for environment variables
|
||||||
|
expandAllButEnv(preset, sourceDirectory, value);
|
||||||
|
|
||||||
if (append)
|
if (append)
|
||||||
env.appendOrSet(key, value, sep);
|
env.appendOrSet(key, value, sep);
|
||||||
else
|
else
|
||||||
@@ -173,6 +176,9 @@ void expand(const PresetType &preset, EnvironmentItems &envItems, const FilePath
|
|||||||
return QString("${%1}").arg(macroName);
|
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));
|
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) {
|
value = expandMacroEnv("penv", value, [env](const QString ¯oName) {
|
||||||
return env.value(macroName);
|
return env.value(macroName);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Make sure to expand the CMake macros also for environment variables
|
||||||
|
expandAllButEnv(preset, sourceDirectory, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
void updateToolchainFile(
|
void updateToolchainFile(
|
||||||
|
|||||||
@@ -1085,7 +1085,6 @@ LocatorPopup *createLocatorPopup(Locator *locator, QWidget *parent)
|
|||||||
else
|
else
|
||||||
popup->layout()->addWidget(widget);
|
popup->layout()->addWidget(widget);
|
||||||
popup->setWindowFlags(Qt::Popup);
|
popup->setWindowFlags(Qt::Popup);
|
||||||
popup->setAttribute(Qt::WA_DeleteOnClose);
|
|
||||||
return popup;
|
return popup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -244,7 +244,6 @@ void CdbEngine::adjustOperateByInstruction(bool operateByInstruction)
|
|||||||
return;
|
return;
|
||||||
m_lastOperateByInstruction = operateByInstruction;
|
m_lastOperateByInstruction = operateByInstruction;
|
||||||
runCommand({QLatin1String(m_lastOperateByInstruction ? "l-t" : "l+t"), NoFlags});
|
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
|
bool CdbEngine::canHandleToolTip(const DebuggerToolTipContext &context) const
|
||||||
|
|||||||
@@ -380,10 +380,6 @@ public:
|
|||||||
void doShutdownEngine()
|
void doShutdownEngine()
|
||||||
{
|
{
|
||||||
m_engine->setState(EngineShutdownRequested);
|
m_engine->setState(EngineShutdownRequested);
|
||||||
if (m_engine->isDying()) {
|
|
||||||
m_engine->notifyEngineShutdownFinished();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
m_engine->startDying();
|
m_engine->startDying();
|
||||||
m_engine->showMessage("CALL: SHUTDOWN ENGINE");
|
m_engine->showMessage("CALL: SHUTDOWN ENGINE");
|
||||||
m_engine->shutdownEngine();
|
m_engine->shutdownEngine();
|
||||||
|
|||||||
@@ -1624,10 +1624,6 @@ QString GdbEngine::cleanupFullName(const QString &fileName)
|
|||||||
void GdbEngine::shutdownInferior()
|
void GdbEngine::shutdownInferior()
|
||||||
{
|
{
|
||||||
CHECK_STATE(InferiorShutdownRequested);
|
CHECK_STATE(InferiorShutdownRequested);
|
||||||
if (runParameters().startMode == AttachToCore) {
|
|
||||||
notifyInferiorShutdownFinished();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
DebuggerCommand cmd;
|
DebuggerCommand cmd;
|
||||||
cmd.function = QLatin1String(runParameters().closeMode == DetachAtClose ? "detach " : "kill ");
|
cmd.function = QLatin1String(runParameters().closeMode == DetachAtClose ? "detach " : "kill ");
|
||||||
cmd.callback = CB(handleInferiorShutdown);
|
cmd.callback = CB(handleInferiorShutdown);
|
||||||
@@ -1715,6 +1711,8 @@ void GdbEngine::handleThreadGroupExited(const GdbMi &result)
|
|||||||
notifyExitCode(exitCode);
|
notifyExitCode(exitCode);
|
||||||
if (m_rerunPending)
|
if (m_rerunPending)
|
||||||
m_rerunPending = false;
|
m_rerunPending = false;
|
||||||
|
else if (state() == EngineShutdownRequested)
|
||||||
|
notifyEngineShutdownFinished();
|
||||||
else
|
else
|
||||||
notifyInferiorExited();
|
notifyInferiorExited();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -282,12 +282,12 @@ void LldbEngine::handleLldbStarted()
|
|||||||
cmd2.arg("attachpid", attachedPID);
|
cmd2.arg("attachpid", attachedPID);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
cmd2.arg("startmode", rp.startMode);
|
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
|
// 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
|
// 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
|
QTC_CHECK(rp.attachPID.isValid() && (rp.startMode == AttachToRemoteProcess
|
||||||
|| rp.startMode == AttachToLocalProcess));
|
|| rp.startMode == AttachToLocalProcess
|
||||||
|
|| rp.startMode == AttachToRemoteServer));
|
||||||
cmd2.arg("attachpid", rp.attachPID.pid());
|
cmd2.arg("attachpid", rp.attachPID.pid());
|
||||||
cmd2.arg("sysroot", rp.deviceSymbolsRoot.isEmpty() ? rp.sysRoot.toString()
|
cmd2.arg("sysroot", rp.deviceSymbolsRoot.isEmpty() ? rp.sysRoot.toString()
|
||||||
: rp.deviceSymbolsRoot);
|
: rp.deviceSymbolsRoot);
|
||||||
|
|||||||
@@ -576,6 +576,7 @@ void LogWindow::clearContents()
|
|||||||
{
|
{
|
||||||
m_combinedText->clear();
|
m_combinedText->clear();
|
||||||
m_inputText->clear();
|
m_inputText->clear();
|
||||||
|
theGlobalLog->clearContents();
|
||||||
}
|
}
|
||||||
|
|
||||||
void LogWindow::setCursor(const QCursor &cursor)
|
void LogWindow::setCursor(const QCursor &cursor)
|
||||||
|
|||||||
@@ -338,7 +338,7 @@ void GitLabDialog::handleProjects(const Projects &projects)
|
|||||||
// TODO use a real model / delegate..?
|
// TODO use a real model / delegate..?
|
||||||
listModel->setDataAccessor([](Project *data, int /*column*/, int role) -> QVariant {
|
listModel->setDataAccessor([](Project *data, int /*column*/, int role) -> QVariant {
|
||||||
if (role == Qt::DisplayRole)
|
if (role == Qt::DisplayRole)
|
||||||
return QString(data->displayName + " (" + data->visibility + ')');
|
return data->displayName;
|
||||||
if (role == Qt::UserRole)
|
if (role == Qt::UserRole)
|
||||||
return QVariant::fromValue(*data);
|
return QVariant::fromValue(*data);
|
||||||
return QVariant();
|
return QVariant();
|
||||||
|
|||||||
@@ -144,7 +144,7 @@ static Project projectFromJson(const QJsonObject &jsonObj)
|
|||||||
project.displayName = jsonObj.value("name_with_namespace").toString();
|
project.displayName = jsonObj.value("name_with_namespace").toString();
|
||||||
project.pathName = jsonObj.value("path_with_namespace").toString();
|
project.pathName = jsonObj.value("path_with_namespace").toString();
|
||||||
project.id = jsonObj.value("id").toInt(-1);
|
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.httpUrl = jsonObj.value("http_url_to_repo").toString();
|
||||||
project.sshUrl = jsonObj.value("ssh_url_to_repo").toString();
|
project.sshUrl = jsonObj.value("ssh_url_to_repo").toString();
|
||||||
if (jsonObj.contains("forks_count"))
|
if (jsonObj.contains("forks_count"))
|
||||||
|
|||||||
@@ -72,14 +72,12 @@ public:
|
|||||||
// The future is canceled when app on simulator is stoped.
|
// The future is canceled when app on simulator is stoped.
|
||||||
QEventLoop loop;
|
QEventLoop loop;
|
||||||
QFutureWatcher<void> watcher;
|
QFutureWatcher<void> watcher;
|
||||||
connect(&watcher, &QFutureWatcher<void>::canceled, this, [&] {
|
connect(&watcher, &QFutureWatcher<void>::canceled, &loop, [&] { loop.quit(); });
|
||||||
loop.quit();
|
|
||||||
});
|
|
||||||
watcher.setFuture(fi.future());
|
watcher.setFuture(fi.future());
|
||||||
|
|
||||||
// Process to print the console output while app is running.
|
// Process to print the console output while app is running.
|
||||||
auto logProcess = [this, fi](QProcess *tailProcess, std::shared_ptr<QTemporaryFile> file) {
|
auto logProcess = [&](QProcess *tailProcess, std::shared_ptr<QTemporaryFile> file) {
|
||||||
QObject::connect(tailProcess, &QProcess::readyReadStandardOutput, this, [=] {
|
QObject::connect(tailProcess, &QProcess::readyReadStandardOutput, &loop, [=] {
|
||||||
if (!fi.isCanceled())
|
if (!fi.isCanceled())
|
||||||
emit logMessage(QString::fromLocal8Bit(tailProcess->readAll()));
|
emit logMessage(QString::fromLocal8Bit(tailProcess->readAll()));
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -76,8 +76,6 @@ void updateMCUProjectTree(ProjectExplorer::Project *p)
|
|||||||
const FilePath inputsJsonFile = projectBuildFolder / "CMakeFiles" / (targetName + ".dir")
|
const FilePath inputsJsonFile = projectBuildFolder / "CMakeFiles" / (targetName + ".dir")
|
||||||
/ "config/input.json";
|
/ "config/input.json";
|
||||||
|
|
||||||
printMessage("found Input json file " + inputsJsonFile.absoluteFilePath().toString(), true);
|
|
||||||
|
|
||||||
if (!inputsJsonFile.exists())
|
if (!inputsJsonFile.exists())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|||||||
@@ -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)
|
project(%{CorrectedProjectName} VERSION 0.0.1 LANGUAGES C CXX ASM)
|
||||||
|
|
||||||
|
|||||||
@@ -56,13 +56,8 @@
|
|||||||
"openAsProject": true
|
"openAsProject": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "project.qmlproject.tpl",
|
"source": "BackendObject.h",
|
||||||
"target": "%{ProjectDirectory}/%{QmlProjectFile}",
|
"target": "%{ProjectDirectory}/src/%{InterfaceFile}",
|
||||||
"openInEditor": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"source": "main.qml.tpl",
|
|
||||||
"target": "%{ProjectDirectory}/%{MainQmlFile}",
|
|
||||||
"openInEditor": true
|
"openInEditor": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -76,8 +71,13 @@
|
|||||||
"openInEditor": true
|
"openInEditor": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "BackendObject.h",
|
"source": "project.qmlproject.tpl",
|
||||||
"target": "%{ProjectDirectory}/src/%{InterfaceFile}",
|
"target": "%{ProjectDirectory}/%{QmlProjectFile}",
|
||||||
|
"openInEditor": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"source": "main.qml.tpl",
|
||||||
|
"target": "%{ProjectDirectory}/%{MainQmlFile}",
|
||||||
"openInEditor": true
|
"openInEditor": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -98,7 +98,7 @@
|
|||||||
{
|
{
|
||||||
"source": "translation.nb_NO.ts",
|
"source": "translation.nb_NO.ts",
|
||||||
"target": "%{ProjectDirectory}/translations/%{TsFile}",
|
"target": "%{ProjectDirectory}/translations/%{TsFile}",
|
||||||
"openInEditor": true
|
"openInEditor": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "%{IDE:ResourcePath}/templates/wizards/projects/git.ignore",
|
"source": "%{IDE:ResourcePath}/templates/wizards/projects/git.ignore",
|
||||||
|
|||||||
@@ -118,6 +118,7 @@ AddRunConfigDialog::AddRunConfigDialog(Target *target, QWidget *parent)
|
|||||||
const auto proxyModel = new ProxyModel(this);
|
const auto proxyModel = new ProxyModel(this);
|
||||||
proxyModel->setSourceModel(model);
|
proxyModel->setSourceModel(model);
|
||||||
const auto filterEdit = new FancyLineEdit(this);
|
const auto filterEdit = new FancyLineEdit(this);
|
||||||
|
filterEdit->setFocus();
|
||||||
filterEdit->setFiltering(true);
|
filterEdit->setFiltering(true);
|
||||||
filterEdit->setPlaceholderText(Tr::tr("Filter candidates by name"));
|
filterEdit->setPlaceholderText(Tr::tr("Filter candidates by name"));
|
||||||
m_view->setSelectionMode(TreeView::SingleSelection);
|
m_view->setSelectionMode(TreeView::SingleSelection);
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ add_qtc_library(QmlDesignerUtils STATIC
|
|||||||
)
|
)
|
||||||
|
|
||||||
add_qtc_library(QmlDesignerCore STATIC
|
add_qtc_library(QmlDesignerCore STATIC
|
||||||
|
EXCLUDE_FROM_INSTALL
|
||||||
DEPENDS
|
DEPENDS
|
||||||
Threads::Threads
|
Threads::Threads
|
||||||
Qt::CorePrivate
|
Qt::CorePrivate
|
||||||
@@ -428,7 +429,12 @@ extend_qtc_plugin(QmlDesigner
|
|||||||
${CMAKE_CURRENT_LIST_DIR}/components/texteditor
|
${CMAKE_CURRENT_LIST_DIR}/components/texteditor
|
||||||
PUBLIC_INCLUDES
|
PUBLIC_INCLUDES
|
||||||
${CMAKE_CURRENT_LIST_DIR}
|
${CMAKE_CURRENT_LIST_DIR}
|
||||||
|
${CMAKE_CURRENT_LIST_DIR}/designercore
|
||||||
|
${CMAKE_CURRENT_LIST_DIR}/designercore/include
|
||||||
PUBLIC_DEPENDS
|
PUBLIC_DEPENDS
|
||||||
|
QmlDesignerUtils
|
||||||
|
QmlPuppetCommunication
|
||||||
|
DEPENDS
|
||||||
QmlDesignerCore
|
QmlDesignerCore
|
||||||
SOURCES
|
SOURCES
|
||||||
designmodecontext.cpp designmodecontext.h
|
designmodecontext.cpp designmodecontext.h
|
||||||
|
|||||||
@@ -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.
|
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
|
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
|
locations. For Qt5, this is ~/Qt5.x.1 on Linux/macOS or C:\Qt\Qt5.x.1 on Windows. For Qt6, this is
|
||||||
an online installer located in SYSTEST_QTOI_BASEPATH which defaults to ~/Qt on UNIX and C:\Qt on
|
an installation from the online installer located in ~/Qt on Linux/macOS or C:\Qt on Windows.
|
||||||
Windows - alternatively set it to the base path of the Qt installation used by the online installer.
|
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
|
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):
|
Qt version for the respective toolchain with the components (if available):
|
||||||
- (Desktop) <toolchain> <bitness>, e.g. Desktop gcc 64-bit
|
- (Desktop) <toolchain> <bitness>, e.g. Desktop gcc 64-bit
|
||||||
|
|||||||