Merge remote-tracking branch 'origin/9.0' into qds/dev

Change-Id: I02fd6f492c27d85b88af7ec8bc18ff62f2c6ed14
This commit is contained in:
Tim Jenssen
2022-11-09 12:51:00 +01:00
149 changed files with 89684 additions and 74780 deletions

View File

@@ -97,12 +97,23 @@ function(_create_ts_custom_target name)
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'
# to keep the same sorting as the non-'cleaned' target and therefore keep the diff small
list(LENGTH ts_files file_count)
if(file_count EQUAL 1)
# get path for lconvert...
get_target_property(_lupdate_binary Qt5::lupdate IMPORTED_LOCATION)
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 Qt5::lupdate -locations relative -no-ui-lines -no-sort -no-obsolete -locations none "@${ts_file_list}" -ts ${ts_files} COMMAND Qt5::lupdate -locations relative -no-ui-lines -no-sort "@${ts_file_list}" -ts ${ts_files}
COMMAND ${_bin_dir}/lconvert -locations none -no-ui-lines -no-obsolete ${ts_files} -o ${ts_files}
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" 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 files, remove obsolete and vanished translations, and do not add files and line number"
DEPENDS ${_sources} DEPENDS ${_sources}
VERBATIM) VERBATIM)
endif()
endfunction() endfunction()
function(add_translation_targets file_prefix) function(add_translation_targets file_prefix)

View File

@@ -19,6 +19,8 @@ General
* Locator `t` filter * Locator `t` filter
* Added non-menu actions * Added non-menu actions
* Added fuzzy matching * Added fuzzy matching
* Added `Remove Folder` to `File System` view (QTCREATORBUG-27331)
* Fixed that clipboard was cleared on shutdown (QTCREATORBUG-28317)
Help Help
---- ----
@@ -53,6 +55,7 @@ Editing
action (QTCREATORBUG-28099) action (QTCREATORBUG-28099)
* Fixed that selection was not considered for refactoring actions * Fixed that selection was not considered for refactoring actions
(QTCREATORBUG-27886) (QTCREATORBUG-27886)
* Fixed code style preview editor size (QTCREATORBUG-27267)
* Clangd * Clangd
* Added option for using single Clangd instance for the whole session * Added option for using single Clangd instance for the whole session
(QTCREATORBUG-26526) (QTCREATORBUG-26526)
@@ -70,6 +73,8 @@ Editing
session load (QTCREATORBUG-22584) session load (QTCREATORBUG-22584)
* ClangFormat * ClangFormat
* Moved settings back to top level preferences page * Moved settings back to top level preferences page
* Updated formatting options (QTCREATORBUG-28263)
* Fixed indentation of comments (QTCREATORBUG-25539)
### Language Server Protocol ### Language Server Protocol
@@ -77,10 +82,18 @@ Editing
* Fixed that server was not restarted after 5 times, even if a long time passed * Fixed that server was not restarted after 5 times, even if a long time passed
after the last time after the last time
### QML
* Fixed that `Follow Symbol` could open file from build directory
(QTCREATORBUG-27173)
* Fixed cursor position and breakpoints after reformatting (QTCREATORBUG-25218,
QTCREATORBUG-28349)
### Image Viewer ### Image Viewer
* Made `Fit to Screen` sticky and added option for the default * Made `Fit to Screen` sticky and added option for the default
(QTCREATORBUG-27816) (QTCREATORBUG-27816)
* Cleaned up tool bar (QTCREATORBUG-28309)
### Diff Viewer ### Diff Viewer
@@ -94,6 +107,8 @@ Projects
(QTCREATORBUG-26069) (QTCREATORBUG-26069)
* Fixed that opening terminal from build environment settings did not change * Fixed that opening terminal from build environment settings did not change
directory to build directory directory to build directory
* Fixed that local environment was used when inspecting GCC toolchain on remote
* Fixed stopping terminal process (QTCREATORBUG-28365)
### CMake ### CMake
@@ -101,6 +116,7 @@ Projects
* Turned `Package manager auto setup` off by default * Turned `Package manager auto setup` off by default
* Added support for CMake configure and build presets, including conditions and * Added support for CMake configure and build presets, including conditions and
toolchain files (QTCREATORBUG-24555) toolchain files (QTCREATORBUG-24555)
([CMake Documentation](https://cmake.org/cmake/help/v3.21/manual/cmake-presets.7.html))
* Added option for changing environment for configure step * Added option for changing environment for configure step
* Added option for hiding subfolders in source groups (QTCREATORBUG-27432) * Added option for hiding subfolders in source groups (QTCREATORBUG-27432)
* Added support for `Build File` also from header files (QTCREATORBUG-26164) * Added support for `Build File` also from header files (QTCREATORBUG-26164)
@@ -116,6 +132,11 @@ Projects
* Added workaround for `mkspec`s that add compiler flags to `QMAKE_CXX` * Added workaround for `mkspec`s that add compiler flags to `QMAKE_CXX`
(QTCREATORBUG-28201) (QTCREATORBUG-28201)
* Fixed unnecessary updates after project build (QTCREATORBUG-27785)
### Python
* Adapted to move of project tool to `PySide6-Essentials` package
Debugging Debugging
--------- ---------
@@ -124,6 +145,15 @@ Debugging
devices devices
* Fixed display of strings with characters more than 2 bytes long * Fixed display of strings with characters more than 2 bytes long
* Improved type name lookup performance for heavily templated code * Improved type name lookup performance for heavily templated code
* Improved display performance for large array-like data (QTCREATORBUG-28111)
Analyzer
--------
### Clang
* Fixed error when analyzing non-desktop targets (QTCREATORBUG-25615)
* Fixed wrong failure count display (QTCREATORBUG-27330)
Version Control Systems Version Control Systems
----------------------- -----------------------
@@ -132,8 +162,10 @@ Version Control Systems
* Added support for user-configured comment character (QTCREATORBUG-28042) * Added support for user-configured comment character (QTCREATORBUG-28042)
* Improved matching of commit hashes (QTCREATORBUG-24768, QTCREATORBUG-28268) * Improved matching of commit hashes (QTCREATORBUG-24768, QTCREATORBUG-28268)
* Fixed adding or deleting files in nested directories (QTCREATORBUG-27644, QTCREATORBUG-27405) * Fixed adding or deleting files in nested directories (QTCREATORBUG-27644,
QTCREATORBUG-27405)
* Fixed that text encoding in project settings was not respected on diff * Fixed that text encoding in project settings was not respected on diff
(QTCREATORBUG-21794)
Test Integration Test Integration
---------------- ----------------
@@ -142,6 +174,8 @@ Test Integration
([Documentation](https://doc-snapshots.qt.io/qtcreator-9.0/creator-squish.html)) ([Documentation](https://doc-snapshots.qt.io/qtcreator-9.0/creator-squish.html))
* Catch 2 * Catch 2
* Fixed handling of exceptions (QTCREATORBUG-28131) * Fixed handling of exceptions (QTCREATORBUG-28131)
* Fixed crash (QTCREATORBUG-28269)
* Fixed handling of `WARN`, `FAIL` and `INFO` (QTCREATORBUG-28394)
Platforms Platforms
--------- ---------
@@ -153,12 +187,27 @@ Platforms
* Fixed issues when drives are mapped (QTCREATORBUG-27869, QTCREATORBUG-28031) * Fixed issues when drives are mapped (QTCREATORBUG-27869, QTCREATORBUG-28031)
* Fixed that output could be missing for Qt based external tools * Fixed that output could be missing for Qt based external tools
(QTCREATORBUG-27828) (QTCREATORBUG-27828)
* Fixed that Clink and other applications could increase startup time for
toolchain detection (QTCREATORBUG-27906)
* Fixed that running Qt Creator from a MSVC environment could interfere with
MSVC auto-detection (QTCREATORBUG-28315)
### macOS ### macOS
* Added auto-detection of `ccache` compilers from Homebrew (QTCREATORBUG-27792) * Added auto-detection of `ccache` compilers from Homebrew (QTCREATORBUG-27792)
* Fixed that theme partially switched between dark and light when system theme * Fixed that theme partially switched between dark and light when system theme
changed during runtime (QTCREATORBUG-28066) changed during runtime (QTCREATORBUG-28066)
* Fixed wrong target being set for the code model for iOS kits
(QTCREATORBUG-28278)
* Fixed that Touch Bar contained `Edit Bookmark` instead of `Toggle Bookmark`
(QTCREATORBUG-28108)
* Fixed missing `Search` item in `Help` menu (QTCREATORBUG-24751)
### Android
* Fixed emulator operations when the deprecated `SDK Tools` is installed in
addition to `SDK Command-line Tools` (QTCREATORBUG-28196)
* Fixed debugging over WiFi (QTCREATORBUG-28342)
### iOS ### iOS
@@ -166,10 +215,15 @@ Platforms
### Remote Linux ### Remote Linux
* Enable usage as build device
* Added option for SSH port to wizard * Added option for SSH port to wizard
* Added fallback for devices without `base64` * Added fallback for devices without `base64`
* Added experimental support to user remote linux build devices (QTCREATORBUG-28242) * Added experimental support to user remote linux build devices (QTCREATORBUG-28242)
### Boot to Qt
* Fixed that `rsync` was not available for deployment (QTCREATORBUG-24731)
### Docker ### Docker
* Added option for `docker` command * Added option for `docker` command
@@ -181,16 +235,21 @@ Platforms
* Added sorting of images * Added sorting of images
* Added option to hide images without tag * Added option to hide images without tag
* Added double-click for selecting image * Added double-click for selecting image
* Fixed `Browse` button for build directory for remote directories
* Fixed interrupting and pausing of GDB * Fixed interrupting and pausing of GDB
* Fixed running `ctest` on device * Fixed running `ctest` on device
* Fixed mounting paths with spaces or colons
* Fixed opening remote text files without extension
Credits for these changes go to: Credits for these changes go to:
-------------------------------- --------------------------------
Aaron Barany Aaron Barany
Adam Sowa
Alessandro Portale Alessandro Portale
Alexander Akulich Alexander Akulich
Alexander Drozdov Alexander Drozdov
André Pönitz André Pönitz
Ari Parkkila
Artem Sokolovskii Artem Sokolovskii
Assam Boudjelthia Assam Boudjelthia
Björn Schäpers Björn Schäpers
@@ -205,6 +264,7 @@ Fawzi Mohamed
Florian Koch Florian Koch
Henning Gruendl Henning Gruendl
Jaroslaw Kobus Jaroslaw Kobus
Kwangsub Kim
Leena Miettinen Leena Miettinen
Lucie Gérard Lucie Gérard
Marc Mutz Marc Mutz
@@ -213,6 +273,7 @@ Marcus Tillmanns
Miikka Heikkinen Miikka Heikkinen
Orgad Shaneh Orgad Shaneh
Piotr Mućko Piotr Mućko
Rainer Keller
Robert Löhning Robert Löhning
Sergey Levin Sergey Levin
Sivert Krøvel Sivert Krøvel

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.2 KiB

View File

@@ -216,7 +216,7 @@
To start an AVD, select \uicontrol {Start AVD}. Usually, you don't need to To start an AVD, select \uicontrol {Start AVD}. Usually, you don't need to
start AVDs separately because they are automatically started when you start AVDs separately because they are automatically started when you
select them in the \l{Building for Multiple Platforms}{kit selector} to select them in the \l{Building for Multiple Platforms}{kit selector} to
\l{Deploying Applications to Android Devices}{deploy applications} to them. \l{Deploying to Android}{deploy applications} to them.
To remove an AVD from the list and the kit selector, select To remove an AVD from the list and the kit selector, select
\uicontrol {Erase AVD}. \uicontrol {Erase AVD}.

View File

@@ -6,7 +6,7 @@
\page creator-deploying-android.html \page creator-deploying-android.html
\nextpage creator-deployment-b2qt.html \nextpage creator-deployment-b2qt.html
\title Deploying Applications to Android Devices \title Deploying to Android
On Android, applications are distributed in specially structured types of On Android, applications are distributed in specially structured types of
ZIP packages called Application Packages (APK) or Android App Bundles (AAB). ZIP packages called Application Packages (APK) or Android App Bundles (AAB).

View File

@@ -176,6 +176,6 @@
\li \l {Opening Projects} \li \l {Opening Projects}
\li \l {CMake Build Configuration} \li \l {CMake Build Configuration}
\li \l {Specifying Run Settings} \li \l {Specifying Run Settings}
\li \l {Deploying Applications to Generic Remote Linux Devices} \li \l {Deploying to Remote Linux}
\endlist \endlist
*/ */

View File

@@ -162,24 +162,29 @@
\section2 Debugging Tools for Windows \section2 Debugging Tools for Windows
To use the CDB debugger, you must install the To use the CDB debugger, install the \e {Debugging Tools for Windows} when
\e{Debugging tools for Windows}. You can download them from you install \QC either by using the Qt Online Installer (in \uicontrol Qt
\l{https://developer.microsoft.com/windows/downloads/windows-10-sdk} > \uicontrol Tools > \uicontrol {\QC}) or by using the stand-alone \QC
{Download and Install Debugging Tools for Windows} as part of the Windows installation packages.
SDK.
\note Visual Studio does not include the Debugging tools needed, The 32-bit CDB version can only debug 32-bit executables, whereas the 64-bit
and therefore, you must install them separately. version can debug both 64-bit and 32-bit executables. However, interrupting a
32-bit executable with a 64-bit debugger can result in a stacktrace of the
WOW64 emulator 32-bit emulation layer being displayed.
In addition, you must select \uicontrol {\QC CDB Debugger Support} \QC extends the command line debugger by loading the
(in \uicontrol Qt > \uicontrol Tools > \uicontrol {\QC}) when you install \c qtcreatorcdbext.dll extension library into it. The
Qt or the stand-alone \QC. library must be available in the \c {libs\qtcreatorcdbext64}
and \c {libs\qtcreatorcdbext32} folder. To install it there,
select \uicontrol {\QC CDB Debugger Support} when you install \QC.
When manually building \QC using When manually building \QC using
the Microsoft Visual C++ Compiler, the build process checks for the Microsoft Visual C++ Compiler, the build process checks for
the required files in the required files in
\c{"%ProgramFiles%\Debugging Tools for Windows"}. \c{"%ProgramFiles%\Debugging Tools for Windows"}.
\section3 Symbol Server
It is highly recommended that you add the Symbol Server provided It is highly recommended that you add the Symbol Server provided
by Microsoft to the symbol search path of the debugger. The by Microsoft to the symbol search path of the debugger. The
Symbol Server provides you with debugging informaton for the Symbol Server provides you with debugging informaton for the

View File

@@ -1504,8 +1504,12 @@
\li Make sure you use at least \QC 3.0.1 \li Make sure you use at least \QC 3.0.1
\li Make sure the debugger is set up properly. For more information, \li Select the \inlineimage icons/run_small.png
see \l{Setting Up Debugger}. (\uicontrol Run) button to verify that the
\l {Running on Multiple Platforms}{build and run kit selector}
picked a runnable target and you can run the application.
\li Make sure the debugger is \l{Setting Up Debugger}{set up properly}.
\li In the \uicontrol Debug mode, select \uicontrol View > \li In the \uicontrol Debug mode, select \uicontrol View >
\uicontrol Views > \uicontrol {Debugger Log} to open the \uicontrol Views > \uicontrol {Debugger Log} to open the
@@ -1516,6 +1520,8 @@
\l{Pasting and Fetching Code Snippets}{code pasting service} before \l{Pasting and Fetching Code Snippets}{code pasting service} before
asking questions in the IRC (on the #qt-creator channel at Libera.Chat). asking questions in the IRC (on the #qt-creator channel at Libera.Chat).
\note Error 135 usually means that a dependent DLL cannot be found.
\endlist \endlist
\section1 Pointer Variable Members Are Not Displayed Directly \section1 Pointer Variable Members Are Not Displayed Directly
@@ -1526,6 +1532,9 @@
select \uicontrol {Dereference Pointers Automatically} in the context select \uicontrol {Dereference Pointers Automatically} in the context
menu in the \uicontrol Locals and \uicontrol Expressions views. menu in the \uicontrol Locals and \uicontrol Expressions views.
If you cannot view variables at all, check that you selected a \e debug build
configuration.
\section1 Structure Members Are Not Sorted According to Structure Layout \section1 Structure Members Are Not Sorted According to Structure Layout
By default, structure members are displayed in alphabetic order. To inspect By default, structure members are displayed in alphabetic order. To inspect
@@ -1536,7 +1545,9 @@
\section1 Built-in Debugger Is Slow During Startup and Runtime \section1 Built-in Debugger Is Slow During Startup and Runtime
Slowness that is related to the loading of debug information is hard to Slowness that is related to the loading of debug information is hard to
avoid. avoid. The following sections describe some possible solutions.
\section2 Caching GDB Symbol Index
When using GDB as backend, you can automatically save a copy of When using GDB as backend, you can automatically save a copy of
its symbol index in a cache on disk and retrieve it from there its symbol index in a cache on disk and retrieve it from there
@@ -1546,12 +1557,38 @@
\image qtcreator-gdb-options.png "GDB preferences" \image qtcreator-gdb-options.png "GDB preferences"
Some slowness stems from maintaining breakpoints inside \section2 Minimizing Number of Breakpoints
Some debugging slowness stems from maintaining breakpoints inside
the debugger (under some circumstances all breakpoints need to be inserted the debugger (under some circumstances all breakpoints need to be inserted
and removed again for each step) and the evaluation of expressions after and removed again for each step) and the evaluation of expressions after
each step. We recommend that you minimize the number of breakpoints and each step. We recommend that you minimize the number of breakpoints and
watched expressions. watched expressions.
\section2 Cleaning Builds
If out-of-date .pdb files make debugging slower, try a clean build.
\section2 Disabling Incremental Linking
Incremental linking can affect debugging. If the debugger log contains
the \e {Unable to verify checksum of module} message, disable incremental
linking.
When using CMake as the build system, add the following line to the project
CMakeLists.txt file:
\badcode
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /INCREMENTAL:NO" )
\endcode
When using qmake as the build system, add the following line to the project
.pro file:
\badcode
QMAKE_LFLAGS_DEBUG += /INCREMENTAL:NO
\endcode
\section1 Debugger Cannot Attach to Running Process on Linux \section1 Debugger Cannot Attach to Running Process on Linux
GDB uses \c ptrace to attach to running processes. Some Linux distributions GDB uses \c ptrace to attach to running processes. Some Linux distributions

View File

@@ -4,15 +4,14 @@
/*! /*!
\page creator-adding-docker-devices.html \page creator-adding-docker-devices.html
\previouspage creator-developing-b2qt.html \previouspage creator-developing-b2qt.html
\nextpage creator-developing-generic-linux.html \nextpage creator-developing-ios.html
\title Adding Docker Devices \title Adding Docker Devices
You can add \l{ https://docs.docker.com/get-started/overview/} Create Docker devices from \l{ https://docs.docker.com/get-started/overview/}
{Docker images} as \e devices to run, debug, and analyze applications {Docker images} and use them to build, run, and debug applications. A Docker
built for the Docker container from \QC. A Docker device operates like container operates like a virtual machine but uses less system resources at
a virtual machine but uses less system resources at the cost of being the cost of being less flexible.
less flexible.
Docker support is experimental. While Linux, \macos, and Windows hosts are Docker support is experimental. While Linux, \macos, and Windows hosts are
supported in principle, Linux is the recommended platform. supported in principle, Linux is the recommended platform.
@@ -20,18 +19,19 @@
Currently, only CMake is supported for building applications in the Docker Currently, only CMake is supported for building applications in the Docker
container. container.
You can run applications locally or in a compatible Docker container. To be To build, run, and debug applications on Docker devices, you must install and
able to run and debug applications on Docker devices, you must install Docker configure \c docker-cli on the development host. \QC automatically detects
as well as add Docker devices and select them in the kit. \QC automatically \l{Adding Kits}{build and run kit} items, such \l{Adding Debuggers}
detects kits in the shared Docker directories, but you need to check that {debuggers} and \l{Adding Qt Versions}{Qt versions}, in the Docker container
they point to the correct kit items. and creates kits for the devices.
Use a wizard to search for Docker images available on your local Docker You can use images that are available locally. You can pull
installation and add them as devices. To access images from Docker hub or images from Docker hub or other registries using the
other registries, you first need to pull the images using the
\l{https://docs.docker.com/engine/reference/commandline/pull/}{docker pull} \l{https://docs.docker.com/engine/reference/commandline/pull/}{docker pull}
command. You can edit the Docker device preferences later in command. To check that an image is available locally, run the
\uicontrol Edit > \uicontrol Preferences > \uicontrol Devices. \c {docker images} command in a terminal.
\section1 Enabling Docker Plugin
To enable the experimental Docker plugin: To enable the experimental Docker plugin:
@@ -41,33 +41,67 @@
\li Select \uicontrol {Restart Now} to restart \QC and load the plugin. \li Select \uicontrol {Restart Now} to restart \QC and load the plugin.
\endlist \endlist
\section1 Adding Docker Images as Devices
To add a Docker image as a device: To add a Docker image as a device:
\list 1 \list 1
\li Select \uicontrol Edit > \uicontrol Preferences > \uicontrol Devices \li Select \uicontrol Edit > \uicontrol Preferences > \uicontrol Devices
> \uicontrol Devices > \uicontrol Add > \uicontrol {Docker Device} > \uicontrol Docker and enter the path to the Docker CLI in
> \uicontrol {Start Wizard} to search for images in your local Docker the \uicontrol Command field.
installation. \image qtcreator-preferences-devices-docker.webp "Docker tab in Devices preferences"
\image qtcreator-docker-image-selection.png "Docker Image Selection dialog" \li Select \uicontrol Devices > \uicontrol Add >
\uicontrol {Docker Device} > \uicontrol {Start Wizard}
to search for images in your local Docker installation.
\li Select the Docker image to use, and then select \uicontrol OK. \li Select the Docker image to use, and then select \uicontrol OK.
\note If the Docker process is not found, make sure that Docker is
running and the Docker CLI executable is set in PATH.
\li In \uicontrol Devices, check and modify Docker device preferences. \li In \uicontrol Devices, check and modify Docker device preferences.
\image qtcreator-docker-preferences.png "Docker Device preferences" \image qtcreator-preferences-devices-docker-device.webp "Docker device preferences"
\li Select \uicontrol {Run as outside user} to use the user ID and \li Select \uicontrol {Run as outside user} to use the user ID
group ID of the user running \QC in the Docker container. and group ID of the user running \QC in the Docker container.
\li In \uicontrol {Paths to mount}, specify host directories to mount \li Select \uicontrol {Do not modify entry point} to stop \QC from
into the container, such as the project directory. modifying the entry point of the image if the image starts into
\li Select \uicontrol {Auto-detect Kit Items} to generate an initial a shell.
\l{Adding Kits}{build and run kit} for the Docker device. \li In \uicontrol {Paths to mount}, specify host directories to
mount into the container, such as the project directory.
\li In \uicontrol {Search locations}, select where to search
for kit items.
\li Select \uicontrol {Auto-detect Kit Items} to find kit items and to
create kits for the Docker device.
\li Select \uicontrol Apply to save your changes.
\endlist \endlist
\section1 Specifying Paths to Mount The following sections describe the Docker device preferences in more detail.
\section2 Selecting Docker Images
The \uicontrol {Docker Image Selection} dialog displays a list of Docker
images in your local Docker installation. You can sort the images according
to the repository name or tag or the image ID or size.
\image qtcreator-docker-image-selection.webp "Docker Image Selection dialog"
Select \uicontrol {Show unnamed images} to show images that are not tagged.
Double-click an image to select it.
\section2 Modifying Entry Points
The entry point of a Docker container is specified in the container settings
and started as the main process when starting the container. The entry point
can be a shell, an SSH server, or another process, for example. By default,
\QC modifies the entry point before it starts a container to make sure that
the main process is an \c sh shell.
To stop \QC from modifying the entry point, select
\uicontrol {Do not modify entry point}. However, if the entry
point you specify is not a shell, \QC cannot start the container.
\section2 Specifying Paths to Mount
You can either copy your project files into the Docker container or specify You can either copy your project files into the Docker container or specify
paths to them in \uicontrol {Paths to mount}. Shared mounts are restricted paths to them in \uicontrol {Paths to mount}. Shared mounts are restricted
to locations in the host system that can end up in the same absolute location to locations in the host system that can end up in the same absolute location
in the Docker container. On Windows, mounted drives cannot be used as shared in the Docker container. On Windows, network mounts cannot be used as shared
mounts. mounts.
The paths in \uicontrol {Paths to mount} are mapped one-to-one to the Docker The paths in \uicontrol {Paths to mount} are mapped one-to-one to the Docker
@@ -75,27 +109,33 @@
\uicontrol {Delete Line} to delete the selected path or \uicontrol Clear \uicontrol {Delete Line} to delete the selected path or \uicontrol Clear
to delete all paths. to delete all paths.
\section1 Auto-detecting Kit Items \section2 Auto-detecting Kit Items
Select \uicontrol {Auto-detect Kit Items} to generate an initial Select \uicontrol {Auto-detect Kit Items} to find kit items and create kits
\l{Adding Kits}{build and run kit} for the Docker device. You can for the Docker device. You can search for kit items in the device's PATH or
either set the kit items, such \l{Adding Debuggers}{debuggers} and in the specified directories.
\l{Adding Qt Versions}{Qt version}, in PATH or install them in the
Docker container.
Select \uicontrol {Search in PATH} to detect kit items that are set in PATH. In \uicontrol {Search locations}, select:
Select \uicontrol {Search in Selected Directories} to detect kit items in \list
\li \uicontrol {Search in PATH} to find kit items in PATH.
\li \uicontrol {Search in Selected Directories} to find kit items in
the selected directories. the selected directories.
\li \uicontrol {Search in PATH and Additional Directories} to find kit
items in the PATH and in the selected directories.
\endlist
To view the automatically detected kit items, select When searching in directories, enter a semicolon-separated list of directory
paths in the Docker image to scan for kit entries.
To list the automatically detected kit items, select
\uicontrol {List Auto-Detected Kit Items}. To remove \uicontrol {List Auto-Detected Kit Items}. To remove
them, select \uicontrol {Remove Auto-Detected Kit Items}. them, select \uicontrol {Remove Auto-Detected Kit Items}.
\section1 Editing Docker Device Kits \section1 Editing Docker Device Kits
Select \uicontrol Edit > \uicontrol Preferences > \uicontrol Kits to check Select \uicontrol Edit > \uicontrol Preferences > \uicontrol Kits to check
that the automatically generated kit points to the appropriate kit items. that the automatically generated kits point to the appropriate kit items.
To specify build settings: To specify build settings:

View File

@@ -137,6 +137,10 @@
\li Use clean settings for debug or testing reasons. The settings \li Use clean settings for debug or testing reasons. The settings
will be deleted when \QC exits. will be deleted when \QC exits.
\row
\li -language <locale>
\li Set the UI language.
\row \row
\li -test <plugin>[,testfunction[:testdata]] ... \li -test <plugin>[,testfunction[:testdata]] ...
\li For \QC plugin developers: run the plugin's tests using a \li For \QC plugin developers: run the plugin's tests using a

View File

@@ -2,7 +2,7 @@
// 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
/*! /*!
\previouspage creator-developing-generic-linux.html \previouspage creator-adding-docker-devices.html
\page creator-developing-ios.html \page creator-developing-ios.html
\nextpage creator-developing-mcu.html \nextpage creator-developing-mcu.html

View File

@@ -4,9 +4,9 @@
/*! /*!
\page creator-deployment-b2qt.html \page creator-deployment-b2qt.html
\previouspage creator-deploying-android.html \previouspage creator-deploying-android.html
\nextpage creator-deployment-embedded-linux.html \nextpage creator-deployment-qnx.html
\title Deploying Applications to Boot2Qt Devices \title Deploying to Boot2Qt
You can specify settings for deploying applications to \l{Boot2Qt} devices You can specify settings for deploying applications to \l{Boot2Qt} devices
in the project configuration file and in \uicontrol Projects > in the project configuration file and in \uicontrol Projects >
@@ -15,7 +15,7 @@
\image qtcreator-boot2qt-deployment-steps.png "Boot2Qt deployment steps" \image qtcreator-boot2qt-deployment-steps.png "Boot2Qt deployment steps"
The deployment process is described in more detail in The deployment process is described in more detail in
\l{Deploying Applications to Generic Remote Linux Devices}. \l{Deploying to Remote Linux}.
\section1 Launching Applications on Boot \section1 Launching Applications on Boot

View File

@@ -9,20 +9,16 @@
/*! /*!
\page creator-deployment-embedded-linux.html \page creator-deployment-embedded-linux.html
\previouspage creator-deployment-b2qt.html \previouspage creator-deployment-qnx.html
\if defined(qtdesignstudio)
\nextpage creator-connecting-mobile.html \nextpage creator-connecting-mobile.html
\else
\nextpage creator-deployment-qnx.html
\endif
\title Deploying Applications to Generic Remote Linux Devices \title Deploying to Remote Linux
You can specify settings for deploying applications to generic remote You can specify settings for deploying applications to generic remote
Linux devices in the project configuration file and in the Linux devices in the project configuration file and in the
\uicontrol Projects mode, in \uicontrol {Run Settings}. \uicontrol Projects mode, in \uicontrol {Run Settings}.
\image qtcreator-embedded-linux-deployment-details.png "Deploy to embedded Linux" \image qtcreator-embedded-linux-deployment-details.png "Deploy to remote Linux devices"
The files to be installed are listed in the \uicontrol {Deployment} step, The files to be installed are listed in the \uicontrol {Deployment} step,
the \uicontrol {Files to deploy} field. The \uicontrol {Source File Path} the \uicontrol {Files to deploy} field. The \uicontrol {Source File Path}

View File

@@ -13,7 +13,7 @@
\list \list
\li \l {Bare Metal} \li \l {Bare Metal}
\li \l {Boot2Qt} \li \l {Boot2Qt}
\li \l {Generic Remote Linux} \li \l {Remote Linux}
\li \l {Microcontroller Units (MCU)} \li \l {Microcontroller Units (MCU)}
\li \l QNX \li \l QNX
\endlist \endlist
@@ -31,7 +31,7 @@
\section1 Bare Metal \section1 Bare Metal
You can run and debug applications on small devices that are not supported You can run and debug applications on small devices that are not supported
by the generic remote Linux device plugin by using GDB or a hardware by the remote Linux device plugin by using GDB or a hardware
debugger. debugger.
For more information about developing applications for Bare Metal devices, For more information about developing applications for Bare Metal devices,
@@ -56,24 +56,24 @@
{Boot2Qt: Installation Guides} {Boot2Qt: Installation Guides}
\li \l{Connecting Boot2Qt Devices} \li \l{Connecting Boot2Qt Devices}
\li \l{Specifying Run Settings for Boot2Qt Devices} \li \l{Specifying Run Settings for Boot2Qt Devices}
\li \l{Deploying Applications to Boot2Qt Devices} \li \l{Deploying to Boot2Qt}
\li \l{https://doc.qt.io/qtcreator/creator-overview-qtasam.html} \li \l{https://doc.qt.io/qtcreator/creator-overview-qtasam.html}
{Qt Creator Plugin for Qt Application Manager} {Qt Creator Plugin for Qt Application Manager}
\endlist \endlist
\section1 Generic Remote Linux \section1 Remote Linux
You must have a tool chain for building applications for embedded Linux You must have a tool chain for building applications for embedded Linux
devices installed on the development PC. devices installed on the development PC.
The following topics contain more information about developing applications The following topics contain more information about developing applications
for generic remote Linux devices: for remote Linux devices:
\list \list
\li \l{Connecting Generic Remote Linux Devices} \li \l{Connecting Remote Linux Devices}
\li \l{Deploying Applications to Generic Remote Linux Devices} \li \l{Deploying to Remote Linux}
\li \l{Specifying Run Settings for Linux-Based Devices} \li \l{Specifying Run Settings for Linux-Based Devices}
\li \l{Running on Generic Remote Linux Devices} \li \l{Running on Remote Linux Devices}
\li \l{https://doc.qt.io/qtcreator/creator-overview-qtasam.html} \li \l{https://doc.qt.io/qtcreator/creator-overview-qtasam.html}
{Qt Creator Plugin for Qt Application Manager} {Qt Creator Plugin for Qt Application Manager}
\endlist \endlist
@@ -105,7 +105,7 @@
\list \list
\li \l{Connecting QNX Devices} \li \l{Connecting QNX Devices}
\li \l{Deploying Applications to QNX Neutrino Devices} \li \l{Deploying to QNX Neutrino}
\li \l{Specifying Run Settings for QNX Devices} \li \l{Specifying Run Settings for QNX Devices}
\li \l{Running on QNX Devices} \li \l{Running on QNX Devices}
\li \l{Qt for QNX} \li \l{Qt for QNX}

View File

@@ -4,14 +4,14 @@
/*! /*!
//! [running on embedded linux] //! [running on embedded linux]
\section1 Running on Generic Remote Linux Devices \section1 Running on Remote Linux Devices
To build the application and run it on a device: To build the application and run it on a device:
\list 1 \list 1
\li Specify a connection to the device. For more information, see \li Specify a connection to the device. For more information, see
\l{Connecting Generic Remote Linux Devices}. \l{Connecting Remote Linux Devices}.
\li Click the \uicontrol Run button. \li Click the \uicontrol Run button.
@@ -25,12 +25,10 @@
displayed on the device. Command-line output is visible in the \QC displayed on the device. Command-line output is visible in the \QC
\uicontrol {Application Output} view. \uicontrol {Application Output} view.
Choose \uicontrol {Projects > Embedded Linux > Run} to view the settings for deploying In the \uicontrol {Projects} mode, select the remote Linux kit and then
the application to the connected device. select \uicontrol {Run} to view the settings for deploying the application
\if defined(qtcreator) to the connected device. For more information, see
For more information, see
\l{Specifying Run Settings for Linux-Based Devices}. \l{Specifying Run Settings for Linux-Based Devices}.
\endif
Debugging works transparently if GDB server is installed on the device and Debugging works transparently if GDB server is installed on the device and
it is compatible with the GDB on the host. it is compatible with the GDB on the host.

View File

@@ -17,7 +17,7 @@
host and on the device. host and on the device.
For more information on the deployment steps, see For more information on the deployment steps, see
\l{Deploying Applications to Boot2Qt Devices}. \l{Deploying to Boot2Qt}.
//! [run settings boot2qt] //! [run settings boot2qt]
*/ */

View File

@@ -11,7 +11,7 @@
host to the device and add the device configurations to host to the device and add the device configurations to
\l{glossary-buildandrun-kit}{kits}. Click \uicontrol {Manage Kits} to add devices \l{glossary-buildandrun-kit}{kits}. Click \uicontrol {Manage Kits} to add devices
to kits. For more information, see to kits. For more information, see
\l {Connecting Generic Remote Linux Devices}. \l {Connecting Remote Linux Devices}.
When you run the application, \QC copies the files to the connected device. When you run the application, \QC copies the files to the connected device.

View File

@@ -3,15 +3,10 @@
/*! /*!
\page creator-developing-generic-linux.html \page creator-developing-generic-linux.html
\if defined(qtdesignstudio) \previouspage creator-developing-qnx.html
\previouspage creator-developing-android.html \nextpage creator-setup-webassembly.html
\nextpage studio-advanced.html
\else
\previouspage creator-adding-docker-devices.html
\nextpage creator-developing-ios.html
\endif
\title Connecting Generic Remote Linux Devices \title Connecting Remote Linux Devices
You can connect generic Linux devices to the development PC to run, You can connect generic Linux devices to the development PC to run,
debug, and analyze applications built for them from \QC. debug, and analyze applications built for them from \QC.
@@ -19,10 +14,10 @@
If you have a tool chain for building applications for embedded Linux If you have a tool chain for building applications for embedded Linux
devices installed on the development PC, you can add devices installed on the development PC, you can add
it to \QC. You can then select a \l{glossary-buildandrun-kit}{kit} it to \QC. You can then select a \l{glossary-buildandrun-kit}{kit}
with \uicontrol {Embedded Linux} device type to with the device type \uicontrol {Remote Linux Device} to
build applications for and run them on the devices. build applications for and run them on the devices.
To be able to run and debug applications on generic remote Linux devices, To be able to run and debug applications on remote Linux devices,
you must add devices and select them in the \QC \l{glossary-buildandrun-kit} you must add devices and select them in the \QC \l{glossary-buildandrun-kit}
{kit}. {kit}.
@@ -30,7 +25,7 @@
in \uicontrol Edit > \uicontrol Preferences > \uicontrol Devices > in \uicontrol Edit > \uicontrol Preferences > \uicontrol Devices >
\uicontrol Devices. \uicontrol Devices.
\image qtcreator-linux-device-configurations.png "Devices dialog" \image qtcreator-preferences-devices-remote-linux.webp "Remote Linux Device in the Devices tab"
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
@@ -47,7 +42,7 @@
you may need to enter the password on every connection to the device, you may need to enter the password on every connection to the device,
or, if caching is enabled, at every \QC restart. or, if caching is enabled, at every \QC restart.
To configure connections between \QC and an embedded Linux device and to To configure connections between \QC and a remote Linux device and to
specify build and run settings for the device: specify build and run settings for the device:
\list 1 \list 1
@@ -69,19 +64,22 @@
\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 {Generic Linux Device} \uicontrol {Remote Linux Device}
> \uicontrol {Start Wizard}. > \uicontrol {Start Wizard}.
\image qtcreator-screenshot-devconf-linux.png "Connection Data wizard" \image qtcreator-preferences-devices-remote-linux-connection.webp "Connection Data wizard"
\li In the \uicontrol {The name to identify this configuration} field, \li In \uicontrol {The name to identify this configuration},
enter a name for the connection. enter a name for the connection.
\li In the \uicontrol {The device's host name or IP address} field, \li In \uicontrol {The device's host name or IP address},
enter the host name or IP address of the device. enter the host name or IP address of the device.
This value will be available in the variable \c %{Device:HostAddress}. This value will be available in the variable \c %{Device:HostAddress}.
\li In the \uicontrol {The username to log into the device} field, \li In \uicontrol {The device's SSH port number}, enter the port
number to use for SSH connections. This value will be
available in the variable \c %{Device:SshPort}.
\li In \uicontrol {The username to log into the device},
enter the username to log into the device and run the enter the username to log into the device and run the
application as. application as.
This value will be available in the variable \c %{Device:UserName}. This value will be available in the variable \c %{Device:UserName}.
@@ -89,7 +87,7 @@
\li Select \uicontrol {Next} to open the \li Select \uicontrol {Next} to open the
\uicontrol {Key Deployment} dialog. \uicontrol {Key Deployment} dialog.
\image qtcreator-generic-linux-device-key-deployment.png "Key Deployment dialog" \image qtcreator-preferences-devices-remote-linux-key-deployment.webp "Key Deployment dialog"
\li In \uicontrol {Private key file}, select a private key file \li In \uicontrol {Private key file}, select a private key file
to use for authentication. This value will be available in to use for authentication. This value will be available in
@@ -107,14 +105,16 @@
\endlist \endlist
All of these parameters can be edited later, as well as additional ones that the All of these parameters can be edited later, as well as additional ones that the
wizard does not show because there are sensible default values. One of these is wizard does not show because there are sensible default values.
the SSH port number, which is available in the variable \c %{Device:SshPort}.
\li Select \uicontrol Edit > \uicontrol Preferences > \uicontrol Kits > \li Select \uicontrol Edit > \uicontrol Preferences > \uicontrol Kits >
\uicontrol Add to add a kit for building for the device. Select the \uicontrol Add to add a kit for building for the device. Select the
Qt version, compiler, and device that you added above, and choose Qt version, compiler, and device that you added above, and select
\uicontrol {Generic Linux Device} for the device type. \uicontrol {Remote Linux Device} in \uicontrol {Device type}.
To build on the remote device, select \uicontrol {Remote Linux Device}
also in \uicontrol {Build device}.
\li To specify build settings: \li To specify build settings:
@@ -133,7 +133,7 @@
When you run the project, \QC deploys the application as specified by the When you run the project, \QC deploys the application as specified by the
deploy steps. By default, \QC copies the application files to the device. deploy steps. By default, \QC copies the application files to the device.
For more information, see \l{Deploying Applications to Generic Remote Linux Devices}. For more information, see \l{Deploying to Remote Linux}.
\endlist \endlist

View File

@@ -22,31 +22,28 @@
\list \list
\li \l{Deploying Applications to Android Devices} \li \l{Deploying to Android}
When you deploy the application to an Android device, \QC copies When you deploy the application to an Android device, \QC copies
the application files to the device. In addition, you can determine the application files to the device. In addition, you can determine
the Qt libraries to use. the Qt libraries to use.
\li \l {Deploying Applications to Boot2Qt Devices} \li \l {Deploying to Boot2Qt}
When you deploy the application to a Boot2Qt device, \QC copies When you deploy the application to a Boot2Qt device, \QC copies
the application files to the connected device. You can then test the application files to the connected device. You can then test
and debug the application on the device with \QC. and debug the application on the device with \QC.
\li \l{Deploying Applications to Generic Remote Linux Devices} \li \l{Deploying to QNX Neutrino}
When you deploy the application to a generic Linux-based device, \QC
copies the application files to the connected device. You can then
test and debug the application on the device with \QC.
\if defined(qtcreator)
\li \l{Deploying Applications to QNX Neutrino Devices}
When you deploy the application to a QNX Neutrino device, \QC copies When you deploy the application to a QNX Neutrino device, \QC copies
the application files to the connected device. You can then test and the application files to the connected device. You can then test and
debug the application on the device with \QC. debug the application on the device with \QC.
\endif
\li \l{Deploying to Remote Linux}
When you deploy the application to a generic Linux-based device, \QC
copies the application files to the connected device. You can then
test and debug the application on the device with \QC.
\endlist \endlist
*/ */

View File

@@ -36,7 +36,7 @@
\list \list
\li \l{Connecting Android Devices} \li \l{Connecting Android Devices}
\li \l{Deploying Applications to Android Devices} \li \l{Deploying to Android}
\li \l{Running on Multiple Platforms} \li \l{Running on Multiple Platforms}
\li \l{Creating a Mobile Application} \li \l{Creating a Mobile Application}
\li \l{Debugging on Android Devices} \li \l{Debugging on Android Devices}

View File

@@ -9,7 +9,7 @@
/*! /*!
\page creator-connecting-mobile.html \page creator-connecting-mobile.html
\previouspage creator-deployment-qnx.html \previouspage creator-deployment-embedded-linux.html
\nextpage creator-developing-android.html \nextpage creator-developing-android.html
\title Connecting Devices \title Connecting Devices
@@ -40,32 +40,21 @@
Qt version targeting Android and the Android SDK and NDK to develop Qt version targeting Android and the Android SDK and NDK to develop
for Android devices. for Android devices.
\if defined(qtcreator)
\li \l{Connecting Bare Metal Devices} \li \l{Connecting Bare Metal Devices}
You can connect bare metal devices to the development PC and use \QC You can connect bare metal devices to the development PC and use \QC
to debug applications on them with GDB or a hardware debugger. to debug applications on them with GDB or a hardware debugger.
\endif
\li \l{Connecting Boot2Qt Devices} \li \l{Connecting Boot2Qt Devices}
You can connect \l{Boot2Qt} devices to the development PC to run, You can connect \l{Boot2Qt} devices to the development PC to run,
debug, and analyze applications built for them from \QC. debug, and analyze applications built for them from \QC.
\if defined(qtcreator)
\li \l {Adding Docker Devices} \li \l {Adding Docker Devices}
You can add Docker images as \e devices to run, debug, and analyze You can add Docker images as \e devices to run, debug, and analyze
applications built for Docker containers from \QC. applications built for Docker containers from \QC.
\endif
\li \l{Connecting Generic Remote Linux Devices}
If you have a tool chain for building applications for embedded
Linux devices installed on the development
PC, you can add it and the device to \QC.
\if defined(qtcreator)
\li \l{Connecting iOS Devices} \li \l{Connecting iOS Devices}
You use the tools delivered with Xcode to connect devices to \QC. You use the tools delivered with Xcode to connect devices to \QC.
@@ -83,11 +72,15 @@
debug applications on them from within \QC. This is currently only debug applications on them from within \QC. This is currently only
supported for QNX Neutrino devices, and requires the QNX SDK to be supported for QNX Neutrino devices, and requires the QNX SDK to be
installed on the development PC. installed on the development PC.
\endif
\li \l{Connecting Remote Linux Devices}
If you have a tool chain for building applications for embedded
Linux devices installed on the development
PC, you can add it and the device to \QC.
\endlist \endlist
\if defined(qtcreator)
\section1 Related Topics \section1 Related Topics
\list \list
@@ -106,5 +99,4 @@
local Linux PC, remote generic SSH Linux targets, or local Linux PC, remote generic SSH Linux targets, or
\l{Boot2Qt}{Boot2Qt devices}. \l{Boot2Qt}{Boot2Qt devices}.
\endlist \endlist
\endif
*/ */

View File

@@ -24,6 +24,10 @@
To override this choice, select \uicontrol Edit > \uicontrol Preferences > To override this choice, select \uicontrol Edit > \uicontrol Preferences >
\uicontrol Kits. \uicontrol Kits.
For more information about setting up the debugger, see
\l {Setting Up Debugger}. If you encounter problems, see
\l {Troubleshooting Debugger}.
To add debuggers: To add debuggers:
\list 1 \list 1
@@ -31,7 +35,7 @@
\li Select \uicontrol Edit > \uicontrol Preferences > \uicontrol Kits > \li Select \uicontrol Edit > \uicontrol Preferences > \uicontrol Kits >
\uicontrol Debuggers > \uicontrol Add. \uicontrol Debuggers > \uicontrol Add.
\image qtcreator-options-build-run-debuggers.png "Adding debuggers" \image qtcreator-preferences-kits-debuggers.webp "Debuggers tab in Kits preferences"
\li In the \uicontrol Name field, give a descriptive name for the debugger. \li In the \uicontrol Name field, give a descriptive name for the debugger.
@@ -40,7 +44,12 @@
\list \list
\li For CDB (Windows only), specify the path to the Windows \li For CDB (Windows only), specify the path to the Windows
Console Debugger executable. Console Debugger executable, \c cdb.exe.
The 32-bit version can only debug 32-bit executables, whereas
the 64-bit version can debug both 64-bit and 32-bit
executables. For more information, see
\l {Debugging Tools for Windows}.
\li For GDB, specify the path to the GDB executable. The \li For GDB, specify the path to the GDB executable. The
executable must be built with Python scripting support executable must be built with Python scripting support

View File

@@ -129,11 +129,11 @@
\section1 Providing Deployment Information \section1 Providing Deployment Information
If you want to run your application on a generic remote Linux device, If you want to run your application on a remote Linux device,
you first need to deploy your executable and possibly other files. you first need to deploy your executable and possibly other files.
\QC does that for you automatically if you provide the necessary \QC does that for you automatically if you provide the necessary
information. This works the same way as explained for CMake in information. This works the same way as explained for CMake in
\l {Deploying Applications to Generic Remote Linux Devices}, \l {Deploying to Remote Linux},
except that you also need to include your application binary in the list. except that you also need to include your application binary in the list.
\section1 Creating a Run Configuration \section1 Creating a Run Configuration

View File

@@ -30,7 +30,7 @@
\li \l{https://doc.qt.io/Boot2Qt/b2qt-installation-guides.html} \li \l{https://doc.qt.io/Boot2Qt/b2qt-installation-guides.html}
{Boot2Qt Device} (commercial only) {Boot2Qt Device} (commercial only)
\li \l{Emulator}{Boot2Qt Emulator Device} (commercial only) \li \l{Emulator}{Boot2Qt Emulator Device} (commercial only)
\li \l{Connecting Generic Remote Linux Devices}{Generic Remote Linux Device} \li \l{Connecting Remote Linux Devices}{Remote Linux Device}
\li \l{Connecting iOS Devices}{iOS Device} \li \l{Connecting iOS Devices}{iOS Device}
\li iOS Simulator \li iOS Simulator
\li \l{Connecting MCUs}{MCU Device} (commercial only) \li \l{Connecting MCUs}{MCU Device} (commercial only)

View File

@@ -9,11 +9,10 @@
// ********************************************************************** // **********************************************************************
/*! /*!
\previouspage creator-deployment-embedded-linux.html \previouspage creator-deployment-b2qt.html
\page creator-deployment-qnx.html \page creator-deployment-qnx.html
\nextpage creator-connecting-mobile.html \nextpage creator-deployment-embedded-linux.html
\title Deploying to QNX Neutrino
\title Deploying Applications to QNX Neutrino Devices
You can specify settings for deploying applications to QNX Neutrino You can specify settings for deploying applications to QNX Neutrino
devices in the project configuration file and in \uicontrol Projects devices in the project configuration file and in \uicontrol Projects
@@ -22,7 +21,7 @@
\image qtcreator-qnx-deployment.png "Deploy to device" \image qtcreator-qnx-deployment.png "Deploy to device"
The deployment process is described in more detail in The deployment process is described in more detail in
\l{Deploying Applications to Generic Remote Linux Devices}. \l{Deploying to Remote Linux}.
\section1 Finding Configured Devices \section1 Finding Configured Devices

View File

@@ -5,7 +5,7 @@
/*! /*!
\previouspage creator-developing-mcu.html \previouspage creator-developing-mcu.html
\page creator-developing-qnx.html \page creator-developing-qnx.html
\nextpage creator-setup-webassembly.html \nextpage creator-developing-generic-linux.html
\title Connecting QNX Devices \title Connecting QNX Devices
@@ -19,7 +19,7 @@
\section1 Adding a QNX Neutrino Device in \QC \section1 Adding a QNX Neutrino Device in \QC
Adding a QNX Neutrino device is very similar to Adding a QNX Neutrino device is very similar to
\l{Connecting Generic Remote Linux Devices}, except that \l{Connecting Remote Linux Devices}, except that
you need to select \uicontrol {QNX Device} in the you need to select \uicontrol {QNX Device} in the
\uicontrol {Device Configuration} wizard. \uicontrol {Device Configuration} wizard.

View File

@@ -139,9 +139,10 @@
\li \l{Running on Multiple Platforms} \li \l{Running on Multiple Platforms}
\li \l{Deploying to Devices} \li \l{Deploying to Devices}
\list \list
\li \l{Deploying Applications to Android Devices} \li \l{Deploying to Android}
\li \l{Deploying Applications to Generic Remote Linux Devices} \li \l{Deploying to Boot2Qt}
\li \l{Deploying Applications to QNX Neutrino Devices} \li \l{Deploying to QNX Neutrino}
\li \l{Deploying to Remote Linux}
\endlist \endlist
\li \l{Connecting Devices} \li \l{Connecting Devices}
\list \list
@@ -149,10 +150,10 @@
\li \l{Connecting Bare Metal Devices} \li \l{Connecting Bare Metal Devices}
\li \l{Connecting Boot2Qt Devices} \li \l{Connecting Boot2Qt Devices}
\li \l{Adding Docker Devices} \li \l{Adding Docker Devices}
\li \l{Connecting Generic Remote Linux Devices}
\li \l{Connecting iOS Devices} \li \l{Connecting iOS Devices}
\li \l{Connecting MCUs} \li \l{Connecting MCUs}
\li \l{Connecting QNX Devices} \li \l{Connecting QNX Devices}
\li \l{Connecting Remote Linux Devices}
\li \l{Building Applications for the Web} \li \l{Building Applications for the Web}
\endlist \endlist
\li \l{Customizing the Build Process} \li \l{Customizing the Build Process}

View File

@@ -17,7 +17,7 @@
\image qtcreator-filesystem-view-design.png "File System view in the Design mode" \image qtcreator-filesystem-view-design.png "File System view in the Design mode"
\else \else
\image qtcreator-filesystem-view.png "File System view in the sidebar" \image qtcreator-filesystem-view.webp "File System view in the sidebar"
\endif \endif
To move to the root directory of the file system, select \uicontrol Computer To move to the root directory of the file system, select \uicontrol Computer

View File

@@ -2,7 +2,7 @@
// 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
/*! /*!
\previouspage creator-developing-qnx.html \previouspage creator-developing-generic-linux.html
\page creator-setup-webassembly.html \page creator-setup-webassembly.html
\nextpage creator-build-process-customizing.html \nextpage creator-build-process-customizing.html

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 440 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

View File

@@ -4,7 +4,7 @@
/*! /*!
\page creator-exporting-qml.html \page creator-exporting-qml.html
\previouspage studio-importing-3d.html \previouspage studio-importing-3d.html
\nextpage qtquick-motion-design.html \nextpage qt-effect-maker-files.html
\title Exporting Components \title Exporting Components

View File

@@ -3,7 +3,7 @@
/*! /*!
\page qtquick-motion-design.html \page qtquick-motion-design.html
\previouspage creator-exporting-qml.html \previouspage qt-effect-maker.html
\nextpage quick-animation-overview.html \nextpage quick-animation-overview.html
\title Motion Design \title Motion Design

View File

@@ -0,0 +1,93 @@
/****************************************************************************
**
** Copyright (C) 2022 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Design Studio documentation.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Free Documentation License Usage
** Alternatively, this file may be used under the terms of the GNU Free
** Documentation License version 1.3 as published by the Free Software
** Foundation and appearing in the file included in the packaging of
** this file. Please review the following information to ensure
** the GNU Free Documentation License version 1.3 requirements
** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
**
****************************************************************************/
/*!
\page qt-effect-maker.html
\previouspage qt-effect-maker-files.html
\nextpage qtquick-motion-design.html
\sa {Creating Qt Quick Effect Maker Files}
\title Working with Effects in Qt Quick Effect Maker
The Qt Quick Effect Maker is a tool to create high-performance
shader effects for Qt Quick.
You can import these effects to \QDS and you can run Qt Quick Effect Maker
from \QDS.
\section1 Creating Effects
When you run Qt Quick Effect Maker, it starts with an empty project. To
create your effect, add nodes to the node tree.
\image qt-quick-effect-maker.webp
Consider the following things when creating effects:
\list
\li Some nodes do not function alone, they need a helper node. For
example, the \uicontrol FastBlur node needs a \uicontrol BlurHelper node
and the \uicontrol Noise node needs a \uicontrol NoiseHelper node. If the
node needs another node, it is mentioned in the node description.
\li If your effect appears cropped, you need to go to \uicontrol Edit >
\uicontrol {Project Settings} and increase the item padding.
\endlist
\section2 Creating a Blur Effect
To create a blur effect:
\list 1
\li Add a \uicontrol FastBlur node to the node tree.
\li Add a \uicontrol BlurHelper node to the node tree. You need the
\uicontrol BlurHelper node for all effects that contains a blur effect.
\endlist
\image blur-effect-nodes.png
You can now select the \uicontrol FastBlur node and in the settings, change
the \uicontrol fastBlurAmount value to control the amount of blur.
\image blur-effect-step-1.webp
\section3 Adjusting Item Borders
The effect appears cropped. You need to adjust item borders:
\list 1
\li Select \inlineimage effect-item-borders-icon.png
to display item borders.
\image blur-effect-step-2.webp
\li Go to \uicontrol Edit > \uicontrol {Project Settings}.
\li Set the item padding for all sides to 100.
\image effect-item-padding-dialog.png
\endlist
Now, you can see the complete blur effect.
\image blur-effect-step-3.webp
*/

View File

@@ -0,0 +1,94 @@
/****************************************************************************
**
** Copyright (C) 2022 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Design Studio documentation.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Free Documentation License Usage
** Alternatively, this file may be used under the terms of the GNU Free
** Documentation License version 1.3 as published by the Free Software
** Foundation and appearing in the file included in the packaging of
** this file. Please review the following information to ensure
** the GNU Free Documentation License version 1.3 requirements
** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
**
****************************************************************************/
/*!
\page qt-effect-maker-files.html
\nextpage qt-effect-maker.html
\previouspage creator-exporting-qml.html
\sa {Working with Effects in Qt Quick Effect Maker}
\title Creating Qt Quick Effect Maker Files
\section1 Creating an Effect File
You can create empty Qt Quick Effect Maker effect (.qep) files in \QDS and
then edit them in Qt Quick Effect Maker.
To create an effect file:
\list 1
\li In \QDS, go to \uicontrol File > \uicontrol {New File}.
\li Go to the \uicontrol Effects tab and select
\uicontrol {Effect file (Effect Maker)}.
\image new-effect-file.png
\li Select \uicontrol Choose and follow the wizard to create the file.
\endlist
After you have created the effect file, it is available in the
\uicontrol Assets view.
\image assets-view-effect.png
\section2 Editing and Re-importing an Effect File
To edit an effect file in Qt Quick Effect Maker, double-click it in
the \uicontrol Assets view. This opens the effect in Qt Quick Effect
Maker where you can make your changes.
When you have edited the effect file in Qt Quick Effect Maker, you need
to save and export it:
\list 1
\li In Qt Quick Effect Maker, go to \uicontrol File > \uicontrol Save.
\li Select \uicontrol File > \uicontrol Export.
\li With the default settings, select \uicontrol Ok.
\image effect-maker-export.png
\endlist
Now, you can close Qt Quick Effect Maker and return to \QDS and apply the
effect.
\section1 Applying an Effect
You can apply effects to components in \QDS. To do so, drag the effect
from the \uicontrol Assets view to the component in the \uicontrol 2D view.
\image apply-effect-maker-effect.webp
\section1 Animated Effect
When you import an animated effect, you need to turn on the animation for it
to see the animation in your \QDS application.
To turn on animation for an effect, first apply the effect to a component,
and then:
\list 1
\li Select the effect in \uicontrol Navigator.
\li In \uicontrol Properties, go to the
\uicontrol {Exposed Custom Properties} section and set
\uicontrol timeRunning to true.
\endlist
*/

View File

@@ -174,6 +174,11 @@
\li \l{Importing 3D Assets} \li \l{Importing 3D Assets}
\endlist \endlist
\li \l{Exporting Components} \li \l{Exporting Components}
\li Qt Quick Effect Maker
\list
\li \l{Creating Qt Quick Effect Maker Files}
\li \l{Working with Effects in Qt Quick Effect Maker}
\endlist
\endlist \endlist
\endlist \endlist
\li \l{Motion Design} \li \l{Motion Design}

View File

@@ -353,9 +353,6 @@ class Dumper(DumperBase):
self.ptrSize = lambda: size self.ptrSize = lambda: size
return size return size
def put(self, stuff):
self.output += stuff
def stripQintTypedefs(self, typeName): def stripQintTypedefs(self, typeName):
if typeName.startswith('qint'): if typeName.startswith('qint'):
prefix = '' prefix = ''
@@ -423,7 +420,7 @@ class Dumper(DumperBase):
self.setVariableFetchingOptions(args) self.setVariableFetchingOptions(args)
self.output = '' self.output = []
self.currentIName = 'local' self.currentIName = 'local'
self.put('data=[') self.put('data=[')
@@ -445,10 +442,11 @@ class Dumper(DumperBase):
self.qtNamespaceToReport = self.qtNamespace() self.qtNamespaceToReport = self.qtNamespace()
if self.qtNamespaceToReport: if self.qtNamespaceToReport:
self.output += ',qtnamespace="%s"' % self.qtNamespaceToReport self.put(',qtnamespace="%s"' % self.qtNamespaceToReport)
self.qtNamespaceToReport = None self.qtNamespaceToReport = None
self.reportResult(self.output, args) self.reportResult(''.join(self.output), args)
self.output = []
def report(self, stuff): def report(self, stuff):
sys.stdout.write(stuff + "\n") sys.stdout.write(stuff + "\n")

View File

@@ -112,7 +112,7 @@ class Children():
self.d.currentNumChild = self.savedNumChild self.d.currentNumChild = self.savedNumChild
self.d.currentMaxNumChild = self.savedMaxNumChild self.d.currentMaxNumChild = self.savedMaxNumChild
if self.d.isCli: if self.d.isCli:
self.d.output += '\n' + ' ' * self.d.indent self.d.put('\n' + ' ' * self.d.indent)
self.d.put(self.d.childrenSuffix) self.d.put(self.d.childrenSuffix)
return True return True
@@ -173,7 +173,7 @@ class DumperBase():
self.displayStringLimit = 100 self.displayStringLimit = 100
self.useTimeStamps = False self.useTimeStamps = False
self.output = '' self.output = []
self.typesReported = {} self.typesReported = {}
self.typesToReport = {} self.typesToReport = {}
self.qtNamespaceToReport = None self.qtNamespaceToReport = None
@@ -309,9 +309,9 @@ class DumperBase():
self.putField('name', item.name) self.putField('name', item.name)
else: else:
self.indent += 1 self.indent += 1
self.output += '\n' + ' ' * self.indent self.put('\n' + ' ' * self.indent)
if isinstance(item.name, str): if isinstance(item.name, str):
self.output += item.name + ' = ' self.put(item.name + ' = ')
item.savedIName = self.currentIName item.savedIName = self.currentIName
item.savedValue = self.currentValue item.savedValue = self.currentValue
item.savedType = self.currentType item.savedType = self.currentType
@@ -869,7 +869,12 @@ class DumperBase():
self.putPlainChildren(value) self.putPlainChildren(value)
def put(self, stuff): def put(self, stuff):
self.output += stuff self.output.append(stuff)
def takeOutput(self):
res = '\n'.join(self.output)
self.output = []
return res
def check(self, exp): def check(self, exp):
if not exp: if not exp:

View File

@@ -175,24 +175,6 @@ def importPlainDumpers(args):
registerCommand('importPlainDumpers', importPlainDumpers) registerCommand('importPlainDumpers', importPlainDumpers)
class OutputSaver():
def __init__(self, d):
self.d = d
def __enter__(self):
self.savedOutput = self.d.output
self.d.output = ''
def __exit__(self, exType, exValue, exTraceBack):
if self.d.passExceptions and exType is not None:
self.d.showException('OUTPUTSAVER', exType, exValue, exTraceBack)
self.d.output = self.savedOutput
else:
self.savedOutput += self.d.output
self.d.output = self.savedOutput
return False
####################################################################### #######################################################################
# #
# The Dumper Class # The Dumper Class
@@ -214,7 +196,7 @@ class Dumper(DumperBase):
self.interpreterBreakpointResolvers = [] self.interpreterBreakpointResolvers = []
def prepare(self, args): def prepare(self, args):
self.output = '' self.output = []
self.setVariableFetchingOptions(args) self.setVariableFetchingOptions(args)
def fromFrameValue(self, nativeValue): def fromFrameValue(self, nativeValue):
@@ -690,7 +672,7 @@ class Dumper(DumperBase):
safePrint(res) safePrint(res)
return return
self.output += 'data=[' self.put('data=[')
partialVar = args.get('partialvar', '') partialVar = args.get('partialvar', '')
isPartial = len(partialVar) > 0 isPartial = len(partialVar) > 0
@@ -713,27 +695,26 @@ class Dumper(DumperBase):
self.handleLocals(variables) self.handleLocals(variables)
self.handleWatches(args) self.handleWatches(args)
self.output += '],typeinfo=[' self.put('],typeinfo=[')
for name in self.typesToReport.keys(): for name in self.typesToReport.keys():
typeobj = self.typesToReport[name] typeobj = self.typesToReport[name]
# Happens e.g. for '(anonymous namespace)::InsertDefOperation' # Happens e.g. for '(anonymous namespace)::InsertDefOperation'
#if not typeobj is None: #if not typeobj is None:
# self.output.append('{name="%s",size="%s"}' # self.put('{name="%s",size="%s"}' % (self.hexencode(name), typeobj.sizeof))
# % (self.hexencode(name), typeobj.sizeof)) self.put(']')
self.output += ']'
self.typesToReport = {} self.typesToReport = {}
if self.forceQtNamespace: if self.forceQtNamespace:
self.qtNamespaceToReport = self.qtNamespace() self.qtNamespaceToReport = self.qtNamespace()
if self.qtNamespaceToReport: if self.qtNamespaceToReport:
self.output += ',qtnamespace="%s"' % self.qtNamespaceToReport self.put(',qtnamespace="%s"' % self.qtNamespaceToReport)
self.qtNamespaceToReport = None self.qtNamespaceToReport = None
self.output += ',partial="%d"' % isPartial self.put(',partial="%d"' % isPartial)
self.output += ',counts=%s' % self.counts self.put(',counts=%s' % self.counts)
self.output += ',timings=%s' % self.timings self.put(',timings=%s' % self.timings)
self.reportResult(self.output, args) self.reportResult(''.join(self.output), args)
def parseAndEvaluate(self, exp): def parseAndEvaluate(self, exp):
val = self.nativeParseAndEvaluate(exp) val = self.nativeParseAndEvaluate(exp)
@@ -1321,7 +1302,7 @@ class Dumper(DumperBase):
limit = 10000 limit = 10000
self.prepare(args) self.prepare(args)
self.output = '' self.output = []
i = 0 i = 0
if extraQml: if extraQml:
@@ -1375,8 +1356,9 @@ class Dumper(DumperBase):
frame = gdb.newest_frame() frame = gdb.newest_frame()
self.currentCallContext = None self.currentCallContext = None
self.output = []
self.put('stack={frames=[')
while i < limit and frame: while i < limit and frame:
with OutputSaver(self):
name = frame.name() name = frame.name()
functionName = '??' if name is None else name functionName = '??' if name is None else name
fileName = '' fileName = ''
@@ -1426,7 +1408,8 @@ class Dumper(DumperBase):
frame = frame.older() frame = frame.older()
i += 1 i += 1
self.reportResult('stack={frames=[' + self.output + ']}', args) self.put(']}')
self.reportResult(self.takeOutput(), args)
def createResolvePendingBreakpointsHookBreakpoint(self, args): def createResolvePendingBreakpointsHookBreakpoint(self, args):
class Resolver(gdb.Breakpoint): class Resolver(gdb.Breakpoint):
@@ -1512,6 +1495,7 @@ class Dumper(DumperBase):
onHit=self.tracepointHit, onHit=self.tracepointHit,
onExpression=lambda tp, expr, val: self.tracepointExpression(tp, expr, val, args)) onExpression=lambda tp, expr, val: self.tracepointExpression(tp, expr, val, args))
self.reportResult("tracepoint=%s" % self.resultToMi(tp.dicts()), args) self.reportResult("tracepoint=%s" % self.resultToMi(tp.dicts()), args)
class CliDumper(Dumper): class CliDumper(Dumper):
def __init__(self): def __init__(self):
Dumper.__init__(self) Dumper.__init__(self)
@@ -1559,16 +1543,18 @@ class CliDumper(Dumper):
self.expandableINames = set() self.expandableINames = set()
self.prepare(args) self.prepare(args)
self.output = name + ' = ' self.output = []
self.put(name + ' = ')
value = self.parseAndEvaluate(name) value = self.parseAndEvaluate(name)
with TopLevelItem(self, name): with TopLevelItem(self, name):
self.putItem(value) self.putItem(value)
if not self.expandableINames: if not self.expandableINames:
return self.output + '\n\nNo drill down available.\n' self.put('\n\nNo drill down available.\n')
return self.takeOutput()
pattern = ' pp ' + name + ' ' + '%s' pattern = ' pp ' + name + ' ' + '%s'
return (self.output return (self.takeOutput()
+ '\n\nDrill down:\n ' + '\n\nDrill down:\n '
+ '\n '.join(pattern % x for x in self.expandableINames) + '\n '.join(pattern % x for x in self.expandableINames)
+ '\n') + '\n')

View File

@@ -1270,7 +1270,7 @@ class Dumper(DumperBase):
self.reportResult('error="No frame"', args) self.reportResult('error="No frame"', args)
return return
self.output = '' self.output = []
isPartial = len(self.partialVariable) > 0 isPartial = len(self.partialVariable) > 0
self.currentIName = 'local' self.currentIName = 'local'
@@ -1323,7 +1323,7 @@ class Dumper(DumperBase):
self.handleWatches(args) self.handleWatches(args)
self.put('],partial="%d"' % isPartial) self.put('],partial="%d"' % isPartial)
self.reportResult(self.output, args) self.reportResult(self.takeOutput(), args)
def fetchRegisters(self, args=None): def fetchRegisters(self, args=None):
@@ -2101,7 +2101,7 @@ class SummaryDumper(Dumper, LogMixin):
self.dumpermodules = ['qttypes'] self.dumpermodules = ['qttypes']
self.loadDumpers({}) self.loadDumpers({})
self.output = '' self.output = []
def report(self, stuff): def report(self, stuff):
return # Don't mess up lldb output return # Don't mess up lldb output
@@ -2123,12 +2123,12 @@ class SummaryDumper(Dumper, LogMixin):
self.expandedINames = [value.name] if expanded else [] self.expandedINames = [value.name] if expanded else []
savedOutput = self.output savedOutput = self.output
self.output = '' self.output = []
with TopLevelItem(self, value.name): with TopLevelItem(self, value.name):
self.putItem(value) self.putItem(value)
# FIXME: Hook into putField, etc to build up object instead of parsing MI # FIXME: Hook into putField, etc to build up object instead of parsing MI
response = gdbmiparser.parse_response("^ok,summary=%s" % self.output) response = gdbmiparser.parse_response("^ok,summary=%s" % self.takeOutput())
self.output = savedOutput self.output = savedOutput
self.expandedINames = oldExpanded self.expandedINames = oldExpanded

View File

@@ -0,0 +1,64 @@
{
"version": 1,
"supportedProjectTypes": [ ],
"id": "J.QEP",
"category": "U.QEP",
"trDescription": "Creates an Effect Maker file.",
"trDisplayName": "Effect File (Effect Maker)",
"trDisplayCategory": "Effects",
"iconText": "qep",
"platformIndependent": true,
"enabled": "%{JS: value('Features').indexOf('QmlDesigner.Wizards.Enterprise') >= 0}",
"featuresRequired": [ "QmlDesigner.Wizards.Enterprise" ],
"options": [
{ "key": "EffectFile", "value": "%{Class}.qep" },
{ "key": "DoNotOpenFile", "value": "true" }
],
"pages" :
[
{
"trDisplayName": "Define Class",
"trShortTitle": "Details",
"typeId": "Fields",
"data" :
[
{
"name": "Class",
"trDisplayName": "Effect name:",
"mandatory": true,
"type": "LineEdit",
"data": {
"validator": "(?:[A-Z_][a-zA-Z_0-9]*|)",
"fixup": "%{JS: '%{INPUT}'.charAt(0).toUpperCase() + '%{INPUT}'.slice(1) }"
}
},
{
"name": "TargetPath",
"type": "PathChooser",
"trDisplayName": "Path:",
"mandatory": true,
"data":
{
"kind": "existingDirectory",
"basePath": "%{InitialPath}",
"path": "%{InitialPath}"
}
}
]
}
],
"generators" :
[
{
"typeId": "File",
"data":
{
"source": "file.qep",
"target": "%{TargetPath}/%{EffectFile}",
"openInEditor": false
}
}
]
}

View File

@@ -1,40 +0,0 @@
{
"version": 1,
"supportedProjectTypes": [ ],
"id": "J.QEP",
"category": "U.QEP",
"trDescription": "Creates an Effect Maker file.",
"trDisplayName": "Effect File (Effect Maker)",
"trDisplayCategory": "Effects",
"iconText": "qep",
"platformIndependent": true,
"enabled": true,
"options": { "key": "DefaultSuffix", "value": "qep" },
"pages" :
[
{
"trDisplayName": "Location",
"trShortTitle": "Location",
"typeId": "File"
},
{
"trDisplayName": "Project Management",
"trShortTitle": "Summary",
"typeId": "Summary"
}
],
"generators" :
[
{
"typeId": "File",
"data":
{
"source": "file.qep",
"target": "%{JS: Util.fileName(value('TargetPath'), value('DefaultSuffix'))}",
"openInEditor": false
}
}
]
}

View File

@@ -8,7 +8,7 @@
"trDisplayCategory": "Application (Qt for Python)", "trDisplayCategory": "Application (Qt for Python)",
"icon": "icon.png", "icon": "icon.png",
"iconKind": "Themed", "iconKind": "Themed",
"enabled": "%{JS: value('Plugins').indexOf('Python') >= 0}", "enabled": "%{JS: value('Plugins').indexOf('Python') >= 0 && (!value('Platform').length || ['Desktop', 'DockerDeviceType', 'GenericLinuxOsType'].includes(value('Platform')))}",
"options": "options":
[ [

View File

@@ -8,7 +8,7 @@
"trDisplayCategory": "Application (Qt for Python)", "trDisplayCategory": "Application (Qt for Python)",
"icon": "../icons/icon.png", "icon": "../icons/icon.png",
"iconKind": "Themed", "iconKind": "Themed",
"enabled": "%{JS: value('Plugins').indexOf('Python') >= 0}", "enabled": "%{JS: value('Plugins').indexOf('Python') >= 0 && (!value('Platform').length || ['Desktop', 'DockerDeviceType', 'GenericLinuxOsType'].includes(value('Platform')))}",
"options": "options":
[ [

View File

@@ -8,7 +8,7 @@
"trDisplayCategory": "Application (Qt for Python)", "trDisplayCategory": "Application (Qt for Python)",
"icon": "../icons/icon.png", "icon": "../icons/icon.png",
"iconKind": "Themed", "iconKind": "Themed",
"enabled": "%{JS: value('Plugins').indexOf('Python') >= 0}", "enabled": "%{JS: value('Plugins').indexOf('Python') >= 0 && (!value('Platform').length || ['Desktop', 'DockerDeviceType', 'GenericLinuxOsType'].includes(value('Platform')))}",
"options": "options":
[ [

View File

@@ -8,7 +8,7 @@
"trDisplayCategory": "Application (Qt for Python)", "trDisplayCategory": "Application (Qt for Python)",
"icon": "../icons/icon.png", "icon": "../icons/icon.png",
"iconKind": "Themed", "iconKind": "Themed",
"enabled": "%{JS: value('Plugins').indexOf('Python') >= 0}", "enabled": "%{JS: value('Plugins').indexOf('Python') >= 0 && (!value('Platform').length || ['Desktop', 'DockerDeviceType', 'GenericLinuxOsType'].includes(value('Platform')))}",
"options": "options":
[ [

View File

@@ -8,7 +8,7 @@
"trDisplayCategory": "Application (Qt for Python)", "trDisplayCategory": "Application (Qt for Python)",
"icon": "../icons/icon.png", "icon": "../icons/icon.png",
"iconKind": "Themed", "iconKind": "Themed",
"enabled": "%{JS: value('Plugins').indexOf('Python') >= 0}", "enabled": "%{JS: value('Plugins').indexOf('Python') >= 0 && (!value('Platform').length || ['Desktop', 'DockerDeviceType', 'GenericLinuxOsType'].includes(value('Platform')))}",
"options": "options":
[ [

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -67,18 +67,20 @@ using namespace ExtensionSystem;
enum { OptionIndent = 4, DescriptionIndent = 34 }; enum { OptionIndent = 4, DescriptionIndent = 34 };
const char corePluginNameC[] = "Core"; const char corePluginNameC[] = "Core";
const char fixedOptionsC[] = const char fixedOptionsC[]
" [OPTION]... [FILE]...\n" = " [OPTION]... [FILE]...\n"
"Options:\n" "Options:\n"
" -help Display this help\n" " -help Display this help\n"
" -version Display program version\n" " -version Display program version\n"
" -client Attempt to connect to already running first instance\n" " -client Attempt to connect to already running first instance\n"
" -settingspath <path> Override the default path where user settings are stored\n" " -settingspath <path> Override the default path where user settings are stored\n"
" -installsettingspath <path> Override the default path from where user-independent settings are read\n" " -installsettingspath <path> Override the default path from where user-independent "
"settings are read\n"
" -temporarycleansettings, -tcs Use clean settings for debug or testing reasons\n" " -temporarycleansettings, -tcs Use clean settings for debug or testing reasons\n"
" -pid <pid> Attempt to connect to instance given by pid\n" " -pid <pid> Attempt to connect to instance given by pid\n"
" -block Block until editor is closed\n" " -block Block until editor is closed\n"
" -pluginpath <path> Add a custom search path for plugins\n"; " -pluginpath <path> Add a custom search path for plugins\n"
" -language <locale> Set the UI language\n";
const char HELP_OPTION1[] = "-h"; const char HELP_OPTION1[] = "-h";
const char HELP_OPTION2[] = "-help"; const char HELP_OPTION2[] = "-help";
@@ -95,6 +97,7 @@ const char TEMPORARY_CLEAN_SETTINGS2[] = "-tcs";
const char PID_OPTION[] = "-pid"; const char PID_OPTION[] = "-pid";
const char BLOCK_OPTION[] = "-block"; const char BLOCK_OPTION[] = "-block";
const char PLUGINPATH_OPTION[] = "-pluginpath"; const char PLUGINPATH_OPTION[] = "-pluginpath";
const char LANGUAGE_OPTION[] = "-language";
const char USER_LIBRARY_PATH_OPTION[] = "-user-library-path"; // hidden option for qtcreator.sh const char USER_LIBRARY_PATH_OPTION[] = "-user-library-path"; // hidden option for qtcreator.sh
using PluginSpecSet = QVector<PluginSpec *>; using PluginSpecSet = QVector<PluginSpec *>;
@@ -305,6 +308,7 @@ struct Options
QString settingsPath; QString settingsPath;
QString installSettingsPath; QString installSettingsPath;
QStringList customPluginPaths; QStringList customPluginPaths;
QString uiLanguage;
// list of arguments that were handled and not passed to the application or plugin manager // list of arguments that were handled and not passed to the application or plugin manager
QStringList preAppArguments; QStringList preAppArguments;
// list of arguments to be passed to the application or plugin manager // list of arguments to be passed to the application or plugin manager
@@ -336,6 +340,10 @@ Options parseCommandLine(int argc, char *argv[])
++it; ++it;
options.customPluginPaths += QDir::fromNativeSeparators(nextArg); options.customPluginPaths += QDir::fromNativeSeparators(nextArg);
options.preAppArguments << arg << nextArg; options.preAppArguments << arg << nextArg;
} else if (arg == LANGUAGE_OPTION && hasNext) {
++it;
options.uiLanguage = nextArg;
options.preAppArguments << arg << nextArg;
} else if (arg == USER_LIBRARY_PATH_OPTION && hasNext) { } else if (arg == USER_LIBRARY_PATH_OPTION && hasNext) {
++it; ++it;
options.userLibraryPath = nextArg; options.userLibraryPath = nextArg;
@@ -597,6 +605,8 @@ int main(int argc, char **argv)
QString overrideLanguage = settings->value(QLatin1String("General/OverrideLanguage")).toString(); QString overrideLanguage = settings->value(QLatin1String("General/OverrideLanguage")).toString();
if (!overrideLanguage.isEmpty()) if (!overrideLanguage.isEmpty())
uiLanguages.prepend(overrideLanguage); uiLanguages.prepend(overrideLanguage);
if (!options.uiLanguage.isEmpty())
uiLanguages.prepend(options.uiLanguage);
const QString &creatorTrPath = resourcePath() + "/translations"; const QString &creatorTrPath = resourcePath() + "/translations";
for (QString locale : std::as_const(uiLanguages)) { for (QString locale : std::as_const(uiLanguages)) {
locale = QLocale(locale).name(); locale = QLocale(locale).name();

View File

@@ -449,15 +449,13 @@ bool pInfoLessThanImports(const ModelManagerInterface::ProjectInfo &p1,
} }
static QList<Utils::FilePath> generatedQrc(QList<Utils::FilePath> applicationDirectories) static QSet<Utils::FilePath> generatedQrc(
const QList<ModelManagerInterface::ProjectInfo> &projectInfos)
{ {
QList<Utils::FilePath> res; QSet<Utils::FilePath> res;
for (const Utils::FilePath &path : applicationDirectories) { for (const auto &pInfo : projectInfos) {
Utils::FilePath generatedQrcDir = path.pathAppended(".rcc"); for (const auto &generatedQrcFile: pInfo.generatedQrcFiles)
if (generatedQrcDir.isReadableDir()) { res.insert(generatedQrcFile);
for (const Utils::FilePath & qrcPath: generatedQrcDir.dirEntries(FileFilter(QStringList({QStringLiteral(u"*.qrc")}), QDir::Files)))
res.append(qrcPath.canonicalPath());
}
} }
return res; return res;
} }
@@ -484,7 +482,7 @@ void ModelManagerInterface::iterateQrcFiles(
qrcFilePaths = pInfo.activeResourceFiles; qrcFilePaths = pInfo.activeResourceFiles;
else else
qrcFilePaths = pInfo.allResourceFiles; qrcFilePaths = pInfo.allResourceFiles;
for (const Utils::FilePath &p : generatedQrc(pInfo.applicationDirectories)) for (const Utils::FilePath &p : generatedQrc({pInfo}))
qrcFilePaths.append(p); qrcFilePaths.append(p);
for (const Utils::FilePath &qrcFilePath : std::as_const(qrcFilePaths)) { for (const Utils::FilePath &qrcFilePath : std::as_const(qrcFilePaths)) {
if (pathsChecked.contains(qrcFilePath)) if (pathsChecked.contains(qrcFilePath))
@@ -607,7 +605,7 @@ void ModelManagerInterface::updateProjectInfo(const ProjectInfo &pinfo, ProjectE
m_qrcContents = pinfo.resourceFileContents; m_qrcContents = pinfo.resourceFileContents;
for (const Utils::FilePath &newQrc : std::as_const(pinfo.allResourceFiles)) for (const Utils::FilePath &newQrc : std::as_const(pinfo.allResourceFiles))
m_qrcCache.addPath(newQrc.toString(), m_qrcContents.value(newQrc)); m_qrcCache.addPath(newQrc.toString(), m_qrcContents.value(newQrc));
for (const Utils::FilePath &newQrc : generatedQrc(pinfo.applicationDirectories)) for (const Utils::FilePath &newQrc : pinfo.generatedQrcFiles)
m_qrcCache.addPath(newQrc.toString(), m_qrcContents.value(newQrc)); m_qrcCache.addPath(newQrc.toString(), m_qrcContents.value(newQrc));
for (const Utils::FilePath &oldQrc : std::as_const(oldInfo.allResourceFiles)) for (const Utils::FilePath &oldQrc : std::as_const(oldInfo.allResourceFiles))
m_qrcCache.removePath(oldQrc.toString()); m_qrcCache.removePath(oldQrc.toString());
@@ -1312,7 +1310,7 @@ void ModelManagerInterface::updateImportPaths()
allImportPaths.maybeInsert(path, Dialect::Qml); allImportPaths.maybeInsert(path, Dialect::Qml);
findNewQmlApplicationInPath(path, snapshot, this, &newLibraries); findNewQmlApplicationInPath(path, snapshot, this, &newLibraries);
} }
for (const Utils::FilePath &qrcPath : generatedQrc(allApplicationDirectories)) for (const Utils::FilePath &qrcPath : generatedQrc(m_projects.values()))
updateQrcFile(qrcPath); updateQrcFile(qrcPath);
updateSourceFiles(importedFiles, true); updateSourceFiles(importedFiles, true);
@@ -1644,8 +1642,10 @@ ModelManagerInterface::ProjectInfo ModelManagerInterface::defaultProjectInfo() c
} }
ModelManagerInterface::ProjectInfo ModelManagerInterface::defaultProjectInfoForProject( ModelManagerInterface::ProjectInfo ModelManagerInterface::defaultProjectInfoForProject(
ProjectExplorer::Project *) const ProjectExplorer::Project *project, const FilePaths &hiddenRccFolders) const
{ {
Q_UNUSED(project);
Q_UNUSED(hiddenRccFolders);
return ModelManagerInterface::ProjectInfo(); return ModelManagerInterface::ProjectInfo();
} }

View File

@@ -52,6 +52,7 @@ public:
PathsAndLanguages importPaths; PathsAndLanguages importPaths;
QList<Utils::FilePath> activeResourceFiles; QList<Utils::FilePath> activeResourceFiles;
QList<Utils::FilePath> allResourceFiles; QList<Utils::FilePath> allResourceFiles;
QList<Utils::FilePath> generatedQrcFiles;
QHash<Utils::FilePath, QString> resourceFileContents; QHash<Utils::FilePath, QString> resourceFileContents;
QList<Utils::FilePath> applicationDirectories; QList<Utils::FilePath> applicationDirectories;
QHash<QString, QString> moduleMappings; // E.g.: QtQuick.Controls -> MyProject.MyControls QHash<QString, QString> moduleMappings; // E.g.: QtQuick.Controls -> MyProject.MyControls
@@ -167,8 +168,8 @@ public:
void setDefaultVContext(const ViewerContext &vContext); void setDefaultVContext(const ViewerContext &vContext);
virtual ProjectInfo defaultProjectInfo() const; virtual ProjectInfo defaultProjectInfo() const;
virtual ProjectInfo defaultProjectInfoForProject(ProjectExplorer::Project *project) const; virtual ProjectInfo defaultProjectInfoForProject(ProjectExplorer::Project *project,
const Utils::FilePaths &hiddenRccFolders) const;
// Blocks until all parsing threads are done. Use for testing only! // Blocks until all parsing threads are done. Use for testing only!
void test_joinAllThreads(); void test_joinAllThreads();

View File

@@ -10,6 +10,7 @@
#include <QDataStream> #include <QDataStream>
#include <QDebug> #include <QDebug>
#include <QHash> #include <QHash>
#include <QReadWriteLock>
#include <QVariant> #include <QVariant>
namespace Utils { namespace Utils {
@@ -76,22 +77,32 @@ struct IdCache : public QHash<StringHolder, quintptr>
#endif #endif
}; };
static QHash<quintptr, StringHolder> stringFromId; static QHash<quintptr, StringHolder> stringFromId;
static IdCache idFromString; static IdCache idFromString;
static QReadWriteLock s_cacheMutex;
static quintptr theId(const char *str, int n = 0) static quintptr theId(const char *str, int n = 0)
{ {
static quintptr firstUnusedId = 10 * 1000 * 1000;
QTC_ASSERT(str && *str, return 0); QTC_ASSERT(str && *str, return 0);
StringHolder sh(str, n); StringHolder sh(str, n);
int res = idFromString.value(sh, 0); int res = 0;
{
QReadLocker lock(&s_cacheMutex); // Try quick read locker first
res = idFromString.value(sh, 0);
}
if (res == 0) { if (res == 0) {
QWriteLocker lock(&s_cacheMutex);
res = idFromString.value(sh, 0); // Some other thread could have added it to the cache
// in meantime, after read lock was released and before
// write lock was acquired. Re-read it again.
if (res == 0) {
static quintptr firstUnusedId = 10 * 1000 * 1000;
res = firstUnusedId++; res = firstUnusedId++;
sh.str = qstrdup(sh.str); sh.str = qstrdup(sh.str);
idFromString[sh] = res; idFromString[sh] = res;
stringFromId[res] = sh; stringFromId[res] = sh;
} }
}
return res; return res;
} }
@@ -127,6 +138,7 @@ Id::Id(const char *name)
QByteArray Id::name() const QByteArray Id::name() const
{ {
QReadLocker lock(&s_cacheMutex);
return stringFromId.value(m_id).str; return stringFromId.value(m_id).str;
} }
@@ -142,6 +154,7 @@ QByteArray Id::name() const
QString Id::toString() const QString Id::toString() const
{ {
QReadLocker lock(&s_cacheMutex);
return QString::fromUtf8(stringFromId.value(m_id).str); return QString::fromUtf8(stringFromId.value(m_id).str);
} }
@@ -188,6 +201,7 @@ Id Id::fromName(const QByteArray &name)
QVariant Id::toSetting() const QVariant Id::toSetting() const
{ {
QReadLocker lock(&s_cacheMutex);
return QVariant(QString::fromUtf8(stringFromId.value(m_id).str)); return QVariant(QString::fromUtf8(stringFromId.value(m_id).str));
} }
@@ -278,6 +292,7 @@ Id Id::withPrefix(const char *prefix) const
bool Id::operator==(const char *name) const bool Id::operator==(const char *name) const
{ {
QReadLocker lock(&s_cacheMutex);
const char *string = stringFromId.value(m_id).str; const char *string = stringFromId.value(m_id).str;
if (string && name) if (string && name)
return strcmp(string, name) == 0; return strcmp(string, name) == 0;
@@ -288,6 +303,7 @@ bool Id::operator==(const char *name) const
// For debugging purposes // For debugging purposes
QTCREATOR_UTILS_EXPORT const char *nameForId(quintptr id) QTCREATOR_UTILS_EXPORT const char *nameForId(quintptr id)
{ {
QReadLocker lock(&s_cacheMutex);
return stringFromId.value(id).str; return stringFromId.value(id).str;
} }

View File

@@ -28,9 +28,12 @@ MimeType mimeTypeForFile(const QString &fileName, MimeMatchMode mode)
MimeType mimeTypeForFile(const FilePath &filePath, MimeMatchMode mode) MimeType mimeTypeForFile(const FilePath &filePath, MimeMatchMode mode)
{ {
MimeDatabase mdb; MimeDatabase mdb;
if (filePath.needsDevice()) if (filePath.needsDevice() && mode != MimeMatchMode::MatchDefaultAndRemote)
return mdb.mimeTypeForUrl(filePath.toUrl()); return mdb.mimeTypeForUrl(filePath.toUrl());
return mdb.mimeTypeForFile(filePath.toString(), MimeDatabase::MatchMode(mode)); if (mode == MimeMatchMode::MatchDefaultAndRemote) {
mode = MimeMatchMode::MatchDefault;
}
return mdb.mimeTypeForFile(filePath.toFSPathString(), MimeDatabase::MatchMode(mode));
} }
QList<MimeType> mimeTypesForFileName(const QString &fileName) QList<MimeType> mimeTypesForFileName(const QString &fileName)

View File

@@ -15,7 +15,12 @@ class FilePath;
// Wrapped QMimeDataBase functions // Wrapped QMimeDataBase functions
QTCREATOR_UTILS_EXPORT MimeType mimeTypeForName(const QString &nameOrAlias); QTCREATOR_UTILS_EXPORT MimeType mimeTypeForName(const QString &nameOrAlias);
enum class MimeMatchMode { MatchDefault = 0x0, MatchExtension = 0x1, MatchContent = 0x2 }; enum class MimeMatchMode {
MatchDefault = 0x0,
MatchExtension = 0x1,
MatchContent = 0x2,
MatchDefaultAndRemote = 0x3
};
QTCREATOR_UTILS_EXPORT MimeType mimeTypeForFile(const QString &fileName, QTCREATOR_UTILS_EXPORT MimeType mimeTypeForFile(const QString &fileName,
MimeMatchMode mode = MimeMatchMode::MatchDefault); MimeMatchMode mode = MimeMatchMode::MatchDefault);

View File

@@ -488,7 +488,7 @@ void AndroidDeployQtStep::gatherFilesToPull()
void AndroidDeployQtStep::doRun() void AndroidDeployQtStep::doRun()
{ {
runInThread([this] { return runImpl(); }); m_synchronizer.addFuture(runInThread([this] { return runImpl(); }));
} }
void AndroidDeployQtStep::runCommand(const CommandLine &command) void AndroidDeployQtStep::runCommand(const CommandLine &command)

View File

@@ -12,6 +12,7 @@
#include <utils/commandline.h> #include <utils/commandline.h>
#include <utils/environment.h> #include <utils/environment.h>
#include <utils/futuresynchronizer.h>
namespace Utils { class QtcProcess; } namespace Utils { class QtcProcess; }
@@ -91,6 +92,8 @@ private:
Utils::FilePath m_workingDirectory; Utils::FilePath m_workingDirectory;
Utils::Environment m_environment; Utils::Environment m_environment;
AndroidDeviceInfo m_deviceInfo; AndroidDeviceInfo m_deviceInfo;
Utils::FutureSynchronizer m_synchronizer;
}; };
} }

View File

@@ -512,7 +512,7 @@ void AndroidDeviceManager::setupWifiForDevice(const IDevice::Ptr &device, QWidge
return; return;
} }
QTimer::singleShot(2000, parent, [adbSelector, &parent]() { QTimer::singleShot(2000, parent, [adbSelector, parent]() {
// Get device IP address // Get device IP address
QStringList args = adbSelector; QStringList args = adbSelector;
args.append({"shell", "ip", "route"}); args.append({"shell", "ip", "route"});

View File

@@ -18,6 +18,9 @@ namespace CatchXml {
const char TestCaseElement[] = "TestCase"; const char TestCaseElement[] = "TestCase";
const char SectionElement[] = "Section"; const char SectionElement[] = "Section";
const char ExceptionElement[] = "Exception"; const char ExceptionElement[] = "Exception";
const char InfoElement[] = "Info";
const char WarningElement[] = "Warning";
const char FailureElement[] = "Failure";
const char ExpressionElement[] = "Expression"; const char ExpressionElement[] = "Expression";
const char ExpandedElement[] = "Expanded"; const char ExpandedElement[] = "Expanded";
const char BenchmarkResults[] = "BenchmarkResults"; const char BenchmarkResults[] = "BenchmarkResults";
@@ -102,6 +105,13 @@ void CatchOutputReader::processOutputLine(const QByteArray &outputLineWithNewLin
m_currentResult = m_shouldFail ? ResultType::UnexpectedPass : ResultType::Pass; m_currentResult = m_shouldFail ? ResultType::UnexpectedPass : ResultType::Pass;
else else
m_currentResult = m_mayFail || m_shouldFail ? ResultType::ExpectedFail : ResultType::Fail; m_currentResult = m_mayFail || m_shouldFail ? ResultType::ExpectedFail : ResultType::Fail;
} else if (m_currentTagName == CatchXml::WarningElement) {
m_currentResult = ResultType::MessageWarn;
} else if (m_currentTagName == CatchXml::InfoElement) {
m_currentResult = ResultType::MessageInfo;
} else if (m_currentTagName == CatchXml::FailureElement) {
m_currentResult = ResultType::Fail;
recordTestInformation(m_xmlReader.attributes());
} else if (m_currentTagName == CatchXml::BenchmarkResults) { } else if (m_currentTagName == CatchXml::BenchmarkResults) {
recordBenchmarkInformation(m_xmlReader.attributes()); recordBenchmarkInformation(m_xmlReader.attributes());
m_currentResult = ResultType::Benchmark; m_currentResult = ResultType::Benchmark;
@@ -121,7 +131,10 @@ void CatchOutputReader::processOutputLine(const QByteArray &outputLineWithNewLin
const auto text = m_xmlReader.text(); const auto text = m_xmlReader.text();
if (m_currentTagName == CatchXml::ExpandedElement) { if (m_currentTagName == CatchXml::ExpandedElement) {
m_currentExpression.append(text); m_currentExpression.append(text);
} else if (m_currentTagName == CatchXml::ExceptionElement) { } else if (m_currentTagName == CatchXml::ExceptionElement
|| m_currentTagName == CatchXml::InfoElement
|| m_currentTagName == CatchXml::WarningElement
|| m_currentTagName == CatchXml::FailureElement) {
m_currentExpression.append('\n').append(text.trimmed()); m_currentExpression.append('\n').append(text.trimmed());
} }
break; break;
@@ -138,10 +151,15 @@ void CatchOutputReader::processOutputLine(const QByteArray &outputLineWithNewLin
} else if (currentTag == QLatin1String(CatchXml::GroupElement)) { } else if (currentTag == QLatin1String(CatchXml::GroupElement)) {
testOutputNodeFinished(GroupNode); testOutputNodeFinished(GroupNode);
} else if (currentTag == QLatin1String(CatchXml::ExpressionElement) } else if (currentTag == QLatin1String(CatchXml::ExpressionElement)
|| currentTag == QLatin1String(CatchXml::FailureElement)
|| currentTag == QLatin1String(CatchXml::BenchmarkResults)) { || currentTag == QLatin1String(CatchXml::BenchmarkResults)) {
sendResult(m_currentResult); sendResult(m_currentResult);
m_currentExpression.clear(); m_currentExpression.clear();
m_testCaseInfo.pop(); m_testCaseInfo.pop();
} else if (currentTag == QLatin1String(CatchXml::WarningElement)
|| currentTag == QLatin1String(CatchXml::InfoElement)) {
sendResult(m_currentResult);
m_currentExpression.clear();
} }
break; break;
} }
@@ -255,6 +273,8 @@ void CatchOutputReader::sendResult(const ResultType result)
.arg(catchResult->description())); .arg(catchResult->description()));
} else if (result == ResultType::Benchmark || result == ResultType::MessageFatal) { } else if (result == ResultType::Benchmark || result == ResultType::MessageFatal) {
catchResult->setDescription(m_currentExpression); catchResult->setDescription(m_currentExpression);
} else if (result == ResultType::MessageWarn || result == ResultType::MessageInfo) {
catchResult->setDescription(m_currentExpression.trimmed());
} }
reportResult(catchResult); reportResult(catchResult);

View File

@@ -417,6 +417,7 @@ IAssistProposal *CustomAssistProcessor::perform(const AssistInterface *interface
break; break;
} }
} }
delete interface;
GenericProposalModelPtr model(new GenericProposalModel); GenericProposalModelPtr model(new GenericProposalModel);
model->loadContent(completions); model->loadContent(completions);
const auto proposal = new GenericProposal(m_position, model); const auto proposal = new GenericProposal(m_position, model);

View File

@@ -12,6 +12,7 @@
#include <languageclient/languageclientsymbolsupport.h> #include <languageclient/languageclientsymbolsupport.h>
#include <languageserverprotocol/lsptypes.h> #include <languageserverprotocol/lsptypes.h>
#include <languageserverprotocol/jsonrpcmessages.h> #include <languageserverprotocol/jsonrpcmessages.h>
#include <texteditor/codeassist/assistinterface.h>
#include <texteditor/codeassist/iassistprocessor.h> #include <texteditor/codeassist/iassistprocessor.h>
#include <texteditor/codeassist/iassistprovider.h> #include <texteditor/codeassist/iassistprovider.h>
#include <texteditor/textdocument.h> #include <texteditor/textdocument.h>
@@ -41,8 +42,9 @@ public:
void resetData(bool resetFollowSymbolData); void resetData(bool resetFollowSymbolData);
private: private:
IAssistProposal *perform(const AssistInterface *) override IAssistProposal *perform(const AssistInterface *interface) override
{ {
delete interface;
return nullptr; return nullptr;
} }

View File

@@ -164,9 +164,15 @@ void doSemanticHighlighting(
const Position endPos = startPos.withOffset(token.length, &doc); const Position endPos = startPos.withOffset(token.length, &doc);
return Range(startPos, endPos); return Range(startPos, endPos);
}; };
const auto isOutputParameter = [&ast, &tokenRange](const ExpandedSemanticToken &token) { const int clangdMajorVersion = clangdVersion.majorVersion();
const auto isOutputParameter = [&ast, &tokenRange, clangdMajorVersion]
(const ExpandedSemanticToken &token) {
if (token.modifiers.contains(QLatin1String("usedAsMutableReference"))) if (token.modifiers.contains(QLatin1String("usedAsMutableReference")))
return true; return true;
if (token.modifiers.contains(QLatin1String("usedAsMutablePointer")))
return true;
if (clangdMajorVersion >= 16)
return false;
if (token.type != "variable" && token.type != "property" && token.type != "parameter") if (token.type != "variable" && token.type != "property" && token.type != "parameter")
return false; return false;
const Range range = tokenRange(token); const Range range = tokenRange(token);
@@ -260,7 +266,7 @@ void doSemanticHighlighting(
}; };
const std::function<HighlightingResult(const ExpandedSemanticToken &)> toResult const std::function<HighlightingResult(const ExpandedSemanticToken &)> toResult
= [&ast, &isOutputParameter, &tokenRange, ver = clangdVersion.majorVersion()] = [&ast, &isOutputParameter, &tokenRange, clangdMajorVersion]
(const ExpandedSemanticToken &token) { (const ExpandedSemanticToken &token) {
TextStyles styles; TextStyles styles;
if (token.type == "variable") { if (token.type == "variable") {
@@ -277,7 +283,7 @@ void doSemanticHighlighting(
? C_VIRTUAL_METHOD : C_FUNCTION; ? C_VIRTUAL_METHOD : C_FUNCTION;
if (token.modifiers.contains("definition")) { if (token.modifiers.contains("definition")) {
styles.mixinStyles.push_back(C_FUNCTION_DEFINITION); styles.mixinStyles.push_back(C_FUNCTION_DEFINITION);
} else if (ver < 16 && ast.isValid()) { } else if (clangdMajorVersion < 16 && ast.isValid()) {
const ClangdAstPath path = getAstPath(ast, tokenRange(token)); const ClangdAstPath path = getAstPath(ast, tokenRange(token));
if (path.length() > 1) { if (path.length() > 1) {
const ClangdAstNode declNode = path.at(path.length() - 2); const ClangdAstNode declNode = path.at(path.length() - 2);
@@ -291,7 +297,7 @@ void doSemanticHighlighting(
styles.mainStyle = C_TYPE; styles.mainStyle = C_TYPE;
if (token.modifiers.contains("constructorOrDestructor")) { if (token.modifiers.contains("constructorOrDestructor")) {
styles.mainStyle = C_FUNCTION; styles.mainStyle = C_FUNCTION;
} else if (ver < 16 && ast.isValid()) { } else if (clangdMajorVersion < 16 && ast.isValid()) {
const ClangdAstPath path = getAstPath(ast, tokenRange(token)); const ClangdAstPath path = getAstPath(ast, tokenRange(token));
if (!path.isEmpty()) { if (!path.isEmpty()) {
if (path.last().kind() == "CXXConstructor") { if (path.last().kind() == "CXXConstructor") {

View File

@@ -13,6 +13,7 @@
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
#include <QApplication> #include <QApplication>
#include <QMetaObject>
#include <QTextCursor> #include <QTextCursor>
#include <optional> #include <optional>
@@ -68,6 +69,7 @@ ClangdSwitchDeclDef::ClangdSwitchDeclDef(ClangdClient *client, TextDocument *doc
[this](const DocumentUri &uri, const DocumentSymbolsResult &symbols) { [this](const DocumentUri &uri, const DocumentSymbolsResult &symbols) {
if (uri != d->uri) if (uri != d->uri)
return; return;
d->client->documentSymbolCache()->disconnect(this);
d->docSymbols = symbols; d->docSymbols = symbols;
if (d->ast) if (d->ast)
d->handleDeclDefSwitchReplies(); d->handleDeclDefSwitchReplies();
@@ -108,7 +110,7 @@ void ClangdSwitchDeclDef::emitDone()
return; return;
d->done = true; d->done = true;
emit done(); QMetaObject::invokeMethod(this, &ClangdSwitchDeclDef::done, Qt::QueuedConnection);
} }
std::optional<ClangdAstNode> ClangdSwitchDeclDef::Private::getFunctionNode() const std::optional<ClangdAstNode> ClangdSwitchDeclDef::Private::getFunctionNode() const

View File

@@ -1012,12 +1012,6 @@ void ClangdTestHighlighting::test_data()
<< QList<int>{C_LOCAL} << 0; << QList<int>{C_LOCAL} << 0;
QTest::newRow("const pointer argument") << 491 << 26 << 491 << 27 QTest::newRow("const pointer argument") << 491 << 26 << 491 << 27
<< QList<int>{C_LOCAL, C_OUTPUT_ARGUMENT} << 0; << QList<int>{C_LOCAL, C_OUTPUT_ARGUMENT} << 0;
QTest::newRow("non-const reference via member function call as output argument (object)")
<< 580 << 29 << 580 << 30
<< QList<int>{C_LOCAL, C_OUTPUT_ARGUMENT} << 0;
QTest::newRow("non-const reference via member function call as output argument (function)")
<< 580 << 31 << 580 << 37
<< QList<int>{C_FUNCTION, C_OUTPUT_ARGUMENT} << 0;
QTest::newRow("value argument") << 501 << 57 << 501 << 58 QTest::newRow("value argument") << 501 << 57 << 501 << 58
<< QList<int>{C_LOCAL} << 0; << QList<int>{C_LOCAL} << 0;
QTest::newRow("non-const ref argument as second arg") << 501 << 61 << 501 << 62 QTest::newRow("non-const ref argument as second arg") << 501 << 61 << 501 << 62
@@ -1026,8 +1020,6 @@ void ClangdTestHighlighting::test_data()
<< QList<int>{C_PARAMETER, C_OUTPUT_ARGUMENT} << 0; << QList<int>{C_PARAMETER, C_OUTPUT_ARGUMENT} << 0;
QTest::newRow("non-const pointer argument expression") << 513 << 30 << 513 << 31 QTest::newRow("non-const pointer argument expression") << 513 << 30 << 513 << 31
<< QList<int>{C_LOCAL, C_OUTPUT_ARGUMENT} << 0; << QList<int>{C_LOCAL, C_OUTPUT_ARGUMENT} << 0;
QTest::newRow("non-const ref argument from qualified member (object)") << 525 << 31 << 525 << 39
<< QList<int>{C_LOCAL, C_OUTPUT_ARGUMENT} << 0;
QTest::newRow("non-const ref argument from qualified member (member)") << 525 << 40 << 525 << 46 QTest::newRow("non-const ref argument from qualified member (member)") << 525 << 40 << 525 << 46
<< QList<int>{C_FIELD, C_OUTPUT_ARGUMENT} << 0; << QList<int>{C_FIELD, C_OUTPUT_ARGUMENT} << 0;
QTest::newRow("non-const ref argument to constructor") << 540 << 47 << 540 << 55 QTest::newRow("non-const ref argument to constructor") << 540 << 47 << 540 << 55
@@ -1394,14 +1386,6 @@ void ClangdTestHighlighting::test()
actualStyles << s; actualStyles << s;
} }
QEXPECT_FAIL("non-const reference via member function call as output argument (object)",
"See below", Continue);
QEXPECT_FAIL("non-const reference via member function call as output argument (function)",
"Without punctuation and comment tokens from clangd, it's not possible "
"to highlight entire expressions. But do we really want this? What about nested "
"calls where the inner arguments are const?",
Continue);
QCOMPARE(actualStyles, expectedStyles); QCOMPARE(actualStyles, expectedStyles);
QCOMPARE(result.kind, expectedKind); QCOMPARE(result.kind, expectedKind);
} }

View File

@@ -39,7 +39,11 @@ void adjustFormatStyleForLineBreak(clang::format::FormatStyle &style,
// This is a separate pass, don't do it unless it's the full formatting. // This is a separate pass, don't do it unless it's the full formatting.
style.FixNamespaceComments = false; style.FixNamespaceComments = false;
#if LLVM_VERSION_MAJOR >= 16
style.AlignTrailingComments = {clang::format::FormatStyle::TCAS_Never, 0};
#else
style.AlignTrailingComments = false; style.AlignTrailingComments = false;
#endif
if (replacementsToKeep == ReplacementsToKeep::IndentAndBefore) if (replacementsToKeep == ReplacementsToKeep::IndentAndBefore)
return; return;

View File

@@ -49,7 +49,11 @@ clang::format::FormatStyle qtcStyle()
#else #else
style.AlignOperands = true; style.AlignOperands = true;
#endif #endif
#if LLVM_VERSION_MAJOR >= 16
style.AlignTrailingComments = {FormatStyle::TCAS_Always, 0};
#else
style.AlignTrailingComments = true; style.AlignTrailingComments = true;
#endif
style.AllowAllParametersOfDeclarationOnNextLine = true; style.AllowAllParametersOfDeclarationOnNextLine = true;
#if LLVM_VERSION_MAJOR >= 10 #if LLVM_VERSION_MAJOR >= 10
style.AllowShortBlocksOnASingleLine = FormatStyle::SBS_Never; style.AllowShortBlocksOnASingleLine = FormatStyle::SBS_Never;

View File

@@ -88,6 +88,7 @@ const char DEVELOPMENT_TEAM_FLAG[] = "Ios:DevelopmentTeam:Flag";
const char PROVISIONING_PROFILE_FLAG[] = "Ios:ProvisioningProfile:Flag"; const char PROVISIONING_PROFILE_FLAG[] = "Ios:ProvisioningProfile:Flag";
const char CMAKE_OSX_ARCHITECTURES_FLAG[] = "CMAKE_OSX_ARCHITECTURES:DefaultFlag"; const char CMAKE_OSX_ARCHITECTURES_FLAG[] = "CMAKE_OSX_ARCHITECTURES:DefaultFlag";
const char QT_QML_DEBUG_FLAG[] = "Qt:QML_DEBUG_FLAG"; const char QT_QML_DEBUG_FLAG[] = "Qt:QML_DEBUG_FLAG";
const char QT_QML_DEBUG_PARAM[] = "-DQT_QML_DEBUG";
const char CMAKE_QT6_TOOLCHAIN_FILE_ARG[] const char CMAKE_QT6_TOOLCHAIN_FILE_ARG[]
= "-DCMAKE_TOOLCHAIN_FILE:FILEPATH=%{Qt:QT_INSTALL_PREFIX}/lib/cmake/Qt6/qt.toolchain.cmake"; = "-DCMAKE_TOOLCHAIN_FILE:FILEPATH=%{Qt:QT_INSTALL_PREFIX}/lib/cmake/Qt6/qt.toolchain.cmake";
const char CMAKE_BUILD_TYPE[] = "CMake.Build.Type"; const char CMAKE_BUILD_TYPE[] = "CMake.Build.Type";
@@ -876,7 +877,7 @@ CMakeConfig CMakeBuildSettingsWidget::getQmlDebugCxxFlags()
"CMAKE_CXX_FLAGS_RELWITHDEBINFO", "CMAKE_CXX_FLAGS_RELWITHDEBINFO",
"CMAKE_CXX_FLAGS_INIT"}; "CMAKE_CXX_FLAGS_INIT"};
const QByteArrayList cxxFlags{"CMAKE_CXX_FLAGS_INIT", "CMAKE_CXX_FLAGS"}; const QByteArrayList cxxFlags{"CMAKE_CXX_FLAGS_INIT", "CMAKE_CXX_FLAGS"};
const QByteArray qmlDebug("-DQT_QML_DEBUG"); const QByteArray qmlDebug(QT_QML_DEBUG_PARAM);
CMakeConfig changedConfig; CMakeConfig changedConfig;
@@ -1446,8 +1447,7 @@ CMakeBuildConfiguration::CMakeBuildConfiguration(Target *target, Id id)
[this] { [this] {
if (aspect<QtSupport::QmlDebuggingAspect>()->value() if (aspect<QtSupport::QmlDebuggingAspect>()->value()
== TriState::Enabled) { == TriState::Enabled) {
return QLatin1String( return QLatin1String(QT_QML_DEBUG_PARAM);
"-DQT_QML_DEBUG");
} }
return QLatin1String(); return QLatin1String();
}); });
@@ -1665,7 +1665,7 @@ bool CMakeBuildConfiguration::hasQmlDebugging(const CMakeConfig &config)
// such that in doubt we leave the QML Debugging setting at "Leave at default" // such that in doubt we leave the QML Debugging setting at "Leave at default"
const QString cxxFlagsInit = config.stringValueOf("CMAKE_CXX_FLAGS_INIT"); const QString cxxFlagsInit = config.stringValueOf("CMAKE_CXX_FLAGS_INIT");
const QString cxxFlags = config.stringValueOf("CMAKE_CXX_FLAGS"); const QString cxxFlags = config.stringValueOf("CMAKE_CXX_FLAGS");
return cxxFlagsInit.contains("-DQT_QML_DEBUG") && cxxFlags.contains("-DQT_QML_DEBUG"); return cxxFlagsInit.contains(QT_QML_DEBUG_PARAM) && cxxFlags.contains(QT_QML_DEBUG_PARAM);
} }
void CMakeBuildConfiguration::buildTarget(const QString &buildTarget) void CMakeBuildConfiguration::buildTarget(const QString &buildTarget)

View File

@@ -1186,8 +1186,8 @@ void CMakeBuildSystem::updateQmlJSCodeModel(const QStringList &extraHeaderPaths,
return; return;
Project *p = project(); Project *p = project();
QmlJS::ModelManagerInterface::ProjectInfo projectInfo = modelManager QmlJS::ModelManagerInterface::ProjectInfo projectInfo
->defaultProjectInfoForProject(p); = modelManager->defaultProjectInfoForProject(p, p->files(Project::HiddenRccFolders));
projectInfo.importPaths.clear(); projectInfo.importPaths.clear();

View File

@@ -739,7 +739,8 @@ bool EditorManagerPrivate::skipOpeningBigTextFile(const FilePath &filePath)
if (!filePath.exists()) if (!filePath.exists())
return false; return false;
const MimeType mimeType = Utils::mimeTypeForFile(filePath); const MimeType mimeType = Utils::mimeTypeForFile(filePath,
MimeMatchMode::MatchDefaultAndRemote);
if (!mimeType.inherits("text/plain")) if (!mimeType.inherits("text/plain"))
return false; return false;

View File

@@ -166,7 +166,8 @@ const EditorTypeList EditorType::defaultEditorTypes(const MimeType &mimeType)
const EditorTypeList EditorType::preferredEditorTypes(const FilePath &filePath) const EditorTypeList EditorType::preferredEditorTypes(const FilePath &filePath)
{ {
// default factories by mime type // default factories by mime type
const Utils::MimeType mimeType = Utils::mimeTypeForFile(filePath); const Utils::MimeType mimeType = Utils::mimeTypeForFile(filePath,
MimeMatchMode::MatchDefaultAndRemote);
EditorTypeList factories = defaultEditorTypes(mimeType); EditorTypeList factories = defaultEditorTypes(mimeType);
// user preferred factory to front // user preferred factory to front
EditorType *userPreferred = Internal::userPreferredEditorTypes().value(mimeType); EditorType *userPreferred = Internal::userPreferredEditorTypes().value(mimeType);

View File

@@ -175,7 +175,9 @@ QList<IWizardFactory*> IWizardFactory::allWizardFactories()
QHash<Id, IWizardFactory *> sanityCheck; QHash<Id, IWizardFactory *> sanityCheck;
for (const FactoryCreator &fc : std::as_const(s_factoryCreators)) { for (const FactoryCreator &fc : std::as_const(s_factoryCreators)) {
IWizardFactory *newFactory = fc(); IWizardFactory *newFactory = fc();
QTC_ASSERT(newFactory, continue); // skip factories referencing wizard page generators provided by plugins not loaded
if (!newFactory)
continue;
IWizardFactory *existingFactory = sanityCheck.value(newFactory->id()); IWizardFactory *existingFactory = sanityCheck.value(newFactory->id());
QTC_ASSERT(existingFactory != newFactory, continue); QTC_ASSERT(existingFactory != newFactory, continue);

View File

@@ -949,7 +949,8 @@ void MainWindow::openFile()
static IDocumentFactory *findDocumentFactory(const QList<IDocumentFactory*> &fileFactories, static IDocumentFactory *findDocumentFactory(const QList<IDocumentFactory*> &fileFactories,
const FilePath &filePath) const FilePath &filePath)
{ {
const QString typeName = Utils::mimeTypeForFile(filePath).name(); const QString typeName = Utils::mimeTypeForFile(filePath, MimeMatchMode::MatchDefaultAndRemote)
.name();
return Utils::findOrDefault(fileFactories, [typeName](IDocumentFactory *f) { return Utils::findOrDefault(fileFactories, [typeName](IDocumentFactory *f) {
return f->mimeTypes().contains(typeName); return f->mimeTypes().contains(typeName);
}); });

View File

@@ -112,7 +112,7 @@ void GdbMi::parseResultOrValue(DebuggerOutputParser &parser)
} }
// Reads one \ooo entity. // Reads one \ooo entity.
static bool parseOctalEscapedHelper(DebuggerOutputParser &parser, QByteArray &buffer) static bool parseOctalEscapedHelper(DebuggerOutputParser &parser, QString &buffer)
{ {
if (parser.remainingChars() < 4) if (parser.remainingChars() < 4)
return false; return false;
@@ -130,7 +130,7 @@ static bool parseOctalEscapedHelper(DebuggerOutputParser &parser, QByteArray &bu
return true; return true;
} }
static bool parseHexEscapedHelper(DebuggerOutputParser &parser, QByteArray &buffer) static bool parseHexEscapedHelper(DebuggerOutputParser &parser, QString &buffer)
{ {
if (parser.remainingChars() < 4) if (parser.remainingChars() < 4)
return false; return false;
@@ -178,15 +178,16 @@ static void parseSimpleEscape(DebuggerOutputParser &parser, QString &result)
// *or* one escaped char, *or* one unescaped char. // *or* one escaped char, *or* one unescaped char.
static void parseCharOrEscape(DebuggerOutputParser &parser, QString &result) static void parseCharOrEscape(DebuggerOutputParser &parser, QString &result)
{ {
QByteArray buffer; const int oldSize = result.size();
while (parseOctalEscapedHelper(parser, buffer)) while (parseOctalEscapedHelper(parser, result))
; ;
while (parseHexEscapedHelper(parser, buffer)) while (parseHexEscapedHelper(parser, result))
; ;
if (!buffer.isEmpty()) { if (result.size() != oldSize)
result.append(QString::fromUtf8(buffer)); return;
} else if (parser.isCurrent('\\')) {
if (parser.isCurrent('\\')) {
parser.advance(); parser.advance();
parseSimpleEscape(parser, result); parseSimpleEscape(parser, result);
} else { } else {
@@ -254,7 +255,6 @@ void GdbMi::parseTuple_helper(DebuggerOutputParser &parser)
{ {
parser.skipCommas(); parser.skipCommas();
//qDebug() << "parseTuple_helper: " << parser.buffer(); //qDebug() << "parseTuple_helper: " << parser.buffer();
QString buf = parser.buffer();
m_type = Tuple; m_type = Tuple;
while (!parser.isAtEnd()) { while (!parser.isAtEnd()) {
if (parser.isCurrent('}')) { if (parser.isCurrent('}')) {

View File

@@ -16,6 +16,7 @@
#include <QGuiApplication> #include <QGuiApplication>
#include <QScrollBar> #include <QScrollBar>
#include <QTimer> #include <QTimer>
#include <QToolTip>
#include <QVBoxLayout> #include <QVBoxLayout>
#include <QWheelEvent> #include <QWheelEvent>
@@ -100,6 +101,11 @@ LiteHtmlHelpViewer::LiteHtmlHelpViewer(QWidget *parent)
&QLiteHtmlWidget::contextMenuRequested, &QLiteHtmlWidget::contextMenuRequested,
this, this,
&LiteHtmlHelpViewer::showContextMenu); &LiteHtmlHelpViewer::showContextMenu);
connect(m_viewer, &QLiteHtmlWidget::linkHighlighted, this, [this](const QUrl &url) {
m_highlightedLink = url;
if (!url.isValid())
QToolTip::hideText();
});
auto layout = new QVBoxLayout; auto layout = new QVBoxLayout;
setLayout(layout); setLayout(layout);
layout->setContentsMargins(0, 0, 0, 0); layout->setContentsMargins(0, 0, 0, 0);
@@ -284,6 +290,12 @@ bool LiteHtmlHelpViewer::eventFilter(QObject *src, QEvent *e)
goForward(1); goForward(1);
return true; return true;
} }
} else if (e->type() == QEvent::ToolTip) {
auto he = static_cast<QHelpEvent *>(e);
if (m_highlightedLink.isValid())
QToolTip::showText(he->globalPos(),
m_highlightedLink.toDisplayString(),
m_viewer->viewport());
} }
return HelpViewer::eventFilter(src, e); return HelpViewer::eventFilter(src, e);
} }

View File

@@ -4,11 +4,11 @@
#pragma once #pragma once
#include "helpviewer.h" #include "helpviewer.h"
#include "openpagesmanager.h"
#include <qlitehtmlwidget.h> #include <qlitehtmlwidget.h>
#include <QTextBrowser> #include <QTextBrowser>
#include <QUrl>
#include <optional> #include <optional>
@@ -68,6 +68,7 @@ private:
QLiteHtmlWidget *m_viewer; QLiteHtmlWidget *m_viewer;
std::vector<HistoryItem> m_backItems; std::vector<HistoryItem> m_backItems;
std::vector<HistoryItem> m_forwardItems; std::vector<HistoryItem> m_forwardItems;
QUrl m_highlightedLink;
}; };
} // namespace Internal } // namespace Internal

View File

@@ -293,7 +293,8 @@ LanguageClientCompletionAssistProcessor::~LanguageClientCompletionAssistProcesso
QTextDocument *LanguageClientCompletionAssistProcessor::document() const QTextDocument *LanguageClientCompletionAssistProcessor::document() const
{ {
return m_document; QTC_ASSERT(m_assistInterface, return nullptr);
return m_assistInterface->textDocument();
} }
QList<AssistProposalItemInterface *> LanguageClientCompletionAssistProcessor::generateCompletionItems( QList<AssistProposalItemInterface *> LanguageClientCompletionAssistProcessor::generateCompletionItems(
@@ -315,6 +316,7 @@ static QString assistReasonString(AssistReason reason)
IAssistProposal *LanguageClientCompletionAssistProcessor::perform(const AssistInterface *interface) IAssistProposal *LanguageClientCompletionAssistProcessor::perform(const AssistInterface *interface)
{ {
m_assistInterface.reset(interface);
QTC_ASSERT(m_client, return nullptr); QTC_ASSERT(m_client, return nullptr);
m_pos = interface->position(); m_pos = interface->position();
m_basePos = m_pos; m_basePos = m_pos;
@@ -366,7 +368,6 @@ IAssistProposal *LanguageClientCompletionAssistProcessor::perform(const AssistIn
m_client->sendMessage(completionRequest); m_client->sendMessage(completionRequest);
m_client->addAssistProcessor(this); m_client->addAssistProcessor(this);
m_currentRequest = completionRequest.id(); m_currentRequest = completionRequest.id();
m_document = interface->textDocument();
m_filePath = interface->filePath(); m_filePath = interface->filePath();
qCDebug(LOGLSPCOMPLETION) << QTime::currentTime() qCDebug(LOGLSPCOMPLETION) << QTime::currentTime()
<< " : request completions at " << m_pos << " : request completions at " << m_pos
@@ -425,7 +426,7 @@ void LanguageClientCompletionAssistProcessor::handleCompletionResponse(
model->loadContent(proposalItems); model->loadContent(proposalItems);
LanguageClientCompletionProposal *proposal = new LanguageClientCompletionProposal(m_basePos, LanguageClientCompletionProposal *proposal = new LanguageClientCompletionProposal(m_basePos,
model); model);
proposal->m_document = m_document; proposal->m_document = m_assistInterface->textDocument();
proposal->m_pos = m_pos; proposal->m_pos = m_pos;
proposal->setSupportsPrefix(false); proposal->setSupportsPrefix(false);
setAsyncProposalAvailable(proposal); setAsyncProposalAvailable(proposal);

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