Commit Graph

62421 Commits

Author SHA1 Message Date
Eike Ziller
4e59ca2bb5 Examples: Match tags case insensitively
Fixes: QTCREATORBUG-27339
Change-Id: I33a5726f9e1d66dafa876ec279f3c1ca939d964c
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2022-04-06 12:53:46 +00:00
Marcus Tillmanns
0ee47fc734 docker-plugin: Split out dockerdevice utility classes
Moved DockerDeviceWidget and KitDetector into their own files

Change-Id: I16d52a4f27f611b6278e2144c4718bd370f99b63
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-04-06 12:32:03 +00:00
Alesandro Portale
e7a0c380d7 ProjectExplorer: Cleanup Window title for the case of no loaded document
When no document is loaded, don't prepend a windowTitleAddition to the
IDE window title.

Fixes: QTCREATORBUG-27328
Change-Id: I283debc2588c6552eaeb9ea23d7df0d07580f9af
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2022-04-06 12:15:22 +00:00
Jarek Kobus
cd06f69cc9 UvscServerProviderRunner: Connect to QtcProcess::done() signal
Instead of connecting to errorOccurred() and finished() signals.

Change-Id: I3c90e6d6166f0abcaadc5140439208058fbc75cd
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-04-06 07:25:00 +00:00
Jarek Kobus
6d50a5e36e Archive: Connect to QtcProcess::done() signal
Instead of connecting to errorOccurred() and finished() signals.

Change-Id: I2bc4b8359652549949c486ad6bce002a5db30688
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-04-06 06:45:09 +00:00
Eike Ziller
73a78a70da Examples: Make sure to select some example set if available
In the case of the bug report, there is no previously selected index,
and no valid Qt version, so setting the index to the highest Qt version
doesn't result in anything. Make sure to select something in the
dropdown, if we have any item there at all, even if our heuristics don't
come up with an optimal selection.

Fixes: QTCREATORBUG-26791
Change-Id: I2327594f0fd36e312aa71d1990e8ccab4a488367
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-04-06 06:28:58 +00:00
Jarek Kobus
484ea3ecc9 QtcSsh: Connect to QtcProcess::done() signal
Instead of connecting to errorOccurred() and finished() signals.

Change-Id: I113f51564501a67725afee77ab4d20e5d954a7c0
Reviewed-by: hjk <hjk@qt.io>
2022-04-05 14:20:38 +00:00
Jarek Kobus
5b923954c0 QtcProcess: Make exitMessage() a const method
Change-Id: Ibb0aaf0bf3bf216673646ea7b869fd7e55e6b81c
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-04-05 13:36:48 +00:00
Christian Kandeler
c2c8b137c0 CppEditor: Ensure a space between ref qualifier and exception spec
Task-number: QTCREATORBUG-27132
Change-Id: Iedb983f58ece345d5997607d2e557e36c951750f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-04-05 12:59:49 +00:00
Christian Kandeler
b8144e0c51 CppEditor: Use trailing return type when moving function definition
... if the original definition also used a trailing return type.

Task-number: QTCREATORBUG-27132
Change-Id: Iaeeeac08601f1d931aabe12be9f89ca0240d97a2
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-04-05 12:58:39 +00:00
Christian Stenger
00df4c6675 Valgrind: Remove expect to fail of a test
This seems to be fixed meanwhile.

Change-Id: Ia2868fb6d8f1fd1bd3510965c57407e1cd62067a
Reviewed-by: hjk <hjk@qt.io>
2022-04-05 12:46:33 +00:00
Jarek Kobus
c4e75b7e20 LanguageClientManager: Don't delete the client directly
LanguageClientManager::deleteClient() may be called directly
from Client::finished() handler, from BaseClientInterface::finished()
handler, from StdIOClientInterface::onProcessFinished() handler
or from QtcProcess::finished() handler. Don't delete
directly any of this objects - delete later instead.

Since now we have delayed the deletion of clients, we can't
send directly the shutdownFinished() signal,
as we have not really finished the shutdown yet.
Since all the calls to clients' deleteLater() were
scheduled before emitting shutdownFinished(),
we send the signal using queued connection, which should
guarantee that all clients' destructor were already executed
before calling asynchronousShutdownFinished().

Task-number: QTCREATORBUG-27316
Change-Id: I4f2c8a756ca86c36cc6324af14b99a9fd4513cd3
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-04-05 12:41:32 +00:00
Jarek Kobus
4093fbe826 Don't delete process directly from process' finished handler
AbstractProcessStep::slotProcessFinished() slot is connected
to m_process finished() signal. We call there
AbstractProcessStep::Private::cleanUp(), and that calls
m_process.reset(), so it invokes m_process d'tor directly.

SshRemoteProcessRunner::handleProcessFinished() slot is
connected to d->m_process finished() signal. We call there
SshRemoteProcessRunner::setState(), and that calls
d->m_process.reset(), so it invokes m_process d'tor directly.

Delete later m_process instead in both cases.

Change-Id: I4a0f2a631b676b57e8bcc3a7878620bc76dc74de
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-04-05 12:41:26 +00:00
Jarek Kobus
a717ff71f4 QtcProcess: Ensure we don't delete the process from handlers
Guard that we don't delete the QtcProcess directly from
inside its handlers.

This helps in detecting wrong usage of QtcProcess.

Change-Id: Ia5b154b3e1f827d579910ebe81ae230fc797c377
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-04-05 12:41:13 +00:00
Christian Kandeler
cb86ca547a CppEditor: Fix "move function definition"
... for member functions with exception specification and/or reference
qualifiers.
The FunctionDeclaratorAST::cv_qualifier_list member can contain both the
proper qualifiers "const" and "volatile" as well as the pseudo-qualifiers
"override" and "final". The problem is that the former appear before
exception specification and reference qualifiers, whereas the latter come
afterwards. Therefore, when calculating the declarator's first and last
tokens, we can't just mechanically check the different declarator members
in order. Instead, we need to compare the token values to see which
comes first.

Task-number: QTCREATORBUG-27132
Change-Id: I924f9afe49453fa51b4a2fe010d1cc00c9defad1
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-04-05 11:38:46 +00:00
Miikka Heikkinen
0ee4322dfd QmlDesigner: Auto close 3D import dialog on success
Fixes: QDS-6573
Change-Id: I790a88a683e1cf4ca846148a4cde01b07b2a1844
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2022-04-05 11:24:06 +00:00
Marcus Tillmanns
8fd5c9d6c0 SdkTool: Fix build with different runtime library settings on windows
Amends c246caf7a9.

Change-Id: I2f858ff75a1a2a980d71a1623399c66fd6c34b84
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-04-05 11:16:03 +00:00
Christian Stenger
8c7c655356 SdkTool: Fix build with Qt5
Amends c246caf7a9.

Change-Id: I5835751f7312acbe8f171c3e61d4836111849421
Reviewed-by: hjk <hjk@qt.io>
2022-04-05 06:24:20 +00:00
Marcus Tillmanns
eb696b4f85 docker: Show error when docker application cannot be found/started
Change-Id: I752ec9fe7bf0db5d26828a175363ef08c5c9bf02
Reviewed-by: hjk <hjk@qt.io>
2022-04-04 15:29:00 +00:00
Marcus Tillmanns
c246caf7a9 sdktool: Change tests to use QTest
* Moved all sdktool code into a static library, allowing us to link against the actual functionality in unittests
* Convert all tests to proper unittests

Change-Id: I5c93be0faecbd8b68e0923655483c870a2f408b5
Reviewed-by: hjk <hjk@qt.io>
2022-04-04 14:27:46 +00:00
Christian Stenger
055de08524 McuSupport: Fix compile
Amends 80c87ddceb.

Change-Id: I7a721bc46fb80c126cc7460a58ecebed0748ed6f
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-04-04 13:46:45 +00:00
Eike Ziller
06703e17d4 CMake: Add paths from target_link_directories to ((DY)LD_LIBRARY_)PATH
So far we only looked at a target and added all paths of actually linked
libraries to the ((DY)LD_LIBRARY_)PATH, if the "Add build library search
path" option is on (the default).
That often is fine, but

- if the library to link to is only given as a library name, not a path
and not a CMake target, then CMake file-api doesn't give us a path to
the library either
- on Windows, where the .lib is needed for compiletime linking, but the
.dll is needed for runtime linking this only helps if the .dll was in
the same directory as the .lib

We already have a hack on Windows, if the directory ends in /lib, that
we also add /lib/../bin, but that again only helps for that specific
layout.

Instead actually add the "build library search path", by adding the
directories from target_link_directories, even if no libraries are
linked from there. This fixes the "linked only by name" issue, and
allows users to add a build library search path to the .dll too, and
have that used by Qt Creator for running the application.

Fixes: QTCREATORBUG-27201
Change-Id: I7b9210b791b4dae3a6d1747ff36e4b82235db2f9
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2022-04-04 13:44:24 +00:00
Alessandro Portale
9b4d9d84fb Git: Remove extra margins in the Gerrit Dialog
The margins in the Gerrit dialog stand out compared to other ui in Qt
Creator, and they occupy space.

Fixes: QTCREATORBUG-27217
Change-Id: I8caf3c793741bd37580633b8829b9f96b24627aa
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-04-04 13:39:08 +00:00
Alessandro Portale
a987a55651 Core: Give "New Search" form a minimum width
The search form width depended on the translation and how wide the
three check boxes below the search field were.

Give the form a minimum width of ~680px, to better accommodate
search terms, paths and file extension lists.

Fixes: QTCREATORBUG-27162
Change-Id: Ic8d2ca3acbead1920df58555b118ab80a34be7b1
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-04-04 13:36:33 +00:00
Jarek Kobus
ab11c4373b QtcProcess: Introduce done() signal
Introduce QtcProcess::done() signal. It's similar to
QtcProcess::finished() signal, but also emitted when
process failed to start (so after QProcess::FailedToStart
error occurred).

SshRemoteProcess::finished() signal was already behaving
like this. So, we remove special handling of
FailedToStart error in this class and connect all clients
of SshRemoteProcess to done() signal, instead of finished().

Task-number: QTCREATORBUG-27232
Change-Id: If4240e2172f3f706e812bca669a1d5b24bdc3285
Reviewed-by: hjk <hjk@qt.io>
2022-04-04 13:28:12 +00:00
The Qt Project
d950eb498f Merge "Merge remote-tracking branch 'origin/7.0'" 2022-04-04 13:14:04 +00:00
Piotr Mućko
566cea1b60 McuSupport: Update test json files to new format
2.1 is released hence uses legacy creation of packages.
McuSupport refactoring is part of QtMCU 2.2.
Will be finished before qtc 8.
It will be documented before 2.2 and qtcreator 8.

Change-Id: Iab0e85f27186149cb73456983d15b30401d99233
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-04-04 13:03:52 +00:00
Christian Kandeler
25144c0afe ClangCodeModel: Fix erroneous highlighting as output argument
... for objects with non-const member calls.
Amends 8247f4f3dd.

Fixes: QTCREATORBUG-27306
Change-Id: I13fdf1ff9daf9ac084beda6c1d8ada5801adca4c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-04-04 12:46:28 +00:00
Piotr Mućko
80c87ddceb McuSupport: create toolchain from JSON file
Most of the code is unit tests for toolchain creation.

Change-Id: I955ba49db38acf6f9e35d366280b710ea0466655
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-04-04 12:42:55 +00:00
Christian Kandeler
d9e38b1523 Update qbs submodule
... to HEAD of the 1.22 branch.

Change-Id: Id46f13a95023780b30137a2501133ee2d4b55e3c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-04-04 10:26:28 +00:00
Jarek Kobus
365a05640b QtcProcess: Get rid of setErrorString() method
It's internal method, not meant to be used outside.
It's only used in case of FailedToStart error.
Remove it also from ProcessInterface.
Leave it inside DefaultImpl and its subclasses only.

Remove m_errorString field from ProcessSetupData.

Change-Id: Ie605b95c2ff605ab1259045f1a5b16049207c1d3
Reviewed-by: hjk <hjk@qt.io>
2022-04-04 10:20:34 +00:00
Eike Ziller
6a1e3f5e6e Merge remote-tracking branch 'origin/7.0'
Change-Id: I95dba3037fe5630cafc3c1e45c579ff18730262c
2022-04-04 11:50:16 +02:00
Alessandro Portale
1464238eb5 VcsBase: Apply text editor's font settings to the output pane
Some of Git's output is formatted in a way that benefits from a
monospace font. Therefore, it would be useful to be able to set such a
font.

This change syncs the font of the Version Control output pane with the
text editor font. This is also the standard with other output panes.

Fixes: QTCREATORBUG-27164
Change-Id: Id579f18aef741d18f7434ecef35081ffc155ef1c
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-04-04 08:50:04 +00:00
Christian Strømme
e45766cdc8 Make the ExternalTools classes accessible outside core
Change-Id: I225c22bc48b123fec4420761879382ea0a424029
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-04-04 08:02:11 +00:00
Piotr Mućko
50fddf1128 McuSupport: 2.2 does not use legacy implementation
Change-Id: I77ba78f8997f1727de5b39cc49811e1def4287d5
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-04-01 14:06:50 +00:00
Piotr Mućko
a3fbfac814 McuSupport: Automatic memory management for mcu sdk
Fix crash while automatically restoring kits during startup.
Change packages container to set to avoid duplicates.
Use RAII for McuSdkRepository.

Change-Id: I4b3f4156f0bc770c8a5ea8a171b1f22f6ffb8f96
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-04-01 13:55:34 +00:00
Eike Ziller
b2ae521892 Fix that build device was always set to Local Host
Copy and paste error from DeviceKitAspect. The build device has nothing
todo with the target device, so it doesn't need to be compatible with
the target device type.

Amends ec5e060a07

Fixes: QTCREATORBUG-27242
Change-Id: Iab9ae4c9adc98a177d15de705bc07406419f85e1
Reviewed-by: hjk <hjk@qt.io>
2022-04-01 13:31:39 +00:00
Christian Kandeler
652f130fae ProjectExplorer: Bring back keyboard shortcut for "Manage Sessions"
It got lost in 2d196bd2a1.

Fixes: QTCREATORBUG-26950
Change-Id: If181e478488aa6732bb17fae4d72196854c396f7
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-04-01 12:59:24 +00:00
Thomas Hartmann
b2a34f3fcf QmlDesigner: Fix shortcuts and tooltips for transition editor
Creating the correct tooltip and managing the shortcut is managed by
the command. We need a context for the shortcuts.
Applying similar fixes to the timeline.

Task-number: QDS-6539
Change-Id: If9a92c64508a6d3ff0754522e311ca0ce422dda1
Reviewed-by: Knud Dollereder <knud.dollereder@qt.io>
2022-04-01 12:23:11 +00:00
hjk
6297851f29 Utils: Merge TerminalProcess into TerminalImpl
Change-Id: I60a03f315e84e17877d4ecd809a994f08934bedf
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-04-01 11:25:46 +00:00
David Schulz
e437cf7a71 LanguageClient: export DiagnosticManager
Change-Id: I60b3e6b14bf364da60fb8b3de6d5d5cc1cd2e634
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-04-01 10:44:39 +00:00
Rafael Roquetto
3fa560aeb0 QNX: don't set LD_LIBRARY_PATH
Setting this variable causes an instance of LD_LIBRARY_PATH containing
<qtdir>/lib to be added to the environment. In the context of QNX x64,
this tricks the Linux dynamic loader into attempto to the target Qt
libraries (e.g. libQt6Core.so) instead of the host ones when running
host tools such as qmake, as the loader
will find a matching library dependency in LD_LIBRARY_PATH before it can
even reach the ld cache. This will obviously fail.

An instance of LD_LIBRARY_PATH containing the path to the Qt libraries
should not be required anyway - these explicitly passed as linker flags
to the compiler driver. Host tools rely on the builting RPATH of their
binaries.

Task-number: QTCREATORBUG-27287
Change-Id: I0527a7a77c6c76fa0229ea65695cc0d9f7d9811b
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-04-01 10:15:50 +00:00
Rafael Roquetto
bd2aa07fa5 Qnx: Fix progress count when deploying libraries
Account for symlinks

Fixes: QTCREATORBUG-27274
Change-Id: Ie7a8235c06299d28acb98bf077f8012bdb5fb8ea
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-04-01 10:15:16 +00:00
Christian Kandeler
929e40a9f2 Fix some warnings
Change-Id: Idc12465aa6a3a3d158f17961f902578ca16d0d7b
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-04-01 08:23:25 +00:00
Christian Stenger
38d57445e1 Core: Fix runtime warning
Amends b4f2ac0dd4.

Change-Id: Ia62e396f3760f8805085d3a0b0435cc426e5fe2d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-04-01 07:53:52 +00:00
Cristian Adam
1e9e09d765 CMakePM: Filter out (more) empty key configuration items
The code was not filtering empty configuration items
that were the result of bad string input like:
-DMY_KEY:PATH/some/path/but/no/equal/sign

Amends a2a8f56b6e

Task-number: QTCREATORBUG-27237
Change-Id: Ic307eceb66dc0e00b073c9aabb04fe70a223cf08
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-04-01 07:14:32 +00:00
Cristian Adam
1833bf285e CMakePM: Fix CMAKE_SYSROOT parameter value
Was missing a = sign after PATH.

Amends abbd6cdc8c

Task-number: QTCREATORBUG-27237
Task-number: QTCREATORBUG-27280
Change-Id: I06f9dc95ed261037febea573a7e8d305210507fa
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-04-01 07:14:14 +00:00
Cristian Adam
0341f83ad1 CMakePM: Fix disappearing of the CMake settings page
The ProjectExplorer::Task::Error will result in having
m_kitErrorsForProject in targetsettingspanel.cpp which in
TargetItem::updateSubItems() recreates the build settings page.

By reporting the CMake project loading as Task::Warning the above
case is avoided the project build settings page is not
disappearing anymore.

Change-Id: Ib2523e6ea86fe5ad6e4bbee4e101b47cb350a68d
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-03-31 16:03:42 +00:00
hjk
ad2fa94ff1 ProjectExplorer: Regularize namespace setup in appoutputpane.cpp
Change-Id: If87fbed5ec054c6180c43ec8190b9993621daa56
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-03-31 15:42:07 +00:00
hjk
38a6565199 Utils: Simplify TerminalProcess interface
Replace only internally used functions by direct access.

Change-Id: I3daff0596ef6fb6e1c5b5711928f14d590e4e56c
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-03-31 14:54:31 +00:00