Merge "Merge remote-tracking branch 'origin/13.0'"

This commit is contained in:
The Qt Project
2024-03-07 07:34:23 +00:00
151 changed files with 4134 additions and 1934 deletions

View File

@@ -7,7 +7,7 @@ on:
- 'doc/**'
env:
QT_VERSION: 6.6.0
QT_VERSION: 6.6.2
MACOS_DEPLOYMENT_TARGET: 11.0
CLANG_VERSION: 17.0.1
ELFUTILS_VERSION: 0.175
@@ -202,12 +202,12 @@ jobs:
set(url_os "linux_x64")
set(qt_package_arch_suffix "gcc_64")
set(qt_dir_prefix "${qt_version}/gcc_64")
set(qt_package_suffix "-Linux-RHEL_8_6-GCC-Linux-RHEL_8_6-X86_64")
set(qt_package_suffix "-Linux-RHEL_8_8-GCC-Linux-RHEL_8_8-X86_64")
elseif ("${{ runner.os }}" STREQUAL "macOS")
set(url_os "mac_x64")
set(qt_package_arch_suffix "clang_64")
set(qt_dir_prefix "${qt_version}/macos")
set(qt_package_suffix "-MacOS-MacOS_12-Clang-MacOS-MacOS_12-X86_64-ARM64")
set(qt_package_suffix "-MacOS-MacOS_13-Clang-MacOS-MacOS_13-X86_64-ARM64")
endif()
set(qt_base_url "https://\${qt_mirror}/online/qtsdkrepository/${url_os}/desktop/qt6_${qt_version_dotless}")

View File

@@ -10,13 +10,13 @@ instructions:
variableValue: https://ci-files02-hki.ci.qt.io/packages/jenkins/qtcreator_libclang/libclang-release_17.0.1-based
- type: EnvironmentVariable
variableName: QTC_QT_BASE_URL
variableValue: "https://ci-files02-hki.ci.qt.io/packages/jenkins/archive/qt/6.6/6.6.0-released/Qt"
variableValue: "https://ci-files02-hki.ci.qt.io/packages/jenkins/archive/qt/6.6/6.6.2-released/Qt"
- type: EnvironmentVariable
variableName: QTC_QT_MODULES
variableValue: "qt5compat qtbase qtdeclarative qtimageformats qtquick3d qtquicktimeline qtserialport qtshadertools qtsvg qttools qttranslations qtwebengine"
- type: EnvironmentVariable
variableName: MACOSX_DEPLOYMENT_TARGET
variableValue: 10.15
variableValue: 11.0
- type: EnvironmentVariable
variableName: SDKTOOL_MACOSX_DEPLOYMENT_TARGET
variableValue: 10.14
@@ -39,7 +39,7 @@ instructions:
instructions:
- type: EnvironmentVariable
variableName: QTC_QT_POSTFIX
variableValue: "-Linux-RHEL_8_6-GCC-Linux-RHEL_8_6-X86_64.7z"
variableValue: "-Linux-RHEL_8_8-GCC-Linux-RHEL_8_8-X86_64.7z"
- type: EnvironmentVariable
variableName: QTC_SDKTOOL_QT_EXT
variableValue: ".tar.xz"
@@ -51,7 +51,7 @@ instructions:
instructions:
- type: EnvironmentVariable
variableName: QTC_QT_POSTFIX
variableValue: "-MacOS-MacOS_12-Clang-MacOS-MacOS_12-X86_64-ARM64.7z"
variableValue: "-MacOS-MacOS_13-Clang-MacOS-MacOS_13-X86_64-ARM64.7z"
- type: EnvironmentVariable
variableName: QTC_SDKTOOL_QT_EXT
variableValue: ".tar.xz"

View File

@@ -41,6 +41,10 @@ General
([QTCREATORBUG-29886](https://bugreports.qt.io/browse/QTCREATORBUG-29886))
* Fixed issues with the window actions
([QTCREATORBUG-30381](https://bugreports.qt.io/browse/QTCREATORBUG-30381))
* Known Issues
* Installers provided by The Qt Company mostly display English text, not
the system's language
([QTIFW-3310](https://bugreports.qt.io/browse/QTIFW-3310))
Editing
-------
@@ -206,7 +210,7 @@ Analyzer
### Clang
* Added `Edit Checks as Strings` for Clazy
* Added `Edit Checks as String` for Clazy
([QTCREATORBUG-24846](https://bugreports.qt.io/browse/QTCREATORBUG-24846))
### Axivion

Binary file not shown.

After

Width:  |  Height:  |  Size: 153 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 315 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 306 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 377 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 253 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 300 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

View File

@@ -44,7 +44,7 @@
example, and use the results to make the tests more efficient and
complete.
\li \l{Static Code Analysis}{Axivion}
\li \l{Prevent code erosion}{Axivion}
Do static code analysis and architecture analysis to detect and
eliminate unnecessary complexity of code.

View File

@@ -1,16 +1,17 @@
// Copyright (C) 2023 The Qt Company Ltd.
// Copyright (C) 2024 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\previouspage creator-coco.html
\page creator-axivion.html
\nextpage creator-valgrind-overview.html
\previouspage creator-how-tos.html
\title Static Code Analysis
\ingroup creator-how-to-analyze
\title Prevent code erosion
\l{https://www.axivion.com/en/products/axivion-suite/}{Axivion Suite} is
a tool suite for protecting software from erosion. Static code analysis,
architecture analysis, and code-smells-detection enable you to:
a tool suite for protecting software from erosion. With static code analysis,
architecture analysis, and code-smells-detection, you can:
\list
\li Check the source code for potential runtime errors.
@@ -22,50 +23,164 @@
\li Detect unreachable code.
\endlist
The experimental Axivion plugin integrates the Axivion dashboard server into
\QC.
Connect to an Axivion dashboard server from \QC to view results of code
analysis.
\note Enable the Axivion plugin to use it.
To use the plugin, you must set up a project in the Axivion dashboard
server and link to it from \QC. You can then see style violations in the
\uicontrol Edit mode and descriptions and issue counts in the
\uicontrol Axivion view.
server and link to it from \QC. You can then see found issues in the
\uicontrol Edit mode, issues in the \uicontrol Axivion dashboard, and
issue details in the \uicontrol Axivion sidebar view.
The editor shows style violations as inline annotations. Hover the mouse over
The editor shows found issues as inline annotations. Hover the mouse over
an annotation to bring up a tool tip with a short description of the issue.
\image qtcreator-axivion-annotation.webp {Annotation popup}
Select the \inlineimage icons/info.png
button to view detailed information about the issue in the \uicontrol Axivion
view.
Select \inlineimage icons/info.png to view detailed information about the
issue in the \uicontrol Axivion sidebar view.
\image qtcreator-axivion-view-rule.webp {Axivion view}
\image qtcreator-axivion-view-rule.webp {Axivion sidebar view}
\section1 View issue counts
To view the issue counts, select \inlineimage icons/home.png
(\uicontrol {Show Dashboard}).
(\uicontrol {Show Dashboard}) in the \uicontrol Axivion dashboard.
\section1 Connecting to Axivion Dashboard Servers
\image qtcreator-axivion-view.webp {Axivion dashboard}
To connect to Axivion:
The \uicontrol Axivion dashboard lists the numbers of the following types of
issues that Axivion found in the linked project:
\table
\header
\li Icon
\li Type
\li Description
\row
\li \inlineimage icons/axivion-av.png
\li \uicontrol AV
\li Architecture violations, such as hidden dependencies.
\row
\li \inlineimage icons/axivion-cl.png
\li \uicontrol CL
\li Clones, such as duplicates and similar pieces of code.
\row
\li \inlineimage icons/axivion-cy.png
\li \uicontrol CY
\li Cyclic dependencies, such as call, component, and include cycles.
\row
\li \inlineimage icons/axivion-de.png
\li \uicontrol DE
\li Dead entities are callable entities in the source code that cannot
be reached from the entry points of the system under analysis.
\row
\li \inlineimage icons/axivion-mv.png
\li \uicontrol MV
\li Violations of metrics based on lines and tokens,
nesting, cyclomatic complexity, control flow, and so on.
\row
\li \inlineimage icons/axivion-sv.png
\li \uicontrol SV
\li Style violations, such as deviations from the naming
or coding conventions.
\endtable
To clear the view, select \inlineimage icons/clean_pane_small.png
(\uicontrol Clear).
To view issues, select \inlineimage icons/zoom.png
(\uicontrol {Search for Issues}).
\section1 Filter issues
\image qtcreator-axivion-issue-search.webp {Issues in Axivion view}
To filter issues, select:
\list
\li The icon of an issue type.
\li Two analyzed versions to compare. Select \uicontrol EMPTY to see
issues from the version you select in the right-side version box.
\li \inlineimage icons/arrowup.png to see only added issues.
\li \inlineimage icons/arrowdown.png to see only removed issues.
\li The owner of the issue. Select \uicontrol ANYBODY to see all issues,
\uicontrol NOBODY to see issues that are not associated with a user,
or a user name to see issues owned by a particular user.
\li Path patterns to show issues in the files in the directories that
match the pattern.
\endlist
The information you see depends on the issue type. Double-click an issue
to see more information about it in the \uicontrol Axivion sidebar view.
\section1 Jump to issues in the editor
Typically, the details for cycles and clones show several paths. To view the
issues in the editor:
\list
\li Click in a location column (that shows a file or line) to open the
respective location (if it can be found).
\li Click in other columns to open the first link in the issue details.
Usually, it leads to the \uicontrol {Left location} or
\uicontrol {Source location}.
\endlist
The easiest way to jump to the \uicontrol {Right location} is to
select the link in the details or in the \uicontrol {Right Path}
or \uicontrol {Target Path} column.
\sa {Enable and disable plugins}, {Link projects to Axivion dashboards},
{Axivion}
*/
/*!
\page creator-preferences-axivion.html
\previouspage creator-reference.html
\ingroup creator-reference-preferences
\title Axivion
\brief Create a connection to an Axivion dashboard server.
Set preferences for the Axivion static code analysis tool in
\preferences > \uicontrol Axivion.
\image qtcreator-preferences-axivion.webp {General tab in Axivion Preferences}
To connect to an Axivion dashboard server:
\list 1
\li Select \preferences > \uicontrol Axivion.
\image qtcreator-preferences-axivion.webp {General tab in Axivion Preferences}
\li Select \uicontrol Edit to create a connection to the Axivion
dashboard server.
\image qtcreator-edit-dashboard-configuration.webp {Edit Dashboard Configuration dialog}
\li In \uicontrol {Dashboard URL}, enter the URL of the server.
\li In \uicontrol Description, enter a free-text description of the
server.
\li In \uicontrol {Access token}, enter the IDE application token that
you created in the server, in user preferences.
\li In \uicontrol Username, enter the username to access the server.
\endlist
\section1 Linking to Dashboards
The first time you access the server, you must enter the password that
matches the username. It is stored safely in your keychain that is provided
by the OS for later use.
To link a project to a dashboard:
Select \uicontrol {Highlight marks} to highlight found issues on the
scrollbar in the editor.
\sa {Enable and disable plugins}, {Link projects to Axivion dashboards},
{Prevent code erosion}
*/
/*!
\page creator-link-axivion-dashboards.html
\previouspage creator-how-tos.html
\ingroup creator-how-to-projects-configure
\title Link projects to Axivion dashboards
To link a project to an Axivion dashboard:
\list 1
\li \uicontrol Projects > \uicontrol {Project Settings} >
@@ -78,26 +193,5 @@
To unlink a project, select \uicontrol {Unlink Project}.
\section1 Viewing Issue Counts
\image qtcreator-axivion-view.webp {Axivion view}
The \uicontrol Axivion view lists the numbers of the following types of
issues that Axivion found in the linked project:
\list
\li \uicontrol AV - architecture violations, such as hidden dependencies
\li \uicontrol CL - duplicates and similar pieces of code
\li \uicontrol CY - call, component, and include cycles
\li \uicontrol DE - dead code
\li \uicontrol MV - violations of metrics based on lines and tokens,
nesting, cyclomatic complexity, control flow, and so on.
\li \uicontrol SV - style violations, such as deviations from the naming
or coding conventions
\endlist
To clear the view, select \inlineimage icons/clean_pane_small.png
(\uicontrol Clear).
\sa {Enable and disable plugins}
\sa {Enable and disable plugins}, {Prevent code erosion}, {Axivion}
*/

View File

@@ -247,20 +247,24 @@
\l{https://clang-analyzer.llvm.org/available_checks.html}
{Clang Static Analyzer documentation}.
\li To edit the selected check as plain text, select
\li To edit the selected checks as plain text, select
\uicontrol {Edit Checks as String}.
\li In the \uicontrol {Clazy Checks} tab, select the level of Clazy
checks to perform.
\image qtcreator-clazy.png {Clazy Checks tab}
\image qtcreator-clazy.webp {Clazy Checks tab}
\li To edit the selected checks as plain text, select
\uicontrol {Edit Checks as String}.
\li In the \uicontrol Filters field, select topics to view
only checks related to those areas in the \uicontrol Checks field.
To filter the checks in the selected areas, enter a string in the
\uicontrol {Filter by name} field.
\li To view all checks again, select \uicontrol {Reset Filter}.
\li To view all checks again, select \uicontrol {Reset Topic Filter}.
\li To view more information about the checks online, select the
\uicontrol {Web Page} links next to them.

View File

@@ -94,9 +94,9 @@
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 edit environment settings}.
To batch edit variable values, select \uicontrol {Batch Edit}.
\image qtcreator-edit-cmake-configuration.webp {Edit CMake Configuration dialog}
To build using the current configuration, select \uicontrol {Run CMake}.
While building, the button text changes to \uicontrol {Stop CMake}. Select
@@ -200,6 +200,26 @@
\image qtcreator-build-configuration-set-clicolor-force.webp {Build Environment with CLICOLOR_FORCE set}
\section1 Using Junction Points on Windows
To overcome issues with long paths on Windows, create and use
\l{https://learn.microsoft.com/en-us/sysinternals/downloads/junction}
{junction points} for the source and build directories. At a junction point,
a directory serves as an alias to another directory on the computer.
To use the junction points for CMake configure, build, and install
operations, go to \preferences > \uicontrol CMake > \uicontrol General and
select \uicontrol {Use junctions for CMake configuration and build operations}.
\image qtcreator-preferences-cmake-general.webp {CMake General preferences}
\QC stores junction points in \c {C:\ProgramData\QtCreator\Links}. To use
another path, set it as the value of the \c QTC_CMAKE_JUNCTIONS_DIR
environment variable.
Set the \c QTC_CMAKE_JUNCTIONS_HASH_LENGTH environment variable to shorten
the MD5 hash key length from the default length value of 32.
\section1 CMake Build Steps
\QC builds CMake projects by running \c {cmake . --build}, which then runs

View File

@@ -198,8 +198,8 @@
\uicontrol Projects view and select \uicontrol {Open With} >
\uicontrol {CMake Editor}.
You can also use the \c cmo filter in the \l {Searching with the Locator}
{locator} to open the CMakeLists.txt file for the current run configuration
You can also use the \c cmo filter in the \l {Navigate with locator}{locator}
to open the CMakeLists.txt file for the current run configuration
in the editor. This is the same build target as when you select
\uicontrol Build > \uicontrol {Build for Run Configuration}.

View File

@@ -115,9 +115,17 @@
\title Launching the Debugger
To start an application from an open project under the control of a
debugger, select the \inlineimage icons/qtcreator-debug-button.png
(\uicontrol {Start Debugging of Startup Project}) button or press \key F5.
You can start an application from an open project under the control of a
debugger in the following ways:
\list
\li Select \inlineimage icons/qtcreator-debug-button.png
(\uicontrol {Start Debugging of Startup Project}).
\li Press \key F5.
\li Enter \c {dr} in the locator, and select the project to debug.
\li Go to \uicontrol Debug > \uicontrol {Start Debugging} >
\uicontrol {Start Debugging of Startup Project}.
\endlist
\QC checks whether the compiled application is up-to-date, and rebuilds and
deploys it if you set the \uicontrol {Build before deploying} field to

View File

@@ -2,100 +2,35 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\page creator-editor-refactoring.html
\previouspage creator-jump-to-the-code.html
\nextpage creator-editor-options.html
\title Refactoring
To quickly and conveniently apply actions to refactor your
code, \l{Apply quick fixes}{select quick fixes in a context menu}.
By default, the refactored files are saved automatically. To disable
this feature, deselect \preferences > \uicontrol Environment >
\uicontrol System > \uicontrol {Auto-save files after refactoring}.
\if defined(qtcreator)
\section1 Finding Symbols
To find instances of a specific symbol in your Qt C++ project, place the
cursor on the symbol in the editor and select \uicontrol Tools >
\uicontrol {C++} > \uicontrol {Find References to Symbol Under Cursor} or
press \key {Ctrl+Shift+U}.
\image qtcreator-find-references-to-symbol-under-cursor.png {Search results for finding references to symbols}
To view the same results color-coded according to the access type, such as
read, write, or declaration, select \uicontrol Tools > \uicontrol {C++} >
\uicontrol {Find References with Access Type}.
\note Select \uicontrol Edit > \uicontrol {Find/Replace} >
\uicontrol {Advanced Find} > \uicontrol {C++ Symbols} to search for
classes, functions, enums, and declarations (including type aliases) either
from files listed as part of the project or from all files that are used by
the code, such as include files.
\image qtcreator-search-cpp-symbols.png
\endif
\section1 Viewing Search Results
\QC searches from the following locations:
\list
\li Files listed as a part of the project
\li Files directly used by the project files (for example, generated
files)
\if defined(qtcreator)
\li Header files of used frameworks and libraries
\endif
\endlist
\l{Search Results View} shows the location and number of search hits in the
current project.
\if defined(qtcreator)
\image qtcreator-refactoring-find.png
\page creator-how-to-rename-symbols.html
\if defined(qtdesignstudio)
\previouspage studio-finding.html
\else
\image qml-find-usages.png
\previouspage creator-how-tos.html
\endif
Browse the search results in the following ways:
\ingroup creator-how-to-search
\list
\li To go directly to an instance, double-click the instance in
\uicontrol {Search Results}.
\li To move between instances, click the \inlineimage icons/next.png
(\uicontrol {Next Item}) button and \inlineimage icons/prev.png
(\uicontrol {Previous Item}) button in \uicontrol {Search Results}.
\li To expand and collapse the list of all instances, click the
\inlineimage icons/qtcreator-expand.png
(\uicontrol {Expand All}) button.
\li To filter the search results for the usage of symbols according to
access type, such as read, write, or declaration, click the
\inlineimage icons/filtericon.png
(\uicontrol {Filter Tree}) button and select the access type.
\li To clear the search results, click the
\inlineimage icons/clean_pane_small.png
(\uicontrol Clear) button.
\li To start a new search, click the
\inlineimage icons/qtcreator-new-search-icon.png
(\uicontrol {New Search}) button.
\endlist
\section1 Renaming Symbols
\title Rename symbols
You can rename symbols in all files in a project.
\if defined(qtcreator)
When you rename a class, you can also change filenames that match the
class name.
To rename a C++ symbol in a project, place the cursor
on it and select \uicontrol Tools > \uicontrol {C++} >
\uicontrol {Rename Symbol Under Cursor} or press \key {Ctrl+Shift+R}.
Use the keyboard shortcut to rename Python symbols.
To rename a C++ symbol in a project:
\list 1
\li Place the cursor on the symbol in the editor.
\li Go to \uicontrol Tools > \uicontrol {C++} >
\uicontrol {Rename Symbol Under Cursor}, or press \key {Ctrl+Shift+R}.
Use the keyboard shortcut to rename Python symbols.
\endlist
\endif
To rename a QML type in a project, select \uicontrol Tools >
To rename a QML type in a project, go to \uicontrol Tools >
\uicontrol {QML/JS} > \uicontrol {Rename Symbol Under Cursor}
or press \key {Ctrl+Shift+R}.
@@ -109,23 +44,23 @@
\endif
To replace all selected instances, enter the name of the new symbol
in the \uicontrol {Replace with} text box, and select \uicontrol Replace.
To omit an instance, deselect the check box next to the instance.
in \uicontrol {Replace with}, and select \uicontrol Replace.
To omit an instance, clear the check box next to the instance.
\note This action replaces all selected instances of the symbol in
all files listed in \uicontrol {Search Results}. You cannot
undo this action.
\if defined(qtcreator)
If the symbol is a class, select the \uicontrol {Rename files} check
box to also change the filenames that match the class name.
If the symbol is a class, select \uicontrol {Rename files} to also change
the filenames that match the class name.
\note Renaming local symbols does not open \uicontrol {Search Results}.
The instances of the symbol are highlighted in code, and you can edit
the symbol. All instances of the local symbol are changed as you type.
\sa {Specify settings for quick fixes}, {Quick Fixes}, {C++ Quick Fixes}
\sa {Find symbols}, {Specify settings for quick fixes}, {Quick Fixes},
{C++ Quick Fixes}
\endif
\sa {Apply quick fixes}, {QML Quick Fixes}

View File

@@ -46,13 +46,6 @@
and file systems.
\endif
\li \l{Refactoring}
Code refactoring is the process of improving and simplifying code
without modifying the existing functionality of an application. You
can easily find and rename symbols and apply predefined actions to
refactor code.
\li \l{Configuring the Editor}
You can change the fonts, colors, highlighting, and indentation.
@@ -65,5 +58,7 @@
\if defined(qtcreator)
\sa {Using GitHub Copilot}
\else
\sa {Apply quick fixes}
\endif
*/

View File

@@ -1,325 +0,0 @@
// Copyright (C) 2023 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\page creator-editor-locator.html
\previouspage creator-how-to-advanced-search.html
\if defined(qtdesignstudio)
\nextpage creator-jump-to-the-code.html
\else
\nextpage creator-how-tos.html
\endif
\title Searching with the Locator
The locator is the fastest way to find a particular project, file, class, or
function, or almost anything else in your project.
By default, you can find the locator in the bottom left of the \QC window.
To open it as a centered popup, click \inlineimage icons/magnifier.png
(\uicontrol Options) in it and select \uicontrol {Open as Centered Popup}.
\image qtcreator-locator.webp "List of locator filters"
\section1 Activating the Locator
To activate the locator:
\list
\li Press \key {Ctrl+K} (\key {Cmd+K} on \macos).
\li Select \uicontrol Tools > \uicontrol Locate.
\li Select \uicontrol Edit > \uicontrol {Go to Line}.
\if defined(qtcreator)
\li Click the line and column indicator on the
\l{Edit Mode}{editor toolbar}.
\endif
\endlist
\section1 Using Locator Filters
You can locate not only files, but any items defined by \e{locator filters},
as well as trigger global actions and perform other tasks, such as build
projects or run external tools.
The filters that are available depend on the file type. For more information
about what a particular locator filter does, see the tooltips that appear
when you hover over a filter in the locator. For longer descriptions of the
filters, select \uicontrol Configure to open the \uicontrol Locator
\l{Creating Locator Filters}{preferences}.
To use a locator filter, type its prefix followed by \key Space. The prefix
is usually short, from one to three characters. Then type the search string
(for example, a filename or class name) or the command to execute.
You can also double-click a locator filter in the filter list to use it. Use
the up and down arrow keys or the \key Ctrl+P and \key Ctrl+N
keyboard shortcuts to move up and down the list, and then press \key Enter
to use the selected filter.
As you type a search string,
the locator shows the occurrences of that string regardless of where in the
name of an component it appears. Some locator filters, such as colon, \c m,
and \c t, support \e fuzzy matching, which means that you can enter the
uppercase letters to locate a symbol when using camel case or the letters
after the underscore when using snake case.
To narrow down the search results, use the following wildcard characters:
\list
\li To match any number of any or no characters, enter \c{*}.
\li To match a single instance of any character, enter \c{?}.
\endlist
\section2 Locating Lines and Columns
To move directly to a particular line and column in the document when you
open the document, append the line and column number to the file name in
the locator, separated by plus signs (+) or colons (:).
For example, to open \e HelloWorld.qml to line
41 and column 2, enter:
\code
HelloWorld.qml:41:2
\endcode
\section2 Creating Files and Directories from Locator
To create a new file and open it in the editor, type \c f
followed by \key Space, followed by path and file name, and then press
\key Enter or select \uicontrol {Create and Open File}. To create a
directory, select \uicontrol {Create Directory}.
\section2 Opening Sessions from Locator
You can use the filter that triggers menu commands to open
\l{Manage sessions}{sessions}. Enter
\c {t yoursess} or \c {t sess yoursess} to trigger \uicontrol File >
\uicontrol Sessions > \e <session_name>.
\section2 Default Filters
By default, you can use the following preset locator filters without a
prefix:
\list
\li Going to a line and column in the current file (\c {l}).
\li Going to an open file (\c {o}).
\li Going to a file in any open project (\c {a}).
\endlist
\section1 Changing Locator Filters
You can change the preset locator filters to match your use case. For
example, you can change the filter prefix and restrict the search to
items that match the filter.
\image qtcreator-locator-filter-edit-ai.webp {Filter Configuration dialog}
To configure a locator filter:
\list 1
\li In the locator, click \inlineimage icons/magnifier.png
(\uicontrol Options) and select \uicontrol Configure to open the
\uicontrol Locator preferences.
\li Select a filter, and then select \uicontrol Edit.
\li Specify the prefix string.
\li To implicitly include the filter even when not typing a prefix as a
part of the search string, select \uicontrol {Include by default}.
\li Set other available preferences.
\endlist
\section2 Adding Web Search Engines
You can use the \uicontrol {Web Search (r)} locator filter to perform
web searches. URLs and search commands for Bing, Google, Yahoo! Search,
cplusplus.com, and Wikipedia are configured by default.
To find out the format of the search command to use for your favorite
web search engine, perform a search in your browser and copy the resulting
URL to the locator filter configuration. Replace the search term with the
variable \c {%1}.
To add URLs and search commands to the list:
\list 1
\li Select \preferences > \uicontrol Environment > \uicontrol Locator >
\uicontrol {Web Search} > \uicontrol Edit.
\li Select \uicontrol Add to add a new entry to the list.
\image qtcreator-add-online-doc.webp "List of URLs in Filter Configuration dialog"
\li Double-click the new entry to specify a URL and a search command.
For example, \c {http://www.google.com/search?q=%1}.
\li Click \uicontrol OK.
\endlist
\section1 Creating Locator Filters
You can create custom locator filters for searching in a directory structure
or on the web.
To quickly access files not directly mentioned in your project, you can
create your own directory filters. That way you can locate files in a
directory structure you have defined.
To create custom locator filters:
\list 1
\li In the locator, select \uicontrol Options >
\uicontrol Configure to open the \uicontrol Locator preferences.
\image qtcreator-locator-customize.webp "Locator preferences"
\li Select \uicontrol Add > \uicontrol {Files in Directories} to add
a directory filter or \uicontrol {URL Template} to add a URL
filter. The settings to specify depend on the filter type.
\image qtcreator-locator-generic-directory-filter.png "Filter Configuration dialog"
\li In the \uicontrol Name field, enter a name for your filter.
\li In the \uicontrol Directories field, select at least one
directory. The locator searches directories recursively.
\li In the \uicontrol {File pattern} field, specify file patterns to
restrict the search to files that match the pattern.
Separate the patterns with commas. For example, to search for all
\c {.qml} and \c {.ui.qml} files, enter \c{*.qml,*.ui.qml}
\li In the \uicontrol {Exclusion pattern} field, specify file
patterns to omit files from the search.
\li In the \uicontrol Prefix field, specify the prefix string.
To implicitly include the filter even when not typing a prefix
as a part of the search string, select
\uicontrol {Include by default}.
\li Select \uicontrol OK.
\endlist
\section1 Configuring Locator Cache
The locator searches the files matching your file pattern in the directories
you have selected and caches that information. \QC updates the cache for all
preset filters as you write code. By default, \QC updates your custom
filters once an hour.
To update the cached information manually, select \uicontrol Options >
\uicontrol Refresh in the locator.
To set a new cache update time:
\list 1
\li Select \preferences > \uicontrol Environment > \uicontrol Locator.
\li In \uicontrol {Refresh interval}, define new time in minutes.
\endlist
\section1 Executing JavaScript
The locator has a JavaScript interpreter for performing calculations.
Beside simple mathematical operations, like ((1 + 2) * 3), the following
built-in functions exist:
\table
\header
\li Function
\li Purpose
\row
\li abs(x)
\li Returns the absolute value of x
\row
\li acos(x)
\li Returns the arccosine of x, in radians
\row
\li asin(x)
\li Returns the arcsine of x, in radians
\row
\li atan(x)
\li Returns the arctangent of x, in radians
\row
\li atan2(x, y)
\li Returns the arctangent of the quotient of its arguments
\row
\li bin(x)
\li Returns the binary representation of x
\row
\li ceil(x)
\li Returns the value of x rounded up to the next integer
\row
\li cos(x)
\li Returns the cosine of x (x is in radians)
\row
\li exp(x)
\li Returns the value of E to the power of x
\row
\li e()
\li Returns Euler's number E (2.71828...)
\row
\li floor(x)
\li Returns the value of x rounded down to the next integer
\row
\li hex(x)
\li Returns the hexadecimal representation of x
\row
\li log(x)
\li Returns the natural logarithm (base E) of x
\row
\li max([value1[, value2[, ...]]])
\li Returns the highest value of the given numbers
\row
\li min([value1[, value2[, ...]]])
\li Returns the lowest value of the given numbers
\row
\li oct(x)
\li Returns the octal representation of x
\row
\li pi()
\li Returns PI (3.14159...)
\row
\li pow(x, y)
\li Returns the value of x to the power of y
\row
\li random()
\li Returns a random number between 0 and 1
\row
\li round(x)
\li Returns the value of x rounded to the next integer
\row
\li sin(x)
\li Returns the sine of x (x is in radians)
\row
\li sqrt(x)
\li Returns the square root of x
\row
\li tan(x)
\li Returns the tangent of x (x is in radians)
\endtable
*/

View File

@@ -27,7 +27,7 @@
\li Syntactic and \l{Semantic Highlighting}{semantic highlighting}
\li Navigating in the code by using the \l{Searching with the Locator}
\li Navigating in the code by using the \l{Navigate with locator}
{locator}, \l{Move to symbol definition or declaration}
{following symbols}, and so on
@@ -38,7 +38,9 @@
\li \l{View function tooltips}{Tooltips}
\li \l{Finding Symbols}{Finding and renaming symbols}
\li \l{Find symbols}{Finding symbols}
\li \l{Rename symbols}{Renaming symbols}
\li \l{Apply quick fixes}{Quick fixes}

View File

@@ -173,7 +173,7 @@
\sa {Edit Code}{How To: Edit Code},
{Manage Language Servers}{How To: Manage Language Servers},
{Searching with the Locator}, {Keyboard Shortcuts}, {Sidebar Views}
{Navigate with locator}, {Keyboard Shortcuts}, {Sidebar Views}
*/
/*!
@@ -258,7 +258,7 @@
\endlist
\sa {Edit Code}{How To: Edit Code}, {Edit Mode},
{Searching with the Locator}, {File System}, {Projects}
{Navigate with locator}, {File System}, {Projects}
*/
/*!
@@ -378,7 +378,7 @@
\image qtcreator-add-resource.png {Resource Browser}
\sa {Edit Code}{How To: Edit Code}, {Edit Mode}, {Editing Keyboard Shortcuts},
{Searching with the Locator}
{Navigate with locator}
*/
/*!

View File

@@ -78,7 +78,7 @@
To manually request a suggestion at the current editor's cursor position,
enter \uicontrol {t} (\uicontrol {Request Copilot Suggestion}) in the
\l{Searching with the Locator}{locator}.
\l{Navigate with locator}{locator}.
Hover the mouse over a suggestion to show a toolbar with
\inlineimage icons/prev.png

View File

@@ -70,8 +70,8 @@
To return non-trivial objects by using a \c const reference, select the
\uicontrol {Return non-value types by const reference} check box.
\sa {Apply quick fixes}, {Specify settings for quick fixes},
{C++ Quick Fixes}, {QML Quick Fixes}, {Refactoring}
\sa {Apply quick fixes}, {Find symbols}, {Rename symbols},
{Specify settings for quick fixes}, {C++ Quick Fixes}, {QML Quick Fixes}
*/
/*!
@@ -786,8 +786,8 @@
\li Documentation comment for a function
\endtable
\sa {Apply quick fixes}, {Specify settings for quick fixes},
{QML Quick Fixes}, {Quick Fixes}, {Refactoring}
\sa {Apply quick fixes}, {Find symbols}, {Rename symbols},
{Specify settings for quick fixes}, {QML Quick Fixes}, {Quick Fixes}
*/
/*!
@@ -811,6 +811,6 @@
delete the custom settings, select \uicontrol {Use global settings}, and
then select \uicontrol {Delete Custom Settings File}.
\sa {Apply quick fixes}, {C++ Quick Fixes}, {QML Quick Fixes}, {Quick Fixes},
{Configuring Projects}, {Refactoring}
\sa {Apply quick fixes}, {Find symbols}, {Rename symbols},
{C++ Quick Fixes}, {QML Quick Fixes}, {Quick Fixes}, {Configuring Projects}
*/

View File

@@ -0,0 +1,60 @@
// Copyright (C) 2024 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\page creator-editor-how-to-find-symbols.html
\previouspage creator-how-tos.html
\ingroup creator-how-to-search
\title Find symbols
You can search for references to a particular symbol or search for symbols
with a name that matches a pattern.
\section1 Find references to a symbol
To find instances of a particular symbol in your Qt C++ project:
\list 1
\li Place the cursor on the symbol in the editor.
\li Go to \uicontrol Tools > \uicontrol {C++} >
\uicontrol {Find References to Symbol Under Cursor},
or press \key {Ctrl+Shift+U}.
\image qtcreator-find-references-to-symbol-under-cursor.png {Search results for finding references to symbols}
\endlist
\section2 Color-code access type
To view the same results color-coded according to the access type, such as
read, write, or declaration, go to \uicontrol Tools > \uicontrol {C++} >
\uicontrol {Find References with Access Type}.
\section1 Find symbols that match search criteria
Go to \uicontrol Edit > \uicontrol {Find/Replace} >
\uicontrol {Advanced Find} and select \uicontrol {C++ Symbols} to search for
classes, functions, enums, and declarations (including type aliases) either
from files listed as part of the project or from all files that are used by
the code, such as include files.
\image qtcreator-search-cpp-symbols.png
\QC searches from the following locations:
\list
\li Files listed as a part of the project
\li Files directly used by the project files (for example, generated
files)
\li Header files of used frameworks and libraries
\endlist
\section1 View found symbols
\l{Search Results View} shows the location and number of search hits in the
current project.
\image qtcreator-refactoring-find.png
\sa {Search}{How To: Search}, {Search Results View}
*/

View File

@@ -29,15 +29,15 @@
\li \l{Semantic Highlighting}{Semantic highlighting}, as defined in
\l{https://github.com/microsoft/vscode-languageserver-node/pull/367}
{Proposal of the semantic highlighting protocol extension}
\li Navigating in the code by using the \l{Searching with the Locator}
\li Navigating in the code by using the \l{Navigate with locator}
{locator} or \l{Move to symbol definition or declaration}
{moving to the symbol definition}
\li Inspecting code by viewing the document outline in the
\l{Outline} view or in the \uicontrol Symbols list on the
\l{Edit Mode}{editor toolbar}
\li \l{Call Hierarchy}{Viewing the callers and callees of a function}
\li \l{Finding Symbols}{Finding references to symbols}
\li \l{Renaming Symbols}{Renaming the symbol under cursor}
\li \l{Find references to a symbol}{Finding references to symbols}
\li \l{Rename symbols}{Renaming the symbol under the cursor}
\li Code actions
\li Displaying diagnostics from the language server as tooltips. You can
also select a code range to display diagnostics for.

View File

@@ -0,0 +1,265 @@
// Copyright (C) 2024 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\page creator-editor-locator.html
\previouspage creator-how-tos.html
\ingroup creator-how-to-search
\title Navigate with locator
Locate not only files, but any items defined by \e{locator filters},
as well as trigger global actions and perform other tasks, such as build
projects or run external tools.
\image qtcreator-locator.webp {List of locator filters}
\section1 Go to the locator
To activate the locator:
\list
\li Press \key {Ctrl+K} (\key {Cmd+K} on \macos).
\li Go to \uicontrol Tools, and then select \uicontrol Locate.
\li Go to \uicontrol Edit, and then select \uicontrol {Go to Line}.
\li Click the line and column indicator on the
\l{Edit Mode}{editor toolbar}.
\endlist
By default, you can find the locator in the bottom left of the \QC window.
To open it as a centered popup, select \inlineimage icons/magnifier.png, and
then select \uicontrol {Open as Centered Popup}.
\section1 Use locator filters
The filters that are available depend on the file type. For more information
about what a particular locator filter does, see the tooltips that appear
when you hover over a filter in the locator. For longer descriptions of the
filters, select \inlineimage icons/magnifier.png > \uicontrol Configure to
open the \l{Locator} preferences.
To use a locator filter:
\list
\li Type the locator filter prefix followed by \key Space. The prefix
is usually short, from one to three characters. Then type the search
string (for example, a filename or class name) or the command to
execute.
\li Double-click a locator filter in the filter list to use it. Press
the up and down arrow keys or press \key Ctrl+P and \key Ctrl+N
to move up and down the list, and then press \key Enter to use the
selected filter.
\endlist
As you type a search string,
the locator shows the occurrences of that string regardless of where in the
name of an object it appears. Some locator filters, such as colon, \c m,
and \c t, support \e fuzzy matching, which means that you can enter the
uppercase letters to locate a symbol when using camel case or the letters
after the underscore when using snake case.
\section2 Use wildcard characters in search strings
To narrow down the search results, use the following wildcard characters:
\list
\li To match any number of any or no characters, enter \c{*}.
\li To match a single instance of any character, enter \c{?}.
\endlist
\section1 Omit default filters
By default, you can use the following preset locator filters without a
prefix:
\list
\li Going to a line and column in the current file (\c {l}).
\li Going to an open file (\c {o}).
\li Going to a file in any open project (\c {a}).
\endlist
\section1 Locate lines and columns
To move directly to a particular line and column in the document when you
open the document, append the line and column number to the file name in
the locator, separated by plus signs (+) or colons (:).
For example, to open \e HelloWorld.qml to line
41 and column 2, enter:
\code
HelloWorld.qml:41:2
\endcode
\section1 Search the web
Use the \uicontrol {Web Search (r)} locator filter to perform web searches.
URLs and search commands for Bing, Google, Yahoo! Search, cplusplus.com, and
Wikipedia are configured by default. Add search commands for other web search
engines in the locator preferences.
\section1 Create files and directories from the locator
To create a new file and open it in the editor:
\list 1
\li Type \c f followed by \key Space, followed by path and file name
\li Press \key Enter or select \uicontrol {Create and Open File}.
\endlist
To create a directory, select \uicontrol {Create Directory}.
\sa {Search}{How To: Search}, {Manage sessions}, {Perform calculations},
{Locator}
*/
/*!
\page creator-preferences-locator.html
\previouspage creator-reference.html
\ingroup creator-reference-preferences
\title Locator
\brief Add and change locator filters.
To set locator preferences, go to \preferences > \uicontrol Environment >
\uicontrol Locator.
\image qtcreator-locator-customize.webp {Locator preferences}
\section1 Changing Locator Filters
You can change the preset locator filters to match your use case. For
example, change the filter prefix and restrict the search to
items that match the filter.
To configure a locator filter:
\list 1
\li Go to \preferences > \uicontrol Environment > \uicontrol Locator.
\li Select a filter, and then select \uicontrol Edit.
\li Specify the prefix string.
\image qtcreator-locator-filter-edit-ai.webp {Filter Configuration dialog}
\li To implicitly include the filter even when not typing a prefix as a
part of the search string, select \uicontrol {Include by default}.
\endlist
\section1 Adding Web Search Engines
By default, the \uicontrol {Web Search (r)} locator filter includes the URLs
and search commands for Bing, Google, Yahoo! Search, cplusplus.com, and
Wikipedia.
To find out the format of the search command to use for your favorite
web search engine, perform a search in your browser and copy the resulting
URL to the locator filter configuration. Replace the search term with the
variable \c {%1}.
To add URLs and search commands to the list:
\list 1
\li Go to \preferences > \uicontrol Environment > \uicontrol Locator.
\li Select \uicontrol {Web Search} > \uicontrol Edit.
\li Select \uicontrol Add to add a URL filter to the list.
\image qtcreator-add-online-doc.webp {List of URLs in Filter Configuration dialog}
\li Double-click the new entry to specify a URL and a search command.
For example, \c {http://www.google.com/search?q=%1}.
\li Click \uicontrol OK.
\endlist
To add a new separate web search locator filter instead of updating the
default filter, select \uicontrol Add > \uicontrol {URL Template}.
\section1 Creating Locator Filters
To quickly access files not directly mentioned in your project,
create your own directory filters. That way you can locate files in a
directory structure you have defined.
To create custom locator filters:
\list 1
\li Go to \preferences > \uicontrol Environment > \uicontrol Locator.
\li Select \uicontrol Add > \uicontrol {Files in Directories} to add
a directory filter.
\image qtcreator-locator-generic-directory-filter.png {Filter Configuration dialog}
\li In \uicontrol Name, enter a name for your filter.
\li Select \uicontrol Add to add directories to \uicontrol Directories.
The locator searches directories recursively.
\li In \uicontrol {File pattern}, specify file patterns to
restrict the search to files that match the pattern.
Separate the patterns with commas. For example, to search for all
\c {.qml} and \c {.ui.qml} files, enter \c{*.qml,*.ui.qml}
\li In \uicontrol {Exclusion pattern}, specify file
patterns to omit files from the search.
\li In \uicontrol Prefix, specify the prefix string.
To implicitly include the filter even when not typing a prefix
as a part of the search string, select
\uicontrol {Include by default}.
\li Select \uicontrol OK.
\endlist
\section1 Configuring Locator Cache
The locator searches the files matching your file pattern in the directories
you have selected and caches that information. \QC updates the cache for all
preset filters as you write code. By default, \QC updates your custom
filters once an hour.
To update the cached information manually, select
\inlineimage icons/magnifier.png > \uicontrol Refresh in the locator.
To set a new cache update time:
\list 1
\li Go to \preferences > \uicontrol Environment > \uicontrol Locator.
\li In \uicontrol {Refresh interval}, set a new time in minutes.
\endlist
\sa {Navigate with locator}, {Search}{How To: Search}, {Perform calculations},
{Locator}
*/

View File

@@ -28,7 +28,7 @@
\uicontrol Keyboard. For more information, see \l{Assign keyboard shortcuts}.
You can also use the \c rm locator filter to run a macro. For more
information, see \l{Searching with the Locator}.
information, see \l{Navigate with locator}.
To view and remove saved macros, select \preferences >
\uicontrol {Text Editor} > \uicontrol Macros.

View File

@@ -4,12 +4,14 @@
/*!
\page creator-editor-quick-fixes.html
\if defined(qtdesignstudio)
\previouspage creator-editor-refactoring.html
\previouspage creator-jump-to-the-code.html
\nextpage creator-reference-qml-quick-fixes.html
\else
\previouspage creator-how-tos.html
\endif
\ingroup creator-how-to-edit
\ingroup studio-code-view
\title Apply quick fixes
@@ -35,6 +37,10 @@
Or, press \key {Alt+Enter} to open a context menu that has
quick fixes available in the current cursor position.
By default, the refactored files are saved automatically. To turn off
this feature, go to \preferences > \uicontrol Environment >
\uicontrol System and select \uicontrol {Auto-save files after refactoring}.
\if defined(qtcreator)
\section1 Create functions
@@ -85,21 +91,24 @@
\image qtcreator-refactoring-constructor.png "Constructor dialog"
\sa {Specify settings for quick fixes}, {Quick Fixes}, {C++ Quick Fixes}
\sa {Find symbols}, {Specify settings for quick fixes}, {Quick Fixes},
{C++ Quick Fixes}
\endif
\sa {QML Quick Fixes}, {Refactoring}
\sa {Rename symbols}, {QML Quick Fixes}
*/
/*!
\page creator-reference-qml-quick-fixes.html
\if defined(qtdesignstudio)
\previouspage creator-editor-refactoring.html
\previouspage creator-editor-quick-fixes.html
\nextpage creator-editor-options.html
\else
\previouspage creator-reference.html
\endif
\ingroup creator-reference
\ingroup studio-code-view
\title QML Quick Fixes
@@ -168,10 +177,10 @@
\endtable
\sa {Apply quick fixes}, {Refactoring}
\sa {Apply quick fixes}, {Rename symbols}
\if defined(qtcreator)
\sa {Exclude files from to-do lists}, {Specify settings for quick fixes},
{Quick Fixes}, {C++ Quick Fixes}
\sa {Exclude files from to-do lists}, {Find symbols},
{Specify settings for quick fixes}, {Quick Fixes}, {C++ Quick Fixes}
\endif
*/

View File

@@ -131,7 +131,7 @@
\page creator-how-to-advanced-search.html
\if defined(qtdesignstudio)
\previouspage creator-editor-finding.html
\nextpage creator-editor-locator.html
\nextpage creator-how-to-rename-symbols.html
\else
\previouspage creator-how-tos.html
\endif
@@ -215,7 +215,7 @@
\l {Preserve case when replacing} apply here as well.
\if defined(qtcreator)
\sa {Search}{How To: Search}, {Finding Symbols}, {Turn on Silver Searcher}
\sa {Search}{How To: Search}, {Find symbols}, {Turn on Silver Searcher}
\else
\sa {Search in current file}
\endif

View File

@@ -117,7 +117,7 @@
\sa {Run QML files}, {Use external text editors}, {Use Qt Linguist}
\if defined(qtcreator)
\sa {Batch edit environment settings}, {Specify the environment for projects},
\sa {Edit environment settings}, {Specify the environment for projects},
{Use Qt Creator variables}
\endif
*/

View File

@@ -40,12 +40,16 @@
\image qtcreator-preferences.webp {Filtering preferences}
\if defined(qtcreator)
\section1 Go to tabs in Preferences
To go to a tab in the \uicontrol Preferences dialog from anywhere in \QC,
use the \c t \l{Searching with the Locator}{locator} filter. For example,
use the \c t \l{Navigate with locator}{locator} filter. For example,
to open the \uicontrol Interface tab, enter \c {t preferences interface}
in the locator.
\image qtcreator-locator-filter-t.webp {Using the locator to open a tab in Preferences}
\sa {Navigate with locator}
\endif
*/

File diff suppressed because it is too large Load Diff

View File

@@ -49,5 +49,5 @@
\endlist
\sa {Enable and disable plugins}, {Search}{How To: Search},
{Batch edit environment settings}
{Edit environment settings}
*/

View File

@@ -93,6 +93,18 @@
\generatelist creator-how-to-get-help
\section1 Test
\QC supports both \e {code based tests} and \e {build system based tests}.
Code based testing offers special handling for particular testing
frameworks that strongly ties to the underlying code models or
specialized parsers. Build system based testing is independent from any
testing frameworks. It retrieves information directly from the underlying
build system and uses it or even the build system as such to execute the
respective tests.
\generatelist creator-how-to-test
\section1 Use \QC
\generatelist creator-how-to-use
@@ -218,13 +230,99 @@
\title Perform calculations
Open the \uicontrol Locator with \key {Ctrl+K} and type =, followed by a space.
You can now do basic calculations, with options to copy the results to the clipboard
by navigating through the entries and pressing \key {Enter}.
To do basic calculations in the locator:
\image qtcreator-locator.webp "List of locator filters"
\list 1
\li Press \key {Ctrl+K} (\key {Cmd+K} on \macos) to activate the locator.
\li Enter \c =, followed by a space.
\image qtcreator-locator.webp {List of locator filters}
\li Perform calculations.
\endlist
\sa {Executing JavaScript}
Navigate through the entries and press \key {Enter} to copy the results to
the clipboard
\section1 Built-in functions
Beside simple mathematical operations, like ((1 + 2) * 3), the following
built-in functions exist:
\table
\header
\li Function
\li Purpose
\row
\li abs(x)
\li Returns the absolute value of x
\row
\li acos(x)
\li Returns the arccosine of x, in radians
\row
\li asin(x)
\li Returns the arcsine of x, in radians
\row
\li atan(x)
\li Returns the arctangent of x, in radians
\row
\li atan2(x, y)
\li Returns the arctangent of the quotient of its arguments
\row
\li bin(x)
\li Returns the binary representation of x
\row
\li ceil(x)
\li Returns the value of x rounded up to the next integer
\row
\li cos(x)
\li Returns the cosine of x (x is in radians)
\row
\li exp(x)
\li Returns the value of E to the power of x
\row
\li e()
\li Returns Euler's number E (2.71828...)
\row
\li floor(x)
\li Returns the value of x rounded down to the next integer
\row
\li hex(x)
\li Returns the hexadecimal representation of x
\row
\li log(x)
\li Returns the natural logarithm (base E) of x
\row
\li max([value1[, value2[, ...]]])
\li Returns the highest value of the given numbers
\row
\li min([value1[, value2[, ...]]])
\li Returns the lowest value of the given numbers
\row
\li oct(x)
\li Returns the octal representation of x
\row
\li pi()
\li Returns PI (3.14159...)
\row
\li pow(x, y)
\li Returns the value of x to the power of y
\row
\li random()
\li Returns a random number between 0 and 1
\row
\li round(x)
\li Returns the value of x rounded to the next integer
\row
\li sin(x)
\li Returns the sine of x (x is in radians)
\row
\li sqrt(x)
\li Returns the square root of x
\row
\li tan(x)
\li Returns the tangent of x (x is in radians)
\endtable
\sa {Navigate with locator}, {Locator}
*/
/*!
@@ -269,7 +367,7 @@
\li Go to \uicontrol {Follow Symbol Under Cursor} in the context menu.
\endlist
\sa {Edit Code}{How To: Edit Code}, {Edit Mode}, {Searching with the Locator}
\sa {Edit Code}{How To: Edit Code}, {Edit Mode}, {Navigate with locator}
*/
/*!

View File

@@ -82,7 +82,12 @@
\section1 Open sessions
To switch between sessions, select \uicontrol {Open}.
To switch between sessions:
\list
\li Go to \uicontrol File > \uicontrol Sessions, and select a session.
\li Select \uicontrol {Open} in \uicontrol {Session Manager}.
\endlist
\if defined(qtcreator)
@@ -93,17 +98,30 @@
\image qtcreator-welcome-session.png
You can also use the \c t locator filter to open a session. For more
information, see \l{Searching with the Locator}.
To view more information about a session, select the down arrow icon that
appears when you move the mouse cursor over the session name. Select actions
to clone, rename, and delete sessions.
When you start \QC from the command line, you can give the name of
a session as an argument and \QC will start with this session.
a session as an argument to start \QC with this session.
\sa {Command-Line Options}, {Searching with the Locator}
\section1 Open sessions from the locator
Use the \c t filter that triggers menu commands to open sessions.
To locate a session:
\list 1
\li Press \key {Ctrl+K} (\key {Cmd+K} on \macos) to activate the locator.
\li Enter:
\list
\li \c {t} \e {<session_name>}
\li \c {t sess} \e {<session_name>}
\endlist
where \e <session_name> is the name of the session to open.
\li Double-click the session name to open it.
\endlist
\sa {Navigate with locator}, {Command-Line Options}
\endif
*/

View File

@@ -27,7 +27,7 @@
\image qt-app-dev-flow.webp {Application development life-cycle}
\caption Application development life-cycle
\section1 Projects
\section1 Managing Projects
First, you need a \e project. \QC relies on a separate build system, such as
CMake, qmake, or Qbs for building the project. From the build system, \QC
@@ -63,12 +63,12 @@
For more information, see \l{Manage Projects}{How To: Manage Projects}.
\section1 User Interfaces
\section1 Designing User Interfaces
\image heartgame-start.webp {Heart Rate Game}
To create intuitive, modern-looking, fluid user interfaces, use \l{Qt Quick}
and \l{Qt Design Studio Manual}{\QDS}:
To create intuitive, modern-looking, fluid user interfaces (UI), use
\l{Qt Quick} and \l{Qt Design Studio Manual}{\QDS}:
\list
\li \l {\QMLD}
@@ -101,7 +101,7 @@
For more information, see \l{Design UIs}{How To: Design UIs} and
\l{UI Design}.
\section1 Code
\section1 Editing Code
Writing, editing, and navigating in source code are core tasks in application
development. Therefore, the code editor is one of the key components of \QC.
@@ -116,13 +116,13 @@
such as Python, for which a \e {language server} is available that provides
information about the code to IDEs.
\section2 Find
\section2 Finding
Use the incremental and advanced search to search in currently open projects
or files on the file system or use the locator to browse through projects,
files, classes, functions, documentation, and file systems.
\section2 Refactor
\section2 Refactoring Code
\e {Code refactoring} is the process of improving and simplifying code
without modifying the existing functionality of an application. Find
@@ -137,7 +137,7 @@
\li Simplify code structure
\endlist
\section2 Configure the Editor
\section2 Configuring the Text Editor
Configure the text editor to suit your specific needs. Change the fonts,
colors, highlighting, and indentation.
@@ -147,7 +147,7 @@
For more information, see \l{Edit Code}{How To: Edit Code} and \l{Editors}.
\section1 Build, Deploy, and Run
\section1 Building, Deploying, and Running Applications
Run and deploy Qt applications that you build for different target
platforms or with different compilers, debuggers, or Qt versions.
@@ -182,7 +182,7 @@
For more information, see \l{Connecting Devices} and \l{Deploying to Devices}.
\section2 Preview QML
\section2 Previewing QML
Use the QML live preview to preview a QML file or an entire Qt Quick
application on the desktop, as well as on Android and embedded Linux
@@ -191,7 +191,7 @@
For more information, see \l{Validating with Target Hardware}.
\section1 Debug
\section1 Debugging Applications
A debugger lets you see what happens \e inside an application while it runs
or when it crashes. A debugger can do the following to help you find errors
@@ -214,7 +214,7 @@
For more information, see \l{Debugging}.
\section1 Analyze
\section1 Analyzing Source Code
Devices have limited memory and CPU power, so you should use them carefully.
\QC integrates code analysis tools for detecting memory leaks, profiling
@@ -227,17 +227,42 @@
For more information, see \l{Analyzing Code}.
\section1 Autotest
\section1 Running Tests
Create, build and run Qt tests, Qt Quick tests, Google tests, and Boost tests
to unit test applications and libraries.
\QC supports both \e {code based tests} and \e {build system based tests}.
Code based testing offers special handling for particular testing
frameworks that strongly ties to the underlying code models or
specialized parsers. Build system based testing is independent from any
testing frameworks. It retrieves information directly from the underlying
build system and uses it or even the build system as such to execute the
respective tests.
\QC integrates the following testing frameworks for unit testing
applications and libraries:
\list
\li \l{https://www.boost.org/doc/libs/1_81_0/libs/test/doc/html/index.html}
{Boost.Test}
\li \l{https://github.com/catchorg/Catch2}{Catch2 test framework}
\li \l{https://github.com/google/googletest}{Google C++ Testing Framework}
\li \l{Qt Quick Test} framework
\li \l{Qt Test} framework
\endlist
In addition, \QC offers build system based support for
\l{https://cmake.org/cmake/help/latest/manual/ctest.1.html}{CTest}.
You can use \QC to create, build, and run code based tests for your
projects.
\image qtcreator-autotests.png
Map AUTs (Application Under Test) to \QC and run Squish test suites
and cases from it.
For more information, see \l{Running Autotests} and \l{Using Squish}.
For more information, see \l{Test}{How To: Test} and \l{Using Squish}.
\section1 Publish
\section1 Publishing Applications
Create installation packages for mobile devices that you publish to
application stores and other channels. You must make sure that the

View File

@@ -37,7 +37,7 @@
\section1 Preferences
Set prefecerences that apply globally to all projects.
Set preferences that apply globally to all projects.
\annotatedlist creator-reference-preferences

View File

@@ -12,7 +12,7 @@
\page creator-testing.html
\nextpage creator-debugging.html
\title Testing
\title Debugging and Analyzing
\image front-testing.png
@@ -35,11 +35,6 @@
from \QC. However, the QML Profiler is installed as part of \QC
for profiling Qt Quick applications.
\li \l{Running Autotests}
Create, build and run Qt tests, Qt Quick tests, Google
tests, and Boost tests using \QC.
\li \l{Using Squish}
Map AUTs to \QC and run Squish test suites and cases from it.

View File

@@ -18,9 +18,8 @@
\image qtcreator-new-file.webp {New File wizard}
\note You can also use the \c f locator filter to create a new
file and open it in the editor. For more information, see
\l {Creating Files and Directories from Locator}. However, you must
manually add the created file to a project.
file and open it in the editor. However, you must manually add
the created file to a project.
\section1 Select file type
@@ -74,7 +73,8 @@
\li Empty Nim source and script files.
\endtable
\sa {Add Files}{How To: Add Files}, {Create UML-style models},
\sa {Navigate with locator}, {Add Files}{How To: Add Files},
{Add tests to existing test projects}, {Create UML-style models},
{Use project wizards}
*/

View File

@@ -81,7 +81,7 @@
Select \uicontrol {Build for Run Configuration} to
build the executable that corresponds to the selected run configuration.
You can also use the \c cm filter in the \l {Searching with the Locator}
You can also use the \c cm filter in the \l {Navigate with locator}
{locator}.
To remove all build artifacts, select one of \uicontrol {Clean} menu commands.

View File

@@ -168,8 +168,8 @@
\uicontrol Impl there.
\sa {Assign keyboard shortcuts}, {Activate kits for a project},
{Create files}, {Create Projects}{How To: Create Projects},
{Creating Projects}
{Create files}, {Test}{How To: Test},
{Create Projects}{How To: Create Projects}, {Creating Projects}
*/
/*!
@@ -198,7 +198,7 @@
directory in the \l {File System} view.
Declaring files as a part of the project also makes them visible to the
\l{Searching with the Locator}{locator} and
\l{Navigate with locator}{locator} and
\l{Search in projects or file systems}{project-wide search}.
\section1 CMake Projects

View File

@@ -152,7 +152,7 @@
\li Select \uicontrol Change to modify environment variable values for
build environments in the \uicontrol {Edit Environment Changes}
dialog. For more information about how to add and remove variable
values, see \l{Batch edit environment settings}.
values, see \l{Edit environment settings}.
\row
\li \uicontrol {Force UTF-8 MSVC compiler output}
\li Either switches the language of MSVC to English or keeps the

View File

@@ -16,7 +16,7 @@
By default, the environment in which \QC was started is used and modified
to include the Qt version. Depending on the selected Qt version, \QC
automatically sets the necessary environment variables. You can edit
existing environment variables or add, reset and unset new variables
existing environment variables or add, reset, and unset variables
based on your project requirements.
The final environment is specified separately for each kit. With
@@ -35,7 +35,7 @@
To globally change the environment from the one in which \QC is started,
select \preferences > \uicontrol Environment > \uicontrol System, and then
select \uicontrol Change in the \uicontrol Environment field.
select \uicontrol Change in \uicontrol Environment.
\image qtcreator-preferences-environment-system.webp "Environment preferences System tab"
@@ -47,42 +47,43 @@
\image qtcreator-projects-environment.webp {Environment tab in Project Settings}
You can edit existing environment variables or add, reset, unset, or
temporarily disable variables.
\section1 Specify the build environment
Specify the build environment to use for a kit in \uicontrol Projects >
\uicontrol {Build Settings} > \uicontrol {Build Environment}.
To specify the build environment to use for a kit, go to \uicontrol Projects
> \uicontrol {Build Settings} and select \uicontrol {Build Environment}.
\image qtcreator-build-environment.png {Build Environment section in Build Settings}
\image qtcreator-build-environment.webp {Build Environment section in Build Settings}
To change the values of environment variables for the build environment,
select the variable and then select \uicontrol Edit. Enter the new value
in the editor on the righ side.
To add new variables, select \uicontrol {Add}.
\section2 Clear the build environment
To build with a clean system environment, select the \uicontrol {Clear
system environment} check box. \QC discards the current environment, and
populates a clean system environment with the environment variables that
To build with a clean system environment, select
\uicontrol {Clear system environment}. \QC discards the current environment,
and populates a clean system environment with the environment variables that
the compilers and tools need. Therefore, the environment is never totally
empty, even after you clear it.
\section1 Specify the run environment
\QC automatically selects the environment used for running the application
based on the \l{glossary-device}{device} type. You can edit the environment
or select another environment in \uicontrol Projects >
\uicontrol {Run Settings} > \uicontrol {Environment}.
based on the \l{glossary-device}{device} type. To edit the environment
or select another environment, go to \uicontrol Projects >
\uicontrol {Run Settings} and select \uicontrol {Environment}.
You can edit existing environment variables or add, reset and unset new
variables.
\image qtcreator-run-environment.png {Environment section in Run Settings}
\image qtcreator-run-environment.webp {Environment section in Run Settings}
When running on the desktop, the \uicontrol {Build Environment} is used by
default, but you can also use the \uicontrol {System Environment} without the
additions made to the build environment.
To modify the environment variable values for the run environment,
double-click environment variables or their values and change them inline,
or select \uicontrol {Batch Edit} to change several variable values at a
time.
\section2 Clean the run environment
To run in a clean system environment, select \uicontrol {Clean Environment}.
@@ -107,32 +108,32 @@
\section2 Use device environment
When running on a mobile device connected to the development host, \QC
When you run applications on a mobile device connected to the computer, \QC
fetches information about the \uicontrol {Device Environment} from the device.
Usually, it does not make sense to edit the device environment.
\sa {Batch edit environment settings}, {Configure projects for building},
\sa {Edit environment settings}, {Configure projects for building},
{Configure projects for running}, {Use Qt Creator variables}
*/
/*!
\page creator-how-to-batch-edit-environment-settings.html
\page creator-how-to-edit-environment-settings.html
\previouspage creator-how-tos.html
\ingroup creator-how-to-projects
\title Batch edit environment settings
\title Edit environment settings
You can change the environment variable values for build or run environments
either for a particular project or globally for all projects in the
\uicontrol {Edit Environment} dialog:
either for a particular project or globally:
\list
\li To change values globally, select \uicontrol Change in the
\l {Globally change the environment}{global environment preferences}.
\li To change values for a project, select \uicontrol {Batch Edit} in the
\l {Change the environment for a project}{project},
\l {Specify the build environment}{build}, or
\li To change values globally, go to \preferences >
\uicontrol Environment > \uicontrol System, and select
\uicontrol Change in \uicontrol {Environment}.
\li To change values for a project, select \uicontrol Edit or
\uicontrol {Add} in the \l {Change the environment for a project}
{project}, \l {Specify the build environment}{build}, or
\l {Specify the run environment}{run} environment settings.
\endlist

View File

@@ -79,6 +79,7 @@
the project:
\list
\li \l{Link projects to Axivion dashboards}{Axivion}
\li \l{Specify clangd settings}{Clangd}
\li \l{Speficy Clang tools settings}{Clang Tools}
\li \l{Specify code style}{C++ Code Style}

View File

@@ -49,7 +49,7 @@
\section1 Select run targets
If your project has several run targets defined, such as
\l{Running Autotests}{tests}, you can select them in the kit selector.
\l{Build and run tests}{tests}, you can select them in the kit selector.
\image qtcreator-kit-selector-run-targets.png {Run targets in the kit selector}

View File

@@ -36,7 +36,6 @@
\li \l{Using Text Editing Macros}
\li \l{Comparing Files}
\endlist
\li \l{Refactoring}
\li \l{Configuring the Editor}
\li \l{Using GitHub Copilot}
\endlist
@@ -69,7 +68,7 @@
\li \l{Building Applications for the Web}
\endlist
\endlist
\li \l{Testing}
\li \l{Debugging and Analyzing}
\list
\li \l{Debugging}
\list
@@ -102,7 +101,6 @@
\list
\li \l{Profiling QML Applications}
\li \l{Checking Code Coverage}
\li \l{Static Code Analysis}
\li \l{Using Valgrind Code Analysis Tools}
\list
\li \l{Detecting Memory Leaks with Memcheck}
@@ -114,7 +112,6 @@
\li \l{Analyzing Code with Cppcheck}
\li \l{Visualizing Chrome Trace Events}
\endlist
\li \l{Running Autotests}
\li \l{Using Squish}
\endlist
\li \l{How To}
@@ -159,6 +156,8 @@
\endlist
\li Read Documentation
\generatelist creator-how-to-get-help
\li Test
\generatelist creator-how-to-test
\li Use \QC
\generatelist creator-how-to-use
\li Use the UI

View File

@@ -50,7 +50,6 @@
\li \b {\l{Coding}}
\list
\li \l{Writing Code}
\li \l{Refactoring}
\li \l{Configuring the Editor}
\endlist
\li \b {\l{Building and Running}}
@@ -65,11 +64,10 @@
\li \inlineimage front-help.png
\li \inlineimage front-advanced.png
\row
\li \b {\l{Testing}}
\li \b {\l{Debugging and Analyzing}}
\list
\li \l{Debugging}
\li \l{Analyzing Code}
\li \l{Running Autotests}
\li \l{Using Squish}
\endlist
\li \b {\l{How To}}
@@ -80,6 +78,10 @@
\li \l{Design UIs}
\li \l{Edit Code}
\li \l{Manage Projects}
\li \l{Read Documentation}
\li \l{Test}
\li \l{Use \QC}
\li \l{Use the UI}
\li \l{How To}{See More...}
\endlist
\li \b {\l{Reference}}

View File

@@ -18,7 +18,7 @@
\brief Shows all the files in the current directory.
\if defined(qtcreator)
\note Usually, \l{Searching with the Locator}{searching with the locator}
\note Usually, \l{Navigate with locator}{searching with the locator}
is the fastest way to find a particular project, file, class, or function,
or almost anything else in your project. Use the \e {file system (f)} filter
to open files from anywhere in the file system.

View File

@@ -49,7 +49,7 @@
automatically save changed files at the intervals specified in
the \uicontrol Interval field.
\li Select the \uicontrol {Auto-save files after refactoring} check
box to automatically save \l{Refactoring}{refactored files}.
box to automatically save refactored files.
\li Select the \uicontrol {Auto-suspend unmodified files} check
box to automatically free the resources of open files after
prolonged inactivity. The files are still listed in the
@@ -62,4 +62,10 @@
field, set the number of recently opened files listed in
\uicontrol File > \uicontrol {Recent Files}.
\endlist
\sa {Apply quick fixes}, {Rename symbols}
\if defined(qtcreator)
\sa {Find symbols}
\endif
*/

View File

@@ -25,7 +25,7 @@
\image qtcreator-projects-view-edit.png {Projects view in the sidebar}
\note Usually, \l{Searching with the Locator}{searching with the locator}
\note Usually, \l{Navigate with locator}{searching with the locator}
is the fastest way to find a particular project, file, class, or function,
or almost anything else in your project.
\else

View File

@@ -142,8 +142,14 @@
\list
\li To clear the search results, select
\inlineimage icons/clean_pane_small.png (\uicontrol Clear).
\li To move between instances, select \inlineimage icons/next.png
(\uicontrol {Next Item}) and \inlineimage icons/prev.png
(\uicontrol {Previous Item}).
\li To expand and collapse the search results, select
\inlineimage icons/qtcreator-expand.png (\uicontrol {Expand All}).
\li To filter the search results for the usage of symbols according to
access type, such as read, write, or declaration, select
\inlineimage icons/filtericon.png (\uicontrol {Filter Tree}).
\li To start a new search, select
\inlineimage icons/qtcreator-new-search-icon.png
(\uicontrol {New Search}).

View File

@@ -55,7 +55,7 @@
\li \inlineimage numbers/06.png
\li Locator
\li Find a particular project, file, class, or function.
\li \l{Searching with the Locator}
\li \l{Navigate with locator}
\row
\li \inlineimage numbers/07.png
\li Output

View File

@@ -2,9 +2,9 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\previouspage creator-editor-locator.html
\previouspage creator-how-to-rename-symbols.html
\page creator-jump-to-the-code.html
\nextpage creator-editor-refactoring.html
\nextpage creator-editor-quick-fixes.html
\title Jump to the Code

View File

@@ -20,11 +20,9 @@
With advanced search, you can search in currently open projects or
files on the file system.
\li \l{Searching with the Locator}
\li \l{Rename symbols}
Use the locator to browse
through projects, files, classes, functions, documentation and
file systems.
Search for QML types and rename them in all files in a project.
\li \l{Jump to the Code}

View File

@@ -109,7 +109,7 @@
However, you can rename symbols in all files within a project. To rename a
QML type in a project, select \uicontrol Tools > \uicontrol QML/JS >
\uicontrol {Rename Symbol Under Cursor} or press \key Ctrl+Shift+R. For more
information, see \l {Renaming Symbols}.
information, see \l {Rename symbols}.
\section2 How can I add .qml files to my project in Qt Creator?

View File

@@ -213,10 +213,11 @@
\list
\li \l{Search in current file}
\li \l{Search in projects or file systems}
\li \l{Searching with the Locator}
\li \l{Rename symbols}
\li \l{Jump to the Code}
\endlist
\li \l{Refactoring}
\li \l{Apply quick fixes}
\li \l{QML quick fixes}
\li \l{Configuring the Editor}
\list
\li \l{Font & Colors}

View File

@@ -1,4 +1,4 @@
// Copyright (C) 2021 The Qt Company Ltd.
// Copyright (C) 2024 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
@@ -17,10 +17,6 @@
You can also view and modify other types of text files.
To open the search dialog in the \uicontrol {Code} view, go to
\uicontrol Edit > \uicontrol {Find/Replace} > \uicontrol {Find/Replace}.
You can also select \key Ctrl + \key {F}.
The view offers the following features:
\list
@@ -30,4 +26,23 @@
\li \l{Indent text or code}
\li \l{Using Qt Quick Toolbars}
\endlist
\section1 Refactoring Code
Code refactoring is the process of improving and simplifying code without
modifying the existing functionality of an application. You can easily find
and rename symbols and apply quick fixes in the \uicontrol Code view to
refactor code.
\section1 Searching in Code
To open the search dialog in the \uicontrol {Code} view:
\list
\li Go to \uicontrol Edit > \uicontrol {Find/Replace} >
\uicontrol {Find/Replace}.
\li Select \key Ctrl + \key {F} (or \key Cmd + \key F on \macos).
\endlist
\sa {Finding}, {Apply quick fixes}, {QML Quick Fixes}
*/

View File

@@ -236,7 +236,7 @@ def deploy_qt_conf_files(qtc_binary_path):
if common.is_linux_platform():
qt_prefix_path = os.path.join(qtc_binary_path, '..', 'lib', 'Qt')
add_qt_conf(os.path.join(qtc_binary_path, '..', 'libexec', 'qtcreator'), qt_prefix_path)
add_qt_conf(os.path.join(qtc_binary_path, '..', 'lib', 'Qt', 'bin'), qt_prefix_path) # qtdiag
add_qt_conf(os.path.join(qtc_binary_path, '..', 'lib', 'Qt', 'bin'), qt_prefix_path) # qtdiag etc
add_qt_conf(qtc_binary_path, qt_prefix_path) # QtC itself
if common.is_windows_platform():
add_qt_conf(qtc_binary_path, qtc_binary_path) # QtC itself, libexec, and qtdiag etc
@@ -409,8 +409,9 @@ def deploy_qt_mac(qtc_binary_path, qt_install):
puppets = glob(os.path.join(libexec_path, 'qml2puppet*'))
for puppet in puppets:
additional_paths.append(puppet)
# qtdiag
# qtdiag, qtplugininfo
additional_paths.append(os.path.join(bin_path, 'qtdiag'))
additional_paths.append(os.path.join(bin_path, 'qtplugininfo'))
# other libexec
additional_paths.append(os.path.join(libexec_path, 'sdktool'))
additional_paths.append(os.path.join(libexec_path, 'qtpromaker'))
@@ -470,6 +471,7 @@ def main():
else os.path.dirname(args.qtcreator_binary))
deploy_binary('qtdiag', qtcreator_binary_path, qt_install)
deploy_binary('qtplugininfo', qtcreator_binary_path, qt_install)
deploy_binary('qsb', qtcreator_binary_path, qt_install)
deploy_plugins(qtcreator_binary_path, qt_install)
deploy_imports(qtcreator_binary_path, qt_install)

File diff suppressed because it is too large Load Diff

View File

@@ -414,9 +414,8 @@ QStringList lastSessionArgument()
QString crashReportsPath()
{
std::unique_ptr<Utils::QtcSettings> settings(createUserSettings());
QFileInfo(settings->fileName()).path() + "/crashpad_reports";
if (Utils::HostOsInfo::isMacHost())
return QFileInfo(createUserSettings()->fileName()).path() + "/crashpad_reports";
return QFileInfo(settings->fileName()).path() + "/crashpad_reports";
else
return QCoreApplication::applicationDirPath()
+ '/' + RELATIVE_LIBEXEC_PATH + "crashpad_reports";

View File

@@ -7,7 +7,7 @@ namespace LanguageServerProtocol {
bool CallHierarchyItem::isValid() const
{
return contains(nameKey) && contains(symbolKindKey) && contains(rangeKey) && contains(uriKey)
return contains(nameKey) && contains(kindKey) && contains(rangeKey) && contains(uriKey)
&& contains(selectionRangeKey);
}

View File

@@ -15,8 +15,8 @@ public:
QString name() const { return typedValue<QString>(nameKey); }
void setName(const QString &name) { insert(nameKey, name); }
SymbolKind symbolKind() const { return SymbolKind(typedValue<int>(symbolKindKey)); }
void setSymbolKind(const SymbolKind &symbolKind) { insert(symbolKindKey, int(symbolKind)); }
SymbolKind symbolKind() const { return SymbolKind(typedValue<int>(kindKey)); }
void setSymbolKind(const SymbolKind &symbolKind) { insert(kindKey, int(symbolKind)); }
Range range() const { return typedValue<Range>(rangeKey); }
void setRange(const Range &range) { insert(rangeKey, range); }

View File

@@ -143,7 +143,7 @@ constexpr Key parametersKey{"parameters"};
constexpr Key paramsKey{"params"};
constexpr Key patternKey{"pattern"};
constexpr Key percentageKey{"percentage"};
constexpr Key placeHolderKey{"placeHolder"};
constexpr Key placeHolderKey{"placeholder"};
constexpr Key positionKey{"position"};
constexpr Key prepareProviderKey{"prepareProvider"};
constexpr Key prepareSupportKey{"prepareSupport"};

View File

@@ -456,6 +456,9 @@ std::u32string::value_type TerminalSurface::fetchCharAt(int x, int y) const
if (cell->width == 0)
return 0;
if (cell->chars[0] == 0xffffffff)
return 0;
QString s = QString::fromUcs4(cell->chars, 6).normalized(QString::NormalizationForm_C);
const QList<uint> ucs4 = s.toUcs4();
return std::u32string(ucs4.begin(), ucs4.end()).front();

View File

@@ -32,8 +32,8 @@ struct SearchHit
bool operator==(const SearchHit &other) const { return !operator!=(other); }
};
QString defaultFontFamily();
int defaultFontSize();
QString TERMINAL_EXPORT defaultFontFamily();
int TERMINAL_EXPORT defaultFontSize();
class TERMINAL_EXPORT TerminalView : public QAbstractScrollArea
{

View File

@@ -59,6 +59,22 @@ public:
BaseT::keyPressEvent(event);
}
virtual bool userWantsContextMenu(const QMouseEvent *) const
{
return false;
}
void mousePressEvent(QMouseEvent *e) override
{
if (!userWantsContextMenu(e))
BaseT::mousePressEvent(e);
}
void mouseReleaseEvent(QMouseEvent *e) override
{
if (!userWantsContextMenu(e))
BaseT::mouseReleaseEvent(e);
}
};
class QTCREATOR_UTILS_EXPORT TreeView : public View<QTreeView>

View File

@@ -59,9 +59,6 @@ void ProcessStartHandler::setWindowsSpecificStartupFlags(bool belowNormalPriorit
bool createConsoleWindow)
{
#ifdef Q_OS_WIN
if (!belowNormalPriority && !createConsoleWindow)
return;
m_process->setCreateProcessArgumentsModifier(
[belowNormalPriority, createConsoleWindow](QProcess::CreateProcessArguments *args) {
if (createConsoleWindow) {
@@ -71,6 +68,8 @@ void ProcessStartHandler::setWindowsSpecificStartupFlags(bool belowNormalPriorit
if (belowNormalPriority)
args->flags |= BELOW_NORMAL_PRIORITY_CLASS;
args->flags |= CREATE_DEFAULT_ERROR_MODE;
});
#else // Q_OS_WIN
Q_UNUSED(belowNormalPriority)

View File

@@ -190,4 +190,20 @@ void storeToSettings(const Key &groupKey, QtcSettings *s, const Store &store)
s->endGroup();
}
void storeToSettingsWithDefault(const Key &groupKey,
QtcSettings *s,
const Store &store,
const Store &defaultStore)
{
QTC_ASSERT(store.size() == defaultStore.size(), storeToSettings(groupKey, s, store); return);
s->beginGroup(groupKey);
for (auto it = store.begin(), defaultIt = defaultStore.begin(), end = store.end(); it != end;
++it, ++defaultIt)
s->setValueWithDefault(it.key(),
mapEntryFromStoreEntry(it.value()),
mapEntryFromStoreEntry(defaultIt.value()));
s->endGroup();
}
} // Utils

View File

@@ -15,26 +15,7 @@ class QtcSettings;
using KeyList = QList<Key>;
class Store : public QMap<Key, QVariant>
{
public:
using QMap<Key, QVariant>::QMap;
template<typename T>
void insertValueWithDefault(const Key &key, const T &val, const T &defaultValue)
{
if (val != defaultValue)
insert(key, val);
}
template<typename T>
void insertValueWithDefault(const Key &key, const T &val)
{
if (val != T())
insert(key, val);
}
};
using Store = QMap<Key, QVariant>;
using OldStore = QMap<QByteArray, QVariant>;
QTCREATOR_UTILS_EXPORT KeyList keysFromStrings(const QStringList &list);
@@ -60,6 +41,10 @@ QTCREATOR_UTILS_EXPORT QVariant mapEntryFromStoreEntry(const QVariant &value);
// Don't use in new code.
QTCREATOR_UTILS_EXPORT Store storeFromSettings(const Key &groupKey, QtcSettings *s);
QTCREATOR_UTILS_EXPORT void storeToSettings(const Key &groupKey, QtcSettings *s, const Store &store);
QTCREATOR_UTILS_EXPORT void storeToSettingsWithDefault(const Key &groupKey,
QtcSettings *s,
const Store &store,
const Store &defaultStore);
} // Utils

View File

@@ -228,11 +228,12 @@ AndroidBuildApkWidget::AndroidBuildApkWidget(AndroidBuildApkStep *step)
m_step->setBuildToolsVersion(buildToolsSdkComboBox->itemData(idx).value<QVersionNumber>());
});
const int initIdx = (m_step->buildToolsVersion().majorVersion() < 1)
? buildToolsVersions.indexOf(buildToolsVersions.last())
: buildToolsVersions.indexOf(m_step->buildToolsVersion());
buildToolsSdkComboBox->setCurrentIndex(initIdx);
if (!buildToolsVersions.isEmpty()) {
const int initIdx = (m_step->buildToolsVersion().majorVersion() < 1)
? buildToolsVersions.indexOf(buildToolsVersions.last())
: buildToolsVersions.indexOf(m_step->buildToolsVersion());
buildToolsSdkComboBox->setCurrentIndex(initIdx);
}
auto createAndroidTemplatesButton = new QPushButton(Tr::tr("Create Templates"));
createAndroidTemplatesButton->setToolTip(

View File

@@ -754,6 +754,7 @@ void AndroidRunnerWorker::handleJdbWaiting()
m_jdbProcess->setProcessChannelMode(QProcess::MergedChannels);
m_jdbProcess->setCommand({jdbPath, jdbArgs});
m_jdbProcess->setReaperTimeout(s_jdbTimeout);
m_jdbProcess->setProcessMode(ProcessMode::Writer);
m_jdbProcess->start();
if (!m_jdbProcess->waitForStarted()) {
emit remoteProcessFinished(Tr::tr("Failed to start JDB."));
@@ -770,6 +771,7 @@ void AndroidRunnerWorker::handleJdbSettled()
for (int i = 0; i < 120 && m_jdbProcess->state() == QProcess::Running; ++i) {
m_jdbProcess->waitForReadyRead(500ms);
const QByteArray lines = m_jdbProcess->readAllRawStandardOutput();
qCDebug(androidRunWorkerLog) << "JDB output:" << lines;
const auto linesList = lines.split('\n');
for (const auto &line : linesList) {
auto msg = line.trimmed();
@@ -780,11 +782,13 @@ void AndroidRunnerWorker::handleJdbSettled()
return false;
};
const QStringList commands{"threads", "cont", "exit"};
const QStringList commands{"suspend", "resume", "cont", "exit"};
for (const QString &command : commands) {
if (waitForCommand())
if (waitForCommand()) {
qCDebug(androidRunWorkerLog) << "JDB input:" << command;
m_jdbProcess->write(QString("%1\n").arg(command));
}
}
if (!m_jdbProcess->waitForFinished(s_jdbTimeout)) {

View File

@@ -7,6 +7,8 @@
#include "androidsdkmodel.h"
#include "androidtr.h"
#include <coreplugin/icore.h>
#include <utils/async.h>
#include <utils/layoutbuilder.h>
#include <utils/outputformatter.h>
@@ -275,7 +277,7 @@ void AndroidSdkManagerWidget::installEssentials()
{
m_sdkModel->selectMissingEssentials();
if (!m_sdkModel->missingEssentials().isEmpty()) {
QMessageBox::warning(this,
QMessageBox::warning(Core::ICore::dialogParent(),
Tr::tr("Android SDK Changes"),
Tr::tr("%1 cannot find the following essential packages: \"%2\".\n"
"Install them manually after the current operation is done.\n")
@@ -321,8 +323,11 @@ void AndroidSdkManagerWidget::onApplyButton(const QString &extraMessage)
QString message = Tr::tr("%n Android SDK packages shall be updated.", "", packagesToUpdate.count());
if (!extraMessage.isEmpty())
message.prepend(extraMessage + "\n\n");
QMessageBox messageDlg(QMessageBox::Information, Tr::tr("Android SDK Changes"),
message, QMessageBox::Ok | QMessageBox::Cancel, this);
QMessageBox messageDlg(QMessageBox::Information,
Tr::tr("Android SDK Changes"),
message,
QMessageBox::Ok | QMessageBox::Cancel,
Core::ICore::dialogParent());
QString details;
if (!uninstallPackages.isEmpty())

View File

@@ -10,6 +10,7 @@
#include "androidtr.h"
#include <coreplugin/dialogs/ioptionspage.h>
#include <coreplugin/messagemanager.h>
#include <projectexplorer/projectexplorerconstants.h>
@@ -361,8 +362,10 @@ AndroidSettingsWidget::AndroidSettingsWidget()
m_openJdkLocationPathChooser->setValidationFunction([](const QString &s) {
return Utils::asyncRun([s]() -> expected_str<QString> {
expected_str<void> test = testJavaC(FilePath::fromUserInput(s));
if (!test)
if (!test) {
Core::MessageManager::writeSilently(test.error());
return make_unexpected(test.error());
}
return s;
});
});

Some files were not shown because too many files have changed in this diff Show More