Commit Graph

62421 Commits

Author SHA1 Message Date
Eike Ziller
03b048dc83 Merge remote-tracking branch 'origin/4.15' into 5.0
Change-Id: I5e57cb456e3f501d5182c8db3688c2729e9fadb2
2021-07-09 14:09:12 +02:00
Eike Ziller
c3e413a864 proparser: Update ProItems to state in Qt 6.2
Except for our Qt 5 workarounds with toStringView, qHash return value,
and ProStringList which must be an explicit QVector for Qt 5.

Most importantly that pulls in a change to
   ProString::toQString(QString &tmp) const
from 76004502baa118016c8e0f32895af7a822f1ba37 in qtbase, which replaces
a setRawData call which otherwise leads to severe issues when built with
Qt 6.

Fixes: QTCREATORBUG-25574
Change-Id: I488b4e0b63becc59a4ea34aace5c249921fa1a60
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-07-09 12:05:20 +00:00
Christian Kandeler
792699be06 ClangdClient: Do not send document update requests
... when requesting extra data from clangd.

Change-Id: I3552a2b7e09a1947de6570352936fd45e95f37a2
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-07-09 11:24:57 +00:00
Christian Kandeler
4d3ed0fa93 LanguageClient: Do not send document updates when canceling a request
Change-Id: Ied675bb0eca353fd5ffe26540d99bafb6a874c0d
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-07-09 11:24:13 +00:00
Jarek Kobus
971abe115b Provide initial implementation for ProcessLauncherImpl
The initial implementation is a copy of QbsProcess
with some small adaptations. Start a LauncherProcess
in Creator's main function, just after the creation of
the application object.

Change-Id: I016df3ed664d7914c73f4a35742d5a63d5faaca0
Reviewed-by: hjk <hjk@qt.io>
2021-07-09 11:17:31 +00:00
Henning Gruendl
397f4054c7 QmlDesigner: Fix copy/paste style buttons
Task-number: QDS-4697
Change-Id: I689fcfb2d01f4c13f34044ed06ba2babeca0066a
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-07-09 10:57:01 +00:00
Jarek Kobus
bbe44bf42a Abstract QProcess interface
Abstract part of QProcess interface into ProcessInterface
pure virtual class. The current API of ProcessInterface
is a part of QProcess API used currently to implement
QtcProcess. Provide 2 implementations for it: QProcessImpl
which uses QProcess and ProcessLauncherImpl which is currently
empty implementation with assertions that no method is being
called. Provide an additional switch to QtcProcess c'tor
for selecting the preferred implementation, by default it
selects QProcessImpl. This change doesn't influence any behavior.

Change-Id: Ia5328401affe127f3d36870be8478202d4143480
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2021-07-09 09:39:17 +00:00
hjk
9a03ce80bb ProjectExplorer: Implement FilePath related functions for DesktopDevice
Effectively redirecting to the !needsDevice() branches in the respective
FileUtils implementation.

Change-Id: Ib24f1ff6fe5301323fd1296cc2ffceb0db9e4672
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-09 08:27:05 +00:00
Christian Kandeler
f55d5d8ec1 LanguageClient: Do not re-highlight when receiving the error variant
... of a SemanticTokens message.

Change-Id: I0f6e55d6656c11e7925e3bc4400ea2e575b9f138
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-07-09 07:30:21 +00:00
Christian Kandeler
1f4826a0c4 ClangCodeModel: Clear existing libclang diagnostics
... when clangd takes over a document.
This fixes the problem that temporary diagnostics persisted after opening
a session.

Change-Id: Ic781f83747cabb4d15c2c1f8181e36f4343e0394
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-07-09 07:29:55 +00:00
Christian Stenger
355a91f3e1 AutoTest: Fix displaying description for XML output
CDATA is send in chunks and we lose possible newlines as
we handle the output line by line.
Add it explicitly while processing.

Change-Id: I36bad7f23e2b9b3a5ce9ec92d2d1cb6211dd43a6
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-07-09 06:12:04 +00:00
Christian Stenger
7c56923704 AutoTest: Fix location information of data tags
Broke while moving over to use Utils::FilePath and correcting
the varying usages of name.

Change-Id: I6099f5f0dbc022d831fef78652932d69bd2e4326
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-07-09 06:11:57 +00:00
hjk
2451ba9213 Wasm: Test windows and linux parsing simultaneously
Change-Id: I25e562258125157b07d1fc1a950b5207abbf5d69
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-07-09 05:55:08 +00:00
Eike Ziller
4767dfcce3 qmake: Fix issues with executing system calls
Do not try to reuse the QFutureInterface that is used for the parsing
process. Reusing the QFutureInterface can lead to issues. So far no
problems were triggered, but a30aa4421a
introduced a watcher that tells the qmake parser to ignore all system
calls after the future was canceled. This was somehow, sometimes
triggered on the reused QFutureInterface even though the user didn't
cancel anyhing, leading to all system calls to bail out in the
subsequent run.

Using a new QFutureInterface instance for each parsing run solves the
issue.

Amends a30aa4421a

Fixes: QTCREATORBUG-25970
Change-Id: I6836c97038c36968e93815c6121bc284edbe19bb
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-07-08 12:38:03 +00:00
The Qt Project
455a9dd385 Merge "Merge remote-tracking branch 'origin/4.15' into 5.0" into 5.0 2021-07-08 12:36:57 +00:00
Jarek Kobus
58d00f37d4 Initial import of processlauncher copy from qbs project
Change-Id: I9d646dd1a820e4e69c808998d9f12ff2f5dabe6d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2021-07-08 12:12:10 +00:00
David Schulz
ed199da1df LanguageClient: update outline after document
Do not react on documents contents changes, but postpone the document
symbol request after these document changes were send to the server.

Change-Id: I43ec8f832c6a1fa6471146a5ec6e3e9223b02c91
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-07-08 11:14:53 +00:00
hjk
b998ad621b Wasm: Some steps towards making it work on docker
To start using the docker bits the emsdk location has to
be specified manually in the path selector as
docker://<id-of-image>/<path/to/emsdk>

Change-Id: I70c6e7a334762953c3931105b7f697c608523159
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-07-08 10:28:56 +00:00
hjk
05545adb93 Utils: Change semantics of FilePath::onDeviceSearchInPath()
... and rename it to searchOnDevice().

We need to handle additional search directories anyways, so its more uniform
to always pass a list all of them.

Change-Id: I46c7860b51d11c26db58045ff3ab922148af021f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-08 10:28:49 +00:00
Eike Ziller
9692af87a2 Merge remote-tracking branch 'origin/4.15' into 5.0
Change-Id: Id5c2ab312272eba0ef8c0eb7b26f58913dce0723
2021-07-08 11:44:48 +02:00
Eike Ziller
f16276c792 Merge remote-tracking branch 'origin/5.0'
Change-Id: I368fffe959c10f5942ccb1bcdb1fed4ac1a7460b
2021-07-08 11:16:06 +02:00
Christian Kandeler
eff5cbeb86 CppEditor: Enable/disable outline dynamically
The "outline enabled" property is not static: E.g. the user might switch
on/off clangd support, and then we should hide/show our outline,
respectively.
This also eliminates the danger of null pointer accesses.
Amends c0a44be27b.

Fixes: QTCREATORBUG-25963
Change-Id: I508b9700ba1a99204ea8315546db089486b5d122
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-07-08 09:14:21 +00:00
Leena Miettinen
50f9180cd2 QML/JS Editor: Fix UI text
Task-number: QTCREATORBUG-25915
Change-Id: I96da82dee989cc1833e1219f33cbee072df19f83
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2021-07-08 08:00:33 +00:00
Tim Jenssen
4c878e5700 smallstring: Avoid size_t to (u)int warning
Change-Id: If206f0e3a90694b4e0d50e2d4569e0d6a34cf8ce
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2021-07-07 17:40:04 +00:00
Tim Jenssen
59ac4dbf0d fix msvc Qt6 dev builds
Change-Id: I4264a15c5033b9123c4e97caa86a909e654cef34
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-07-07 17:39:56 +00:00
Tim Jenssen
40d03d1896 Avoid size_t to (u)int warnings with auto, where it is possible
Change-Id: I1ec7454ebce59d99bc828bfd5086907eb0905632
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2021-07-07 17:39:46 +00:00
hjk
d7062b5b92 Utils: Allow additional directories for FilePath::searchInPath
This mimics Environment::searchInPath().

Change-Id: I8c772ed31c31c74b09c7aa0e4912de8586dd2468
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-07 10:43:46 +00:00
Orgad Shaneh
d2aa0f4ed9 Git: Fix regression on cherry-pick
Amends commit 55f768e1b0.

Fixes: QTCREATORBUG-25975
Change-Id: Ie49b64f777bd7155cc226b70c0c473a5ac1ce282
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
2021-07-07 10:16:54 +00:00
Robert Löhning
e065107fa5 QmlJSTools: Guard against null pointer access
Fixes: QTCREATORBUG-25943
Change-Id: If9e6528b0dc5642dbd150e7d20aeb9347f3d4465
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Erik Verbruggen <erik.verbruggen@me.com>
2021-07-07 09:45:52 +00:00
Eike Ziller
0df677f7ac AutoTest: Guard simultaneous access to header cache
It is accessed from multiple threads at once. Guard with mutex to avoid
crashes.

Amends 64ce2a6f43

Change-Id: I5048e5fcdb27b2492656b302775378829b6da013
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-07 08:45:59 +00:00
hjk
eb70e20453 Utils: Add a FilePath::environment
A hook into the system environment of the FilePath's device.

Change-Id: I274032f9e716f3cd8b2e4af2eca010b9805a4568
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-07 07:22:30 +00:00
Eike Ziller
1d05a2b5af Merge remote-tracking branch 'origin/5.0'
Change-Id: Icea9215204a7247c5fbbc818833132676a3b9e11
2021-07-06 16:00:14 +02:00
hjk
4eec360563 Utils: Remove one ProcessArgs::expandMacros overload
Only used once.

Also allow logging of expansion failures.

Change-Id: I357ed6ed28fe379d482358c46b495bc727f86902
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-06 11:36:09 +00:00
Orgad Shaneh
86df204bad Git: Fix regression in log output on Windows
Current path appeared instead of the committer date.

This is probably due to the changes in handling commands. The command has
%cD%Creset. %cD% is interpreted as current directory, unless escaped.

Change-Id: Id564c338dc1f4d882e4449430000b7dcebdd7288
Reviewed-by: hjk <hjk@qt.io>
2021-07-06 08:09:05 +00:00
hjk
7a6c099c08 Nim: Use remote device when searching compilers there
Change-Id: Iab1cb1dbaaf789d2ad328ab70c3dec8839d4ffcc
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-06 07:35:56 +00:00
hjk
10ca1c711e Docker: Partially split out kit item autodetection
Most of it is independent of the docker device as such, this should be
centralized somehow. This here is a first step.

Change-Id: If32063559a4c7c6c3cecf1973e1ef1f634e5f8f4
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-06 06:46:13 +00:00
David Schulz
5d33982513 LSP: reload semantic token if we encounter corrupted data
Change-Id: I73185b0b7be57d348fc1a461b1db0383313d7208
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-07-06 04:58:50 +00:00
Tim Jenssen
e4376e6b3d QmlDesigner: QtTest is a better check
QtQuick.2 was moved to QtQuick in Qt6

Task-number: QDS-4661
Change-Id: I514fcb51c2b46dbef5cc9af79672abc3e86ebbbc
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2021-07-05 19:40:50 +00:00
hjk
1e11f3eade ProjectExplorer: Introduce DeviceManager::defaultDesktopDevice()
Just syntactic sugar to make doing the right thing less painful.

Change-Id: Ia51cda20e5395925215f226b9a379af66fddfd8b
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-07-05 16:00:47 +00:00
Christian Kandeler
2e9604c092 Utils: Do not save file upon PersistentSettingsWriter destruction
The m_savedData member is set on two occasions: Once directly after
reading the same file that is going to be written, and once directly
after a successful file save. In neither case do we have to write it out
again.

Fixes: QTCREATORBUG-25921
Change-Id: Ie369e280f4189aefb6b2ad291426ee9e6f1ed16d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-07-05 15:46:06 +00:00
Christian Kandeler
8cc4bbe4d8 ClangFormat: Prepend a space character to our inserted line comment
Otherwise, we could introduce unwanted syntactical constructs, for
instance if the previous character is an asterisk.

Fixes: QTCREATORBUG-25966
Change-Id: Ic0b535861bc1cb4f5f93d06bb11d0f3c7c583893
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-07-05 15:44:51 +00:00
Orgad Shaneh
dcf692d3ff CMake build: Purge copying settings from Nokia directory
It is not used, and not supported in the other build systems.

Change-Id: I38049e145595490058e255b94cdb8dd13c3f6fb2
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-07-05 14:36:25 +00:00
Tim Jenssen
2eef40bb85 qmldesigner: fix error output at puppet crashes
Change-Id: I6c2a8d655e996e6f935d069a97a45e64ad0ef5b9
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2021-07-05 13:05:02 +00:00
hjk
fd71cbf135 Docker: Properly map back DockerDevice::directoryEntries() result
Even though the file is accessible in the local path, not mapping
back loses its relation do the docker container used for further
decisions like FilePath::needsDevice().

Change-Id: I7c693d604364b9e42bf7310c072be0f33d149626
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-05 13:00:16 +00:00
Marco Bubke
b1fcc4b7a0 QmlDesigner: Relink alias properties
There are still some corner cases but this will be done in follow-up
patches. The link information moved to the typenames table so only
indirections are saved in the propertyDeclarations table. Otherwise
the duplication would increase the database size too much.

Task-number: QDS-4551
Change-Id: I4aca85dd2d803b43aa9860183e500ced2d91141f
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-07-05 12:40:49 +00:00
Christian Kandeler
de2c26f7f5 ClangFormat: Prevent adding/removing lines when indenting
In indentation-only mode, any edit that adds or removes newlines is
wrong by definition.

Change-Id: Ida6e729f4d5e8dcd7893fb2bb9407e596661f942
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-05 11:26:20 +00:00
Orgad Shaneh
84839ee397 Merge remote-tracking branch 'origin/5.0'
Change-Id: Ia018600fb257c9523fc9d15faa5bd8300840e3de
2021-07-05 12:17:45 +03:00
Eike Ziller
21115ae511 Keep "Build All Projects" the first item
like it was before the re-arrangement.

Amends 3bd490acdb

Fixes: QTCREATORBUG-25948
Change-Id: Ia4bd97c95d2976cd52bfcbd40389f6c7360c8109
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2021-07-05 08:55:00 +00:00
Eike Ziller
e3b639047f Don't update extra compilers individually after project load
Each call of CppModelManager::updateSourceFiles detaches the current
snapshot.
The extra compilers where set up and triggered individually, and
resulted in individual updateSourceFiles calls with the single result
file of the extra compiler. For Qt Creator this would lead to 200
calls in quick succession after project load, potentially leading to a
freeze of multiple seconds.

Instead of updating the result files of the extra compilers individually
after project load, integrate the update into the regular project source
file update. So we end up with only a single call of updateSourceFiles.
For this the project updater needs to trigger the extra compilers, and
wait for all to finish as well as the regular project part update,
before
triggering the parser.

Task-number: QTCREATORBUG-25783
Change-Id: I34f6df0fc0f96bcb42ee65019bee39cf49176c1f
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-07-05 08:16:25 +00:00
Christian Kandeler
68846a7729 ClangCodeModel: Provide highlighting via clangd
Note that we lose the highlighting for virtual function calls. We need
to amend clangd to add the respective information to its semantic tokens
message.
Also, Qt properties are no longer highlighted as class members. We'll
investigate how to best restore this feature.

Change-Id: I403712aada3d7a8e1c7b7c1277f43f7f64f8450b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-07-05 07:39:06 +00:00