Commit Graph

74059 Commits

Author SHA1 Message Date
Thomas Hartmann
b2866068ba QmlDesigner: Use standard camelcase ids for telemetry ids
Change-Id: I28d7744899bc476eb64f9ec5877d1821fdf64926
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-04-07 10:35:34 +00:00
Christian Kandeler
3cdec51eaf CppEditor: Properly handle function types as template arguments
... when creating getters and setters.

Fixes: QTCREATORBUG-27133
Change-Id: Ia77147a270fb1229c765ff9d5f03aa243d51fe97
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-07 08:20:22 +00:00
Christian Kandeler
f27c4214f8 ClangCodeModel: Better icon for static class members
... in completions. Apparently, clangd uses the LSP type "property" for
static members.

Task-number: QTCREATORBUG-27289
Change-Id: Ib296dbade6b2e7c38a761b27b2c024ea98a89523
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-04-07 08:19:05 +00:00
Eike Ziller
ca480ec601 Merge remote-tracking branch 'origin/7.0'
Change-Id: I9a7a9a5579f1f4e277e7927eefb1bab9ca60ad4a
2022-04-07 09:51:40 +02:00
Marcus Tillmanns
bcfe2bc25a utils: Add additional tooltip to ElidingLabel
In case you want to set a real Tooltip for an eliding label

Added tests in tst_manual_widgets_infolabel

Change-Id: I72bcbf672415ce439c14e260e364fcd2f85fc733
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-04-07 07:28:22 +00:00
David Schulz
221b52d01a Core: fix OptionsPopup positioning
Do not limit the popups coordinates to positive y coordinates, since
Monitors above the main monitor have a negative y coordinate. Use the
the available geometry of the parent widgets screen to check for
sensible coordinates instead.

Fixes: QTCREATORBUG-27341
Change-Id: I6e1572f7b2d3c83feafcf71392e265e14e6b457d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-04-07 04:08:07 +00:00
Thomas Hartmann
3da441f4d1 QmlDesigner: Fix compound alias properties
Change-Id: I5d58b6b740af71ef10010548429e1d12f97c620c
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-04-06 16:02:06 +00:00
Jarek Kobus
097b862712 AndroidDeviceManager: Connect to QtcProcess::done() signal
Instead of connecting to errorOccurred() and finished() signals.
Make some cleanup in usages of Utils:: namespace.

Change-Id: I5d784d1938d6aac1dd760c663b60c23378318096
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-04-06 15:48:15 +00:00
Jarek Kobus
e9f1ff9193 RsyncDeployService: Connect to QtcProcess::done() signal
Instead of connecting to errorOccurred() and finished() signals.

Change-Id: If18ff8431efa7f3b45212fe737f66fb4eb6c6fb5
Reviewed-by: hjk <hjk@qt.io>
2022-04-06 13:54:54 +00:00
Jarek Kobus
8816759a85 GenericLinuxDeviceTester: Connect to QtcProcess::done() signal
Instead of connecting to errorOccurred() and finished() signals.

Change-Id: I507b05cfc979db56ac7101432dd20acb68848d48
Reviewed-by: hjk <hjk@qt.io>
2022-04-06 13:54:45 +00:00
Jarek Kobus
7f6b5a3bd4 SshDeviceProcess: Emit done() signal
Emit done() signal along with errorOccurred(FailedToStart)
and finished() signals.

Change-Id: I52db46e1c7fd44434514bac62b3df8eb0b9a4dc2
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-04-06 13:54:27 +00:00
Eike Ziller
be1437c797 Fix opening terminal with macOS 12.3
macOS removed support for Python2, so switch to Python3 (and fix that we
now need to specify text mode for a temporary file if we want to write
text there, not binary data).

Fixes: QTCREATORBUG-27337
Change-Id: I4884480c32e017aa710f90ab0b5afe493a2adb9e
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-04-06 13:19:35 +00:00
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
Cristian Adam
1a20495400 Doc: Update Windows paths to settings files
This way it looks less scary and easier to remember.

Change-Id: If8ccd37d85647f3ae26c615556c78ae99c992c13
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-04-05 15:04:55 +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
b404852cb1 qbs build: Do not build the translations by default
Fixes: QTCREATORBUG-27324
Change-Id: Iba2e6b3b211ba7cb6de5e18e67f36d1f4165e23f
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-04-05 12:59:11 +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
Jarek Kobus
97132cf7f0 tst_QtcProcess: Add a test that invokes a process recursively
After the required depth of recursion is met, the most
nested process waits for one seconds and crashes.

Change-Id: I8d9b359459fc7aa1983734685e5c5f19eb49ee94
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-04-05 11:40:20 +00:00
Jarek Kobus
8f427c1c95 tst_QtcProcess: Move subprocesses into a separate executable
Don't invoke subcreator test in order to run a custom process.
Run a separate executable instead. The advantages are:
1. Faster test running (no need for QTest specific code path
   when running subprocess).
2. Don't use std::exit() from subprocesses as it doesn't
   clean up properly. Use qApp->exit() instead.
3. This should support returning NormalExit and proper
   exit code of subprocess in case the code wasn't 0.

Change-Id: I1395bd8a7873c95a594c3e054087f00c55a15376
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-04-05 11:40:00 +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
Eike Ziller
0c35d79e39 GitHub/COIN: Use LLVM 14.0.0 final
Change-Id: I03c25423a32cfe5084342f6a6293dfd159e93783
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-04-04 11:13:54 +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