Commit Graph

76860 Commits

Author SHA1 Message Date
Marcus Tillmanns
05a7f93f96 ProjectExplorer: Fix crash in TaskHub::addTask
Change-Id: Ic51d6b30e96161e5e99f61d4de1ab674246c426c
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-06-21 11:41:44 +00:00
Jarek Kobus
283673a5d9 AbstractSettings: Introduce VersionUpdater
Uniform version number parsing inside AbstractSettings.
Get rid of updateVersion() virtual method and add
protected setVersionRegExp() instead.

If the user calls version() we wait for version process
to finish if it was running. This makes sure that we
don't return old / invalid version number while version
process is still running.

Change-Id: Ie27816534dd52c086acde721f3b49e669a7c30bc
Reviewed-by: hjk <hjk@qt.io>
2022-06-21 11:40:25 +00:00
Jarek Kobus
7a14ee1393 PluginDumper: Connect to done() signal
Instead of connecting to errorOccurred() and finished() signals.

Change-Id: Iaf5fb4ec46919e37b0ab12ec4cbff904ae192de7
Reviewed-by: hjk <hjk@qt.io>
2022-06-21 10:49:46 +00:00
Tim Jenssen
c4e94c2c9c Merge remote-tracking branch 'origin/qmlprojectstorage'
Conflicts:
	src/plugins/qmldesigner/qmldesignerprojectmanager.cpp
	src/plugins/qmlprojectmanager/qmlproject.cpp
	src/plugins/qmlprojectmanager/qmlproject.h

Change-Id: I0c0d59c8e3b8455b6ac575d34fdf49f39388db7a
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2022-06-21 10:47:34 +00:00
Fawzi Mohamed
a235aa29a1 qmljs: avoid linking to files in the build directory
cmake creates a consistent uri structure in the build directory.
We use that as import path, but when we find a type in them we should
refer back to the original file, as editing those is dangerous because
any edit are lost with the next build.
To find the original file we use the qrc, as the qrc path is mostly
the same of as the uri path.
It is possible to add prefixes which would make an exact match fail,
so we compare the paths from the right to the left and find the
longest match.

To acheive this:
 * QrcParser keeps a reversedResources, so the match from right can be
   done efficiently, and provides a longestReverseMatches method
 * the model manager keeps a list of all common prefixes of the
   application paths (build directories), and identify all files in
   build directories
 * the method fileToSource identifies the files in the build directory
   and tries to find the corresponding source file, warning if he
   cannot find it
 * fileToSource is used for follow Symbol and find usages

We could use fileToSource much more aggressively, to use to in editor
content for the files in the build directory, increasing the
consistency, but that is a more dangerous change for later.

Fixes: QTCREATORBUG-27173
Change-Id: Iea61b9825e5f6e433a7390cf2de9564b792458a5
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2022-06-21 10:39:52 +00:00
Cristian Adam
8c2120d155 ProjectExplorer: MSVC arm64 native toolchain support
Visual Studio 2022 v17.3 is in preview state and adds support
for arm64, arm64_x86 and arm64_amd64 toolchains.

Change-Id: Iff2cb13c9ebef77d40804c7dd8b3df6488e6ce41
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-06-21 10:10:28 +00:00
Cristian Adam
e50aa5bb41 Arm64: Separate Arm64 from Arm on Windows
The separation is the first step of proper supporting the
native Visual C++ Arm64 that is now in preview in Visual Studio v17.3

Change-Id: I8cfa4b5b248158db68cb4af081dd59cabcd28c95
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-06-21 10:10:22 +00:00
Eike Ziller
17129dc931 CMake build: Re-add qtcreatorcrashhandler
On Linux for Debug configurations, like it was for the qmake build.

Change-Id: I9ffc8687010ba7900203520c1609f7112c5434be
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2022-06-21 08:47:06 +00:00
Marco Bubke
6aa826436c QmlDesigner: Disable Qml*Parser if there is no QmlDom
We simple provide an empty implementation. The project storage is anyway
not used by default. So it is expected that the programmer is providing
a qml dom if he wants to use the project storage.

Change-Id: Ib652e7589b4f773a4474974f6762490c5d515999
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-06-21 08:44:30 +00:00
Jarek Kobus
64d52bb8c3 CppcheckRunner: Connect to done() signal instead of finished()
Simplify internals a bit.

Change-Id: I4871b73f605af4d56e4993b6d71bbb22b4fce27d
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-06-21 08:16:58 +00:00
hjk
8e22e08d21 Test: Make valgrind modeldemo test compile with cmake
As on it, correct the handling of the launcher interface.
This still does not work due to wrong call of valgrind-fake.

Change-Id: Id835e84eee29720579ac2947906bb95f84377185
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-06-21 08:16:28 +00:00
Jarek Kobus
be5a77a767 TarPackageInstaller: Connect to done() signal instead of finished()
This should also handle a failed to start case.

Change-Id: I1f85873834c316263d132e357e23654a4bb7777f
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-06-21 08:14:28 +00:00
Jarek Kobus
a613caa234 PipInstallTask: Connect to done() signal instead of finished()
Change-Id: I7a712791a440668c7efb8282d7f035a120c7d719
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-06-21 08:14:16 +00:00
Jarek Kobus
fc16aad2b4 QdbDeviceInferiorRunner: Connect to done() signal
Instead of connecting to finished().

Change-Id: I714c980f558cda3b330e03bb83b30dc7328699a5
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-06-21 08:13:14 +00:00
Christian Stenger
a4c0014b88 Utils: Fix qbs build on macOS using Qt6
Change-Id: I5e8df475fbf1520831cd3ae04f2baa7b81f78fe4
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-06-21 08:06:18 +00:00
Tim Jenssen
97da8a6b5b add CONDITION support to extend_qtc_target
Change-Id: I4d675170386373af14a143cac9c4cef817d0585c
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2022-06-20 16:51:12 +00:00
Marco Bubke
c4e6a6948e UnitTests: Add Qt 6.2 condition
Change-Id: I8b75355390b94a27a98cf8685b7f38217e6a186c
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2022-06-20 16:51:06 +00:00
Jarek Kobus
d7b1e87fac ChangeSelectionDialog: Connect to done() signal instead of finished()
Don't call blocking waitForStarted() and handle failed to start
case inside done() handler.

Change-Id: I6f88703c4ddc2c26af27b449eaa5be9ef087b1a2
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-06-20 16:08:42 +00:00
hjk
01398fb1d4 BareMetal: Use upcoming-standard process exit message
Change-Id: Id90b01eaa3afcf768ae07821c435b1db1680d3cb
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-06-20 15:54:22 +00:00
Jarek Kobus
7ef6a455cd Valgrind: Simplify internals
Change-Id: Ice10c1bf96f3102c6525d37ee7ec25b10604ebb9
Reviewed-by: hjk <hjk@qt.io>
2022-06-20 14:09:48 +00:00
Jarek Kobus
3151ae4845 NimSuggestServer: Connect to done() signal instead of finished()
Get rid of crashed() signal, since the handler of this signal was
doing the same as the handler for finished() signal.

Change-Id: I7cb2d53bbf0bdcea58c2101efe97a82505333740
Reviewed-by: hjk <hjk@qt.io>
2022-06-20 14:06:34 +00:00
hjk
d1b7e90b7d Use Utils::setClipboardAndSelection() more often
Change-Id: I094f07cdb1e5e8c8026bb36d0a486719567641b9
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-06-20 13:41:12 +00:00
hjk
f7e9623369 Utils: Remove one spurious static function from QtcProcess
The next one could probably be merged into FilePath::searchInPath

Change-Id: If32fe77fb19b628a44d212bb8420443bd4f04899
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-06-20 13:35:12 +00:00
Jarek Kobus
3156c33d12 CallgrindToolRunner: Connect to done() signal instead of finished()
This should also handle a failed to start case.

Change-Id: I120a342cb9ec0ec980eae00d357905ca08bac5ed
Reviewed-by: hjk <hjk@qt.io>
2022-06-20 13:25:55 +00:00
David Schulz
591fc12ffa Python: remove static cast of client interface in client constructor
Change-Id: I475a2b79438b8392085f1d9bf2cdb8b7369efa68
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-06-20 13:11:31 +00:00
David Schulz
e74999cced Python: check for pyside tools after installation
Change-Id: Icf9ae0ec08a78efc51216daa3304e76f8e812d5f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-06-20 13:11:07 +00:00
David Schulz
ca47064020 Python: Fix scripts path to global/venv pyside installations
... when checking for pyside tools.

Change-Id: I1aaac9dd9da76f08ada031cc88761dba36c4e3b6
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-06-20 13:10:56 +00:00
Jarek Kobus
3b0add4b16 DeviceShell: Merge done() and errorOccurred() signals into one
Don't connect to QtcProcess::errorOccurred() signal, as it's going
to be removed soon. Rely on done() signal instead.

Change-Id: I28260f8eb77911a23de80512881cf7220f1bc1fc
Reviewed-by: hjk <hjk@qt.io>
2022-06-20 13:07:32 +00:00
hjk
44bb330128 ProjectExplorer: Split RunWorker::appendMessage overloads
... into separate functions. Makes the use of the parameter clearer
and is easier to connect too.

Change-Id: I061b0b5c847ae1e695afc75332e634ddf2576d6c
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-06-20 12:59:38 +00:00
Jarek Kobus
425a0c8835 AutoTest: Connect to done() signal instead of finished()
QtcProcess::done() is also emitted when process failed to start.

Change-Id: I08f6f104014d1c90c0f761de352dada620207d86
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-06-20 12:51:42 +00:00
hjk
5f53b983ff Valgrind: Simplify pid search in remote setup
We have first-hand information nowadays from the process itself.

Change-Id: I99cc61b9c8534740b0eb59a8fabed7e648eb2146
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-06-20 12:47:46 +00:00
hjk
ff6f3dc65d Valgrind: Consolidate message production and consumption
Change-Id: I779f97a658b55f3c79111df1946b8d72863ce513
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-06-20 12:47:29 +00:00
David Schulz
178d555151 LanguageClient: prevent assert in semantic highlighter
Do not send messages to server that are not reachable, but queue the
highlighting requests until the client is fully initialized.

Change-Id: I7da140ec33fb1974d3eaed03110ed85dc3a87594
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-06-20 12:43:46 +00:00
Christian Kandeler
c3f55f6b50 ClangCodeModel: Fix "switch decl/def" for free functions
Fixes: QTCREATORBUG-27731
Change-Id: Ibab872b9d4ecedba097c91ca44d279a1bb8208b6
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-06-20 12:36:28 +00:00
Jarek Kobus
9db4587db5 CdbEngine: Connect to done() signal
Instead of connecting to errorOccurred() and finished() signals.

Change-Id: Id5e92fbccd361c7bce7718704f33e221649ab47b
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-06-20 12:33:51 +00:00
Christian Stenger
fcb2807efa Wizards: Make PySide6 default
Change-Id: I6d84261e56dafcd55b7842e140d9c09935df70a8
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-06-20 12:26:03 +00:00
Christian Kandeler
0fa349237d ClangCodeModel: Special rendering for deprecated completion items
We add the attribute textually and show a warning icon.

Fixes: QTCREATORBUG-2325
Change-Id: Icc0305a703e26c84095167087b30fa3456f97614
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-06-20 12:12:05 +00:00
Christian Kandeler
79b8e5397d ClangCodeModel: Prevent surprisingly late "follow symbol" reactions
It can happen under certain circumstances (high system load, overworked
clangd, ...) that "follow symbol" requests get replied to very late,
with the user having manually navigated to the target document in the
mean time or started doing something else entirely. In such a situation,
it would be disruptive if we were to jump to a symbol suddenly, stealing
the cursor from the unsuspecting user.
We now prevent this by aborting the "follow symbol" procedure if the
user does something else with the document.

Fixes: QTCREATORBUG-20878
Change-Id: Iea52db661e8ba634951b18654a94e4b90580f001
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-06-20 12:11:29 +00:00
hjk
0ae2e48ff1 FakeVim: Fix crash with debug build of Qt 6
915be6606ead2 in Qt base introduced an assert that triggers
occasionally.

This here moves the original check to the fakevim side, without
changing (possibly wrong) functionality.

Change-Id: I435ea53ecc0ba1a905dee2f4e3f8feb3c6dc7db3
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-06-20 12:06:13 +00:00
hjk
c3dcc1ee38 Debugger: Use new clipboard setting convenience
Change-Id: I4bbbff708287a0999c8009b6c2bd91967ee63808
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-06-20 12:05:36 +00:00
hjk
2f54c9a364 Use new convenience function for clipboard contents
Change-Id: I4a856fa53e66d42bc5f08ee79c40ad071d2841bf
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-06-20 12:05:28 +00:00
hjk
74e35d68a8 Utils: Add a convenience function to fill clipboard and selection
Relieves the user code side from repeated code which then tends to
get forgotten.

Change-Id: I079f97a658b55f3c79111df1946b8d72863ce513
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-06-20 12:05:17 +00:00
Jarek Kobus
a13a83b65d ExecuteFilter: Connect to done() signal instead of finished()
Change-Id: I36e8ed92fc57f67da51acc7712a939bf8d7a78c6
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-06-20 11:37:55 +00:00
Christian Kandeler
6fee34887b Valgrind: Fix test build
Amends 25b1c59f74.

Change-Id: Ibbc2ab6aca74e8bffa97bca53909daf2240a3eab
Reviewed-by: hjk <hjk@qt.io>
2022-06-20 10:22:00 +00:00
Christian Kandeler
b6adaab3ea CompilationDatabaseProjectManager: Fix flags extraction
The code would blindly remove all "options" starting with /, which meant
that all file paths arguments got lost on Unix-like hosts.

Fixes: QTCREATORBUG-22949
Change-Id: I43e2b1e57ed0e9ced9da8fa46d98d9ac25f83d13
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-06-20 10:20:38 +00:00
Bartlomiej Moskal
917f0d151b Android: set release flag when signing apk
Currently, signing a package by androiddeployqt automatically implies
the --release option, but there is a fix that removes it from being set
by default. To prepare QtCreator for the upcoming change and not to
change its behavior, we need to manually add the --release option to the
argument list.

Change-Id: I31df1b8252a4444afde95a043848391590f4db82
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-06-20 08:47:30 +00:00
hjk
27ce8d6177 FakeVim: Simplify calling external processes
Change-Id: I5157e2e73654df8bef65d72b7209c487e8b0c881
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-06-20 08:42:51 +00:00
hjk
1bea5708b4 Debugger: Make one manual test deployable to remote linux
Change-Id: Ia61926353e93ae394d3eb2082bb92769967cd958
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-06-20 08:27:37 +00:00
hjk
d783b4d5ff ValgrindRunner: Remove ValgrindRunner::setDevice
The device can now be determined from the debuggee's file path.

Change-Id: I2b24d6e325f74826a644d02a9e418576c4e9b436
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-06-20 08:08:25 +00:00
Jarek Kobus
13c7513024 QueryRunner: Connect to done() signal
Instead of connecting to errorOccurred() and finished() signals.

Change-Id: I57adabc52b38be6b22a4d7380e6fbaaae3192201
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-06-20 08:00:59 +00:00