Commit Graph

62421 Commits

Author SHA1 Message Date
hjk
11a40e02f2 Utils: More remote file use in PathChooser
Change-Id: I5db0e24d6cb3058c2b3c0d45b3eb362124cdd190
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-07-16 11:43:49 +00:00
hjk
d06c670504 Utils: Introduce a FilePath::withNewPath() convenience method
It's effectively the mirrored version of onDevice() with an
equally odd name which is a bit more straightforward to use
in some cases.

Change-Id: I0cfedeb58871a857c93144e2a0d734bad1bcd887
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-16 11:13:14 +00:00
Eike Ziller
13e8a9a136 Merge remote-tracking branch 'origin/5.0'
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri

Change-Id: I5dd6bd7d7e71c84a43b33c0aded673f3c4a57ef8
2021-07-16 12:48:19 +02:00
Jarek Kobus
7e747e25bb Pipe readyRead() through the CallerHandle
In this way the output and error channels
get handled while waitingFor* is being executed.

Change-Id: I8d3d81bd99fcfb7ddea7e98337e859446380055f
Reviewed-by: hjk <hjk@qt.io>
2021-07-16 09:55:48 +00:00
Christian Kandeler
842770b6b5 TextEditor: Fix path to code styles
Was broken by c1f90aeca2.

Fixes: QTCREATORBUG-25989
Change-Id: I91879e0adb3cd90be8abddd6a1ca02364b8b9fce
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-07-16 09:33:06 +00:00
Alessandro Portale
5c37fb1f65 QmlProfiler/PerfProfiler: Restore support for Qt >= 6.2
First (try to) add the target as Qt Creator plugin, *then* check whether
it exists.

Amends: 5aff1419fa

Change-Id: Ia7c318c0ffb7bbaa21159ddf9de88b80ad0033cb
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-07-16 09:23:35 +00:00
Christian Stenger
ae16958fd8 Docker: Improve marking daemon problems
Small positive exit codes can result for different reasons.
Real docker issues result in small negative exit codes.

Change-Id: Ibd800b7806f3014ffccd39638c06b2dd93e8a5a1
Reviewed-by: hjk <hjk@qt.io>
2021-07-16 08:26:45 +00:00
Christian Kandeler
34a1971ede Clangd: Allow more fine-grained logging
Change-Id: Ia882575a3b6babd0945ef60be08b152428d3f39d
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-07-16 08:18:30 +00:00
Alessandro Portale
5aff1419fa Tracing: Restore support for Qt >= 6.2
First (try to) add the "Tracing" target as Qt Creator library, *then*
check whether it exists.

amends: f29d7b896f

Change-Id: I931e3ff632324faf4c6e07e8e083f00c55df197f
Reviewed-by: hjk <hjk@qt.io>
2021-07-16 08:11:20 +00:00
hjk
b841d79e28 Merge remote-tracking branch 'origin/5.0'
Change-Id: I8ecb4ab5cb5754e26de3c446abed2386c42305d6
2021-07-16 09:56:01 +02:00
Jarek Kobus
f7cf48bc28 Refactor process launcher
Move launcher process into a separate thread.
Implement blocking API by using wait condition
on the caller's side. Replay all collected
signals from the launcher's thread when leaving
waitingFor* state. In case we were not waiting
for anything deliver the signals asynchronously
from launcher's thread to the caller's thread.

Change-Id: Id44fe5f7ceaac407004984a1dfb6ea65f197d297
Reviewed-by: hjk <hjk@qt.io>
2021-07-16 07:52:58 +00:00
hjk
4a08edf78d QMake: Use FilePath::resolvePath to resolve files
Works with remote files, too.

Change-Id: I90244e456633aec1c2a750b4be3c707efeede42c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-16 06:48:50 +00:00
hjk
cb96b1f89b Debugger: Make version autodetection work with remote instances
Change-Id: I8a532a81beebc5a0080e63f1cf76db7cbf81c52b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-16 06:46:56 +00:00
hjk
38f23a9a4a Utils: Make FilePath::resolvePath() work with remote paths
QDir::cleanPath() destroys the :// separator.

Change-Id: I9a4d7cb93fba8a16f6fbbf94fa934459e3667a43
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-16 06:39:14 +00:00
Wojciech Smigaj
9d3100ff1e ProjectTree: Merge descendants of hidden Sources and Headers virtual folders
Unchecking the recently added "Show Source and Header Groups" option removes
the Sources and Headers virtual folders from the Projects tree. This patch
additionally merges descendants of these folders with identical priorities,
display names and file paths.

For example, if a project contains a folder including both source and header
files, both the Sources and Headers virtual folders will have child nodes
representing that folder. Previously, unchecking "Show Source and Header
Groups" kept both these identically named nodes in the Projects tree (one
containing sources, the other headers). With this patch, these nodes are
merged into a single node containing both sources and headers.

Change-Id: I4786eee4a528ea141a7fe117e14a050f68411890
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-07-15 19:45:03 +00:00
Alessandro Portale
f29d7b896f Restore support for CMake < 3.11
Prior to CMake 3.11, the SOURCES could not be omitted when
calling add_executable.

This change ensures that SOURCES are passed, at least when
building against Qt < 6.2.

Change-Id: I83bd82fe12364523ce6954d145b632df7210d118
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-15 19:29:14 +00:00
Christian Stenger
037d1283be Docker: Disable msvc toolchain detection on container
This avoids detecting desktop toolchains as on device and
mixing them up with toolchains used inside kits.
This also disables clang-cl toolchains on device as they
are Windows specific as well.

Change-Id: Icd098d605e3bcf8015f96fbef90e9f9ae2496603
Reviewed-by: hjk <hjk@qt.io>
2021-07-15 14:21:31 +00:00
Eike Ziller
64da7b15d9 Disambiguate the build actions in locator and shortcut settings
By setting a whatsThis text and using that in locator.

Amends 3bd490acdb

Fixes: QTCREATORBUG-26002
Change-Id: I55c196456eb0eaec880da4479a0a75105f649b01
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-07-15 13:50:33 +00:00
Christian Stenger
88310df13d Docker: Handle docker daemon
Avoid calling the docker daemon again and again
if it is currently not running.

Change-Id: I17afa2eca098589bd362149d18e090252ef83f6e
Reviewed-by: hjk <hjk@qt.io>
2021-07-15 13:21:23 +00:00
Alessandro Portale
f787afe732 Tracing: Fix a couple of warnings regarding parameter injection
Parameter "XYZ" is not declared. Injection of parameters into signal
handlers is deprecated. Use JavaScript functions with formal parameters
instead.

Change-Id: I3aea1af6bb6559f26dc83b8c20ada11885b715f9
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
2021-07-15 12:42:22 +00:00
Eike Ziller
92b5afc3de Merge remote-tracking branch 'origin/5.0'
Change-Id: If0cbc808d2c466aee81a77b3c078bac7a3d1e4cb
2021-07-15 09:48:08 +02:00
Marco Bubke
20d349b70b Sqlite: Improve compile error message
Change-Id: Ifbe778b32d066ed2b86405a4cbfd328e7abcc800
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-07-15 07:05:05 +00:00
Marco Bubke
a30775a19e QmlDesigner: Prevent prototype chains cycles
A cycle would lead to an endless loop. So we throw an exception for
synchronization. Maybe we can add later more information to user so
he can easily resolve the error.

Task-number: QDS-4457
Change-Id: I83092ccdff030a610942c155571a0bfa899e808c
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-07-15 07:05:00 +00:00
Marco Bubke
a8d6bb06df QmlDesigner: Avoid writes into the project storage
If the values are the same we should avoid writes to the database
because they are not so cheap. Also recognize that "IS NOT" is used
instead of "<>" because we want to test for null values too.

Change-Id: I6699c6c40ad42f5d07910905b10cc7d423373320
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-07-15 07:04:56 +00:00
Christian Stenger
4103dfd6c2 AutoTest: Ensure we construct a file path
The original check that prevented constructing a directory
will be removed.

Change-Id: Ifb7960bfc245b120513ef65a1764ca60c5108093
Reviewed-by: hjk <hjk@qt.io>
2021-07-15 06:58:28 +00:00
hjk
7bba3f7d6f Utils: Remove odd check from FilePath::resolvePath
Change-Id: I824b2abd722da1e6a240394bee6578ffb028fb17
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-15 06:56:03 +00:00
hjk
cc1375baa1 Wasm: Only detect toolchains from the emsdk installation device
Change-Id: I910365c6e02e714adf1a233b42df86110cf65a0a
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-07-14 15:01:40 +00:00
Jarek Kobus
3527ea8942 Pass the OpenMode to process launcher
Change-Id: I8f2c344999c17a5b25a12ec16b2fe1d7b2481893
Reviewed-by: hjk <hjk@qt.io>
2021-07-14 14:25:07 +00:00
Jarek Kobus
10668b39ce Implement ProcessLauncherImpl::waitFor*() methods
Change-Id: I68b77300e77701e527079cecee4d92411f15be14
Reviewed-by: hjk <hjk@qt.io>
2021-07-14 14:24:05 +00:00
Jarek Kobus
a0857706c0 ProcessStartedPacket: Initialize processId
Change-Id: I052dcb251b59f6624ef90789fab604b768cd7150
Reviewed-by: hjk <hjk@qt.io>
2021-07-14 14:23:08 +00:00
hjk
86149d9299 Utils: Avoid a use of FilePath::toFileInfo() in FileInProjectFinder
Doesn't work with remote files.

Change-Id: I04a837013520f4f872599d0bb957c6da7ad9bf02
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-14 13:43:44 +00:00
Eike Ziller
426f8185c2 ProjectTree: Improve performance of finding nodes
Using projectNode->forEachGenericNode(...) to find a node is much slower
than using project->nodeForFilePath(...), since the latter uses a binary
search.

Fixes: QTCREATORBUG-25845
Change-Id: I91be577a11b03915d1f21fe86a4cdd9ab0381f51
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-07-14 13:43:23 +00:00
hjk
098e616512 CMake: Fix restoration of remote cmake tools
So far this only worked accidentally for cases where a local cmake
was available in a similar place.

Change-Id: I089d2774b3fde00cf369b5524bb98023b6f1aadb
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-14 13:33:17 +00:00
hjk
3cdeb1a119 Utils: Fix FileChooser error marking for directories
Amends  b84c8cf892.

Change-Id: I108110cc682d331947c8eb47f62121ed02cd45f9
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-14 13:28:31 +00:00
Christian Stenger
b0e0b3ecda CMakePM: Use Utils::FilePath for accessing cmake tools
When storing the cmake tools we otherwise drop auto detected
ones when failing to access them locally.
This makes the cmake tools on docker devices persist on Windows
as long the docker daemon is running.

Change-Id: I5235cf00aff49359a2e20ddc1667bcbb99337092
Reviewed-by: hjk <hjk@qt.io>
2021-07-14 13:27:55 +00:00
David Schulz
5c5e9bd339 LanguageClient: reset assigned documents on shutdown request
Allows to reassign the documents to another server before the old server
is completely shutdown.

Change-Id: I20538c317a7664523f55073736eb22d96def8df8
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-07-14 13:17:20 +00:00
hjk
f8c7d2e848 Docker: Rework auto-detection and removal of kit items
- Use more uniform messages for the different kinds of items
- Remove all auto-detected items

Change-Id: I0b0df0bca484337039432b163bd8e19593b1cd22
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-14 12:55:53 +00:00
hjk
5d17ff7a67 Docker: Make temporary messages shorter
Kinder to the translators.

Change-Id: If9c7eb265b2f86fec274e9db7b0d76424cd703cc
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-14 12:21:34 +00:00
David Schulz
addba5ecbe LanguageClient: fix compile on mac
Change-Id: Idb2da69ed551d55f1b7ff0e8d80b85b89f073fc2
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-07-14 12:15:11 +00:00
Christian Stenger
d61600a8e2 Docker: Disable merged channel access for Windows
This is not supported and anything related to accessing
merged channels on Windows fails due to the need of
using wsl or a named pipe.
On the downside this may crash QC in cases where e.g.
Qt detection still tries to handle qmake as if running
locally, but at the current state this seems to no more
happen automatically (e.g. when using the auto detection).

Change-Id: I983cad66c1210de38a33e26958857a5dcaeef767
Reviewed-by: hjk <hjk@qt.io>
2021-07-14 11:52:03 +00:00
Christian Stenger
f490ea44fd QtSupport: Fix compile
Amends 22121885fe.

Change-Id: I1758e04561192855340dd5e850d8ddd498eff8b3
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2021-07-14 10:53:15 +00:00
Marco Bubke
e9407c23fa QmlDesigner: Relink prototypes
Task-number: QDS-4552
Change-Id: Ibb0d0048c114e100c215493bc9d633d4dbe3c4e0
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-07-14 10:44:57 +00:00
Marco Bubke
32fd70ce3c QmlDesigner: Handle more corner cases for alias relinking
Synchronization should always throw an exception if it gets in an
inconsitent state.

Task-number: QDS-4551
Change-Id: I8c55198115aa79b676a13fe0cd7ab225fb6723d5
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-07-14 10:44:52 +00:00
Eike Ziller
f08bd9df91 Merge remote-tracking branch 'origin/5.0'
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri

Change-Id: Iba1e6cacaebf9bb4653ac77e981ddacaf729c52c
2021-07-14 12:20:35 +02:00
hjk
324ff024d7 QtSupport: Rename BaseQtVersion::autodetection* to detection
It's also used for manually triggered detection nowadays and
closer in naming to what kit, debugger and kit have.

Change-Id: I68705aafe297d61afc8b5918650e47353d3ccce1
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-07-14 10:19:05 +00:00
hjk
b84c8cf892 Utils: Allow remote paths in PathChooser
At least for the red marking of valid/invalid.

Change-Id: I91f856f93ba74f6b62a540322c2445691afbf170
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-07-14 10:06:03 +00:00
Tim Jenssen
22121885fe baseqtversion: commands are FilePathes
also renamed the qmlscene* qmlRuntime*

Change-Id: Ifd522e21f5ce30aaa54060fdcebee2cd8b9463c4
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2021-07-14 09:50:01 +00:00
hjk
a4c05f585f Docker: Move some cmake detection logic to cmake plugin
This make the code better re-usable from other places that
wish to put a cmake version into a new kit.

Change-Id: I1ef7770a7f8efa36e88b2f3862b011fecd38de98
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-14 09:41:30 +00:00
Christian Stenger
f922d22ad4 AutoTest: Fix constructing of source file path
Changes in Utils::FilePath need some adjustments to fix the
expected behavior.

Fixes: QTCREATORBUG-25979
Change-Id: Ife35a68458db9ae7c08637687a3fc9acd7d058e9
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-07-14 09:39:51 +00:00
hjk
7b7fb9f6c7 Debugger: Code cosmetics
Namespaces, names, ...

Change-Id: Id0b65585b8849e8bb47d63f6eba1c23b9db1a2c2
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-07-14 09:31:46 +00:00