Commit Graph

88532 Commits

Author SHA1 Message Date
Alessandro Portale
bbfb7542a7 ExtensionManager: Read more fields from service response
This adds reading of "download_count", "id" and "is_internal".

Change-Id: I45382d7c70bbc5f44f9391bf3a87ee354d1809e4
Reviewed-by: hjk <hjk@qt.io>
2024-06-05 14:30:07 +00:00
Alessandro Portale
0650fe14e5 Utils: Update Figma text tokens
This adds UiElementLabelMedium and UiElementLabelSmall.

Change-Id: I592f2bdf7a4d0a98e38ea69c33cf1b27040f7eea
Reviewed-by: hjk <hjk@qt.io>
2024-06-05 14:30:00 +00:00
Alessandro Portale
152307a758 Themes: Update Figma color tokens
This adds color tokens for gradients 01 and 02.

Change-Id: I05ae55ff4fd9f496ff1e465e6905398825078b52
Reviewed-by: hjk <hjk@qt.io>
2024-06-05 14:29:53 +00:00
Christian Kandeler
5221d53a6d BareMetal: Use runnable() to get executable and arguments
... rather than accessing the aspects directly.

Task-number: QTCREATORBUG-30925
Change-Id: Id39b6226f6bbee75b93905747373513294deb29e
Reviewed-by: hjk <hjk@qt.io>
2024-06-05 14:23:33 +00:00
Christian Kandeler
345ae8e4d4 ProjectExplorer: Merge CustomExecutableRunConfiguration::runnable()
... into parent class implementation.
This way, the executable expansion will be done for all sub-classes, the
remote custom run configurations being the most relevant ones.

Task-number: QTCREATORBUG-30925
Change-Id: Id7715d9f60338767c0623fa33749ef18338ae479
Reviewed-by: hjk <hjk@qt.io>
2024-06-05 14:21:48 +00:00
Cristian Adam
0fa8047f12 CMakePM: Transform a few raw C strings into constant literals
This way you can have code completion for the constant literals and not
do any accidental typos.

Change-Id: I1f9dc36327052fcda9575dddec909db93c4b225c
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-06-05 13:14:02 +00:00
Cristian Adam
e04c727043 CMakePM: Don't remove QML debugging flag with the preset value
If a CMake preset has the CMAKE_CXX_FLAGS_INIT parameter defined, it
would override the QML debugging flag set before.

This patchset makes sure that both are present.

Change-Id: I2012567af04c2fa0b0097331c05d96770dd86503
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-06-05 13:13:14 +00:00
Jarek Kobus
ffc3c9b7f3 Android: Avoid using connectedDevices() in findAvd()
The connectedDevices() constructs the full list of
AndroidDeviceInfo with details not needed by findAvd().
These details were generated by using 2 excessive
process runs. Get rid of them, and deliver result
as soon as the matching device if found.

Make getAvdName() public.

Change-Id: Ic58e2ee55f275e230c07631853225ca3fdefd730
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-06-05 12:38:40 +00:00
Jarek Kobus
2d1d4d9ba3 Android: Optimize isConnected()
Before, the implementation used connectedDevices() function
which constructs the detailed info about each device
found, including running 3 extra processes for each device
in a loop. For the purpose of isConnected() - the detailed
info isn't really necessary - it's enough to parse the output
of the {adbToolPath(), {"devices"}} command and detect if
the requested serialNumber appears there. We skip executing
3 additional processes for each device found.

Change-Id: I34f79fb56b4aa4d52a284bc2c67ae01a3467b505
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-06-05 12:33:53 +00:00
Christian Stenger
9a4cae42c0 Tests: Make environment test less verbose
Only print out additional information if the environment
does not match the expected one.

Change-Id: I9be1a90400a180a4cbd0381f54eea79409c007c7
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2024-06-05 11:46:04 +00:00
Christian Stenger
7f08529a60 PE: Remove left-over connect
The item view was made read-only and this connect
only results in a warning on the command line when
double clicking an item.
Amends 8ef85e481a.

Change-Id: I32d6b9d38e2c554fb91f5cbd1f1f5fd1e6c1a394
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2024-06-05 11:45:57 +00:00
Christian Kandeler
c33decf1b0 Utils: Fix editing in environment widget
In the edge case that the name of one variable starts with the name of
another followed by an underscore, we mistakenly stopped at the former
when searching for the latter in the text widget.

Fixes: QTCREATORBUG-30855
Change-Id: I6decf7805a937d52d25e6c62899ae062f636a2a1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-06-05 11:12:07 +00:00
Christian Stenger
4a9b2deb3e Docs: Describe changes on Axivion plugin side
Change-Id: Iefdd4d33fbb5b29f8afec8899d8a4373cc0f2436
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2024-06-05 11:11:59 +00:00
Marcus Tillmanns
32322801f5 Shared: Add project.json schema for workspace projects
Change-Id: I16f2944316805ecbd3cd3dfc763c457e5ad6142f
Reviewed-by: David Schulz <david.schulz@qt.io>
2024-06-05 11:05:47 +00:00
David Schulz
f3e164af4f ProjectExplorer: prepare for parallelization of recursive file scan
Change-Id: Ia2db3ef0fe619907c1ed30b8f984de4de04cc477
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2024-06-05 10:59:59 +00:00
Christian Stenger
5b93e34c00 Utils: Allow comments in environment items
This patch allows commenting environment changes or adding
comments to the batch edit widget.
To mark a line as comment prefix it with '##'.

Modifying the environment by using the batch edit mode
allows using '#' to disable variables.
Mis-using this to disable statements of the environment
items widget is tempting and other tools explicitly allow
it this way. But when doing so, the environment may get
some unforeseen modifications.
So, explicitly provide a mechanism for comments and be
more clear about this inside the documentation.

Change-Id: I6a58d0d00e996a3f886ec30e826cade324321818
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2024-06-05 10:48:24 +00:00
Eike Ziller
6692462dcb Wizard: Fix size calculation of outline titles
On macOS we now (with Qt 6.7) get nice, high resolution pixmaps from
QIcon::fromTheme. That means that our wrong assumption that the pixmap
size == UI size leads to huge layout sizes for the indicator of the
current wizard page.

We need to take devicePixelRatio into account for determining the UI
size.

Fixes: QTCREATORBUG-31015
Change-Id: I6e9c77cf2f37fce60735e75c1fa694e4b4208b98
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2024-06-05 10:40:10 +00:00
Artem Sokolovskii
e8938acca9 ClangFormat: Fix indenting 'return' after key words
Change-Id: I9e11b4d299c13ffada897b009fb70c3447213500
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2024-06-05 10:22:50 +00:00
Artem Sokolovskii
9b2bd223dd AppStatisticMonitor: Use QCharts instead of self made
Change-Id: I4de07dd104dec9e1c68e5daf00a55ab7f8a3f72e
Reviewed-by: hjk <hjk@qt.io>
2024-06-05 10:22:12 +00:00
Eike Ziller
1ad2c04e0e Update change log for 13.0.2
Change-Id: I542d2f53d957471660ae0c210c4825b5a9c42a57
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
v13.0.2
2024-06-05 07:03:39 +00:00
Cristian Adam
f17c0fe19c CMakePM: Fix Presets macro expanding of environment
Amends a25bbf23c6

The commit broke evironment variable usage in CMake presets. For example
"$env{HOME}" would have been expanded to "/home/user:/home/user" because
of code thinking it deals with paths.

Change-Id: I3ef34179e2ebaf55b25a42dcce87438c1a72b73e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-06-05 06:59:13 +00:00
Jarek Kobus
6621c68ca9 TaskTree: Qt-ify the code
Make it more conforming to the current Qt style:
1. Remove trailing semicolons after inlined functions.
2. Use Q_SIGNALS / Q_EMIT in headers.
3. Use QString::fromLatin1() where needed (as otherwise the string
   c'tor is deprecated).
4. Use module names in Qt includes.
5. Simplify local asserts in barrier.cpp.

Change-Id: I13cadee6ff61a24d792efcf3b613f7cf5563076b
Reviewed-by: hjk <hjk@qt.io>
2024-06-05 06:55:07 +00:00
Jarek Kobus
dfef293aa4 Android: Fix find process and user PID recipe
Before, the loop got finished after the very first
failure of the pid command. Fix it so that the loop
stops on the first successful execution of any child.
Make timeout task return error, so that the loop
continues executing after the timeout.

Simplify some commands' constructions.

Amends a7ece15f6e

Change-Id: I637002f0248ec69e61e058c7246471396aac1142
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-06-04 18:41:46 +00:00
Cristian Adam
831b93905b CMakePM: Set platform codegen and linker flags for GCC compilers
If a GCC compiler has platform codegen flags they will be set into
CMAKE_C_FLAGS_INIT or CMAKE_CXX_FLAGS_INIT initial CMake parameters.

The linker flags are set they will be set into
CMAKE_EXE_LINKER_FLAGS_INIT, CMAKE_MODULE_LINKER_FLAGS_INIT and
CMAKE_SHARED_LINKER_FLAGS_INIT initial CMake parameters.

If the kit has a Qt the CMAKE_CXX_FLAGS_INIT value will merge both GCC
C++ platform codegen flags and the QML Debugging flags.

Fixes: QTCREATORBUG-24420
Change-Id: I066d30b816ae8575f615654bb85bd82a394f9737
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-06-04 18:32:57 +00:00
Cristian Adam
a9995e23b1 CMakePM: Allow CMake custom build types
CMake can have custom build types. Qt Creator can rename existing build
types.

This changeset allows having a custom build type like for example:
  * CMAKE_BUILD_TYPE=MyRelease
  * CMAKE_CONFIGURATION_TYPES=MyDebug;MyRelease

Fixes: QTCREATORBUG-30014
Change-Id: I3d81d9ff867bfaab29aaf1741606f9c586da82e0
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-06-04 15:30:37 +00:00
Christian Kandeler
ba017c03c2 RemoteLinux: Lower the timeout when retrieving the environment
Otherwise, a non-responsive device will freeze Qt Creator for ten
seconds (with no announcement, because the env call does not go through
the device shell).

Change-Id: I92ab847dd441494770dbe29cde1c726dd31f32fb
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2024-06-04 14:53:49 +00:00
Marcus Tillmanns
00174e493f ProjectExplorer: Add WorkspaceProjectRunConfig
Change-Id: I66f25165f652f371130555279eddc0437b011887
Reviewed-by: hjk <hjk@qt.io>
2024-06-04 14:08:54 +00:00
Eike Ziller
87a7451c2a LayoutBuilder: Fix build with Apple Clang
It needs an explicit constructor, otherwise it complains that it cannot
find a match to the Arg2{p1, p2} call (requires 1 argument, but 2 were
provided) etc.

Amends 6231213aa3

Change-Id: Ibe3b27b334b8abff5028a77372cf208bfda9d8c1
Reviewed-by: hjk <hjk@qt.io>
2024-06-04 13:29:24 +00:00
Eike Ziller
ca3c4537d8 Merge remote-tracking branch 'origin/13.0' into 14.0
Conflicts:
	src/plugins/copilot/copilotsettings.cpp

Change-Id: I6d17cf8968d6efbafb883da8346c7950349f7d84
2024-06-04 14:43:35 +02:00
David Schulz
99ce8b522f Core: compress shortcut settings widget updates
reduces the number of calls to ShortcutSettingsWidget::initialize while
the shortcut settings widget is open and actions get registered. For
example when searching the preferences dialog the shortcut settings
widget is alive and some setting page widgets create a text editor,
which again registers some actions.

Change-Id: Ieb3c3d1c7ce317c3407a9c97514f6cc4a4ce76c4
Reviewed-by: hjk <hjk@qt.io>
2024-06-04 12:32:43 +00:00
Marcus Tillmanns
f512bbff89 Copilot: Adapt to agent.js => language-server.js rename
Copilot has changed the name of agent.js to language-server.js. This
patch adds the new name and changes the installation note without
changing the translation.

Change-Id: I585fe54c86029de32de806447ec3356999a99540
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-06-04 12:29:34 +00:00
Sivert Krøvel
0e80f63a1a McuSupport: Use arm-none-eabi-gdb as a backup debugger
We normally use arm-none-eabi-gdb-py, but this doesn't come
with the new arm gcc version which ships with Qt for MCUs 2.8.0
To make sure the kit works, use this as a fallback.

Task-number: QTCREATORBUG-30699
Change-Id: I85c6c3ea1f7aae504e0aa1afb8a344d9bc3067d5
Reviewed-by: Kwangsub Kim <kwangsub.kim@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-06-04 12:19:25 +00:00
Sivert Krøvel
3be0b263a8 McuSupport: Read and write user settings with non-versioned key
The settings keys are versioned to avoid the situation where the
installer removes a settings key which may still be in use.
See QTCREATORBUG-29194 for details.

When reading from user settings, it makes more sense to use the
non-versioned keys, especially in the case of the main Qt for MCUs
SDK package path. With this patch, the plain settings key is used
to read and write except for when determining the default value of a
path in the McuPackage constructor, where we want to also look in the
system scope settings for the values written by the installer, which
may be version specific

Task-number: QTCREATORBUG-30810
Change-Id: Ib1e2be170cb7da24b6e4534b59f702b894556d8c
Reviewed-by: Yasser Grimes <yasser.grimes@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-06-04 12:19:14 +00:00
hjk
6231213aa3 Utils: Make contents margins handling less special
Change-Id: I985419bbb213aba899c83efb49b376e0f3338bd5
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2024-06-04 12:16:03 +00:00
hjk
b10d5581e4 Utils: Make LayoutBuilder setter setup less repetitive
Change-Id: I9113f7a97566c21cf83dcb95ce8e75e9707360b4
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2024-06-04 12:15:37 +00:00
Christian Stenger
968e47194c VCS: Fix handling of default executable
We set the executable by default to a single command which
should be used as found in PATH.
Although listed valid in settings some commands refuse to
run when we validate the command before running without
taking their full path into account.
Use the full path of vcs binaries internally to avoid
problems but still display single command if set.

Change-Id: If8677b531c5534d27c19557ed36fa780a248558f
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2024-06-04 11:49:39 +00:00
Jarek Kobus
f1d0aee486 ProjectExplorer: Add projectnodeshelper.h into project
Otherwise this file is exlcuded from project search results.

Change-Id: I65ce5121ac105f5565c46e4b5a5fbd74bee966d6
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2024-06-04 10:59:48 +00:00
Leena Miettinen
440c579ec0 Doc: Remove references to Qt 4 and < Qt 5.15
Leave only mentions to things visible in the UI and
to compatibility functions.

Fixes: QTCREATORBUG-30883
Change-Id: Id63d791f79363c2f4c2602bb8c0ed656a9ceab29
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2024-06-04 10:28:19 +00:00
Eike Ziller
3c71998e34 PluginManager: Fix -load all -noload Plugin
Setting a plugin forceDisabled must also remove the forceEnabled flag
and vice versa.

Broke in b39b192518

Change-Id: I9c2b84de0753a1b283c301b9868650e62c088144
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-06-04 10:17:05 +00:00
Christian Kandeler
408e986f2b ClangCodeModel: Fix potential crash
... when removing from the list of FollowSymbol operations. The done()
callback of ClangdFollowSymbol messes with the list, so call cancel()
after removing the corresponding iterator.

Change-Id: Ibb72ffa436598692e48119d93d430bb79bcb0f5e
Reviewed-by: hjk <hjk@qt.io>
2024-06-04 09:21:25 +00:00
Orgad Shaneh
173aed9b8e C++: Fix compiler warning
warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data

Change-Id: I3a8203c1662cfba36ebe28ad3bd1b5ff46b55dfe
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2024-06-04 09:04:05 +00:00
Cristian Adam
725cf0637f CMakePM: Skip .obj/.o for static qml plugins in PATH
Amends 5d159e6185

This commit reverts to Qt Creator 12 behavior, plus skipping .obj/.o
parts which are needed for linking but not for finding out library paths
that need to be added to PATH environment.

Tested with https://code.qt.io/cgit/qt/qtdeclarative.git/tree/examples/
qml/tutorials/extending-qml/chapter6-plugins

Without the patch (Qt Creator 12 behavior):

"C:/Projects/chapter6-plugins/build/Desktop_Qt_6_7_1_MinGW_64_bit-Debug/
Charts/CMakeFiles/chartsplugin_resources_1.dir/.qt/rcc",
"C:/Projects/chapter6-plugins/build/Desktop_Qt_6_7_1_MinGW_64_bit-Debug/
Charts/CMakeFiles/chartsplugin_init.dir/chartsplugin_init_autogen",
"C:/Projects/chapter6-plugins/build/Desktop_Qt_6_7_1_MinGW_64_bit-Debug/
Charts/CMakeFiles/chartsplugin_init.dir",
"C:/Projects/chapter6-plugins/build/Desktop_Qt_6_7_1_MinGW_64_bit-Debug/
Charts",
"C:/Qt/6.7.1/mingw_64/lib",
"C:/Qt/6.7.1/mingw_64/bin"

With the patch:

"C:/Projects/chapter6-plugins/build/Desktop_Qt_6_7_1_MinGW_64_bit-Debug/
Charts",
"C:/Qt/6.7.1/mingw_64/lib",
"C:/Qt/6.7.1/mingw_64/bin"

As you can see above, only skipping the .obj/.o files will bring a lot.

The change also doesn't come with the side effects of the Qt Creator
13.0.0/1 releases.

Task-number: QTCREATORBUG-29662
Change-Id: I264a0ef579177b7129471919b77cd22a46e7d511
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-06-04 09:03:31 +00:00
Christian Kandeler
bfd3b88bb8 RemoteLinux: Do not announce connection attempts from non-UI threads
This can lead to a deadlock. Example scenario:
  - Have a kit with an unreachable device as the build device.
  - Open a project with a .user file not matching the current QtC.
  - The target setup page will open, showing a candidate widget
    for each kit. These widgets contains path choosers, which nowadays
    start a dedicated thread to validate their input.
  - The path validation thread for the Linux kit arrives at setupShell()
    and tries to announce the connection attempt. To that end, it
    invokes a method of Core::ICore::infoBar, using
    Qt::BlockingQueuedConnection, as otherwise the call would either
    not be tread-safe or arrive too late.
  - As the InfoBar lives in the main thread, control is now passed back
    to that one, and the target setup page continues its work, which is
    to gather candidates for importing a build from. This involves
    perusing potential build directories for all kits. In case of the
    Linux kit, QDirIterator is backed by a remote call to find(), which
    triggers a call to runInShell(), which tries to acquire the mutex
    that is already held by the path validation thread, which in turn is
    waiting for the UI thread.
  - Qt Creator now hangs indefinitely.
Skipping the announcements for non-UI threads limits the usefulness of
this feature, but I don't see a better way.

Change-Id: I816c83358f543aa9a6e6e97eee7fa8ad95e66ea8
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2024-06-04 09:02:40 +00:00
Marcus Tillmanns
a30eb2ccc4 Utils: Fix terminal process environment
The TerminalInterface did not fallback to the system environment
if no environment was set by the user. Instead it had platform
specific code that saved over the path.

Instead we just apply the user changes to the system environment.

Change-Id: I011f1a9d935c958265b2bda8257ad8611f06e578
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-06-04 08:43:01 +00:00
Marcus Tillmanns
249312acd0 Lua: Add -loadluaplugin startup argument
Change-Id: Ia0a57bbb94d42534857889a0d08ec41c75708dca
Reviewed-by: hjk <hjk@qt.io>
2024-06-04 08:03:13 +00:00
Marcus Tillmanns
8965e12d4f ProjectExplorer: Add readOnly handling to runconfig aspects
Change-Id: If8ebd2d13c22bf60f50bb55a7b61f15ba81e481b
Reviewed-by: hjk <hjk@qt.io>
2024-06-04 07:30:20 +00:00
hjk
4a4eda1b09 Debugger: Simplify some redundant file property checks
Change-Id: Ie6d638d0ece7b08dc28058f74f4c37910ffb6d83
Reviewed-by: David Schulz <david.schulz@qt.io>
2024-06-04 07:06:07 +00:00
hjk
a726e5d349 Utils: Let all FilePath::is*{Dir,File} return false when empty
Less guessing on the user side what effectively happens.

Change-Id: I6ace4645d40346ee942ae7390575f28992dd0c26
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2024-06-04 07:05:56 +00:00
Eike Ziller
1543ead1b6 Add change log for 13.0.2
Change-Id: I6f80bc14b472ec9ec402a40e850ae86d46a29a5a
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2024-06-04 06:50:16 +00:00
Cristian Adam
5d159e6185 CMakePM: Only add external "bin" dirs to PATH
At QTCREATORBUG-29662 we have the issue when a program cannot be started
because the PATH environment variable had content longer than 2048
characters.

Qt Creator 12 had only one place that added paths to librarySeachPaths
namely the "bin" directories.

Qt Creator 13 tried to filter these "bin" directories to the ones that
have .dll files. This fixed QTCREATORBUG-29662 but had issues with dlls
having different names than the link libraries provided by CMake.

By only allowing "bin" directories from paths not from the build
directory we allow Qt, or OpenSSL dependencies, but not just existing
"bin" directories.

Amends 0d8a542b4f
Amends 8713919f31
Amends ac97ab1abf
Amends 2ce6255a7d

Task-number: QTCREATORBUG-29662
Change-Id: If0b162f25ae1e5bfc1e1ff313720c54c5ae936c5
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-06-03 13:33:55 +00:00