Commit Graph

62421 Commits

Author SHA1 Message Date
Ivan Komissarov
0032f0ec85 Update Qbs submodule to the top of 1.20 branch
Change-Id: I1b00b572cb009b9b43fe505659fe6821665e46fe
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-09-17 14:32:51 +00:00
David Schulz
cb5eaf4a63 Clangd: remove unused member
Change-Id: Idd95245a6c5b0db37ca30966cb509fc75a4901e3
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-09-17 12:44:22 +00:00
David Schulz
07cfae77ba Clangd: fix opening document with client for project
Using LanguageClientManager::openDocumentWithClient function to assign a
document to a specific server. This function also takes care of
deactivating the document for the old client and opens it if necessary
in the new client.

Fixes: QTCREATORBUG-26205
Change-Id: Idbff154a62d12c432a2cb10d547f78a537e63a3c
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-09-17 12:00:32 +00:00
David Schulz
17b05bc3e8 Clangd: Create correct code assist processor in provider
... for the context of the code assist instead of using a callback from
the text editor.

Change-Id: I636b1b267a944895d4ff732e3c0a8811332ec14f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-09-17 12:00:18 +00:00
David Schulz
6bbbaca696 LanguageClient: export FunctionHint code assist
Change-Id: I57a819b11bb2eb44662c98862643146a686a8c06
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-09-17 11:59:56 +00:00
Thomas Hartmann
e58116169a StudioWelcome: Register help for qtquick3d
Change-Id: I6b5b8da97299341b262d09307a2adb03f7219b83
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2021-09-17 11:44:18 +00:00
Artem Sokolovskii
2d22dbe612 Android: Use FilePath
Change-Id: Ia1cf2a615f0de70038a575f851572e944a9797df
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-09-17 11:37:35 +00:00
Artem Sokolovskii
905325358a FilePath: Add bool to lambda iterateDirectory
Change-Id: I017426a48981da2fbeb32b6d5bee87865d583c0b
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-09-17 11:37:24 +00:00
Cristian Adam
67b8e8f9b1 Reaper: do not disconnect process before reaping
AbstractProcessStep is relying on signals which breaks with
the disconnect call.

Amends ebae255e49

Fixes: QTCREATORBUG-26271
Change-Id: I16ebaad68352be5c41492e5c4d4fbc3f032e2e39
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-09-17 10:26:16 +00:00
Cristian Adam
69475d37fe CMakePM: Populate targets list on add new build step
The target list was recreated when the parsing of CMake project
finished.

But for already configured projects, the list was not used when
a new build step was added. This new step will only get the
targets list when the CMake project would be reparsed.

Fixes: QTCREATORBUG-25759
Change-Id: I54d12a71dacf9fcec2ad0f3e341fe8057880251d
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
(cherry picked from commit a88f1426c3)
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-09-17 09:16:30 +00:00
Cristian Adam
845230166b CMakePM: Allow loading of projects that do not have any targets
Fixes: QTCREATORBUG-25509
Change-Id: I4e56576f0d9fdffa50c81f4901fb30d17952553e
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
(cherry picked from commit 86825283ed)
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-09-17 09:16:12 +00:00
Eike Ziller
118883f66a qmake: Fix crash with Qt 6 when canceling parsing
In Qt 5, QFutureWatcher::isFinished was only true if the finished signal
was already sent. That changed in Qt 6, where it represents the state of
the QFuture instead. Use an explicit bool for representing "finished
signal was sent" instead.

Task-number: QTCREATORBUG-24098
Change-Id: I4dd8e1c7f6659b2856634d522fb1c0f7eef6741b
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-09-17 09:10:50 +00:00
Christian Kandeler
56f9d17d35 ClangCodeModel: Fix an instance of mis-highlighting with clangd
In the expression x.f(), x was wrongly categorized as an output
parameter if f was a static function.

Change-Id: I9167f98916963cdaa4b5ac6ead2c86fab43ad02e
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-09-17 08:48:52 +00:00
Christian Kandeler
b771bdf4c1 ProjectExplorer: Add a cancel option to the rename dialog
... in the project tree.
Also properly handle the situation where the dialog is closed by other
means than one of the buttons.

Task-number: QTCREATORBUG-26268
Change-Id: Ic0b613be2413f96355c1b33bb4753bd1170e0671
Reviewed-by: hjk <hjk@qt.io>
2021-09-17 08:47:58 +00:00
Christian Kandeler
b74b5a3ee6 ProjectExplorer: Do not list files more than once in the rename dialog
... for project tree entries. The same file can occur more than once in
the tree.

Task-number: QTCREATORBUG-26268
Change-Id: I8af1e3a73d54e5a54c858fb3f7a8cf4afa83c7e2
Reviewed-by: hjk <hjk@qt.io>
2021-09-17 08:47:36 +00:00
Christian Kandeler
fc35635942 LanguageClient: Fix possbible crash in inspector
... when clearing.

Change-Id: Iadb57c07562fab77a65bcad38cf509dd1af6c0c3
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-09-17 08:47:02 +00:00
Alessandro Portale
1638c337c1 Welcome: Remove spacing between the link buttons on Welcome screen
The 5-pixel spacing causes the sensation of flickering while hovering
over the buttons. Other elements on the welcome screen (recent projectsm
sessions, etc.) don't have spacing, and therefore, the hovering feels
"smoother".

This change removes the spacing and compensates that by increasing the
link height accordingly.

Fixes: QTCREATORBUG-26275
Change-Id: I0159d65d941971c169faf2f156cd4f8c0ddd365c
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-09-17 08:45:13 +00:00
hjk
6c4c310278 Debugger: Expand Variables in Debugging Helper Customization
Fixes: QTCREATORBUG-26261
Change-Id: Ie034e3b170bad2ccd4aaa4c004c8eeeebeeaff87
Reviewed-by: Karsten Sperling Opdal <karsten.s.opdal@gmail.com>
Reviewed-by: hjk <hjk@qt.io>
2021-09-17 05:54:31 +00:00
Cristian Adam
86825283ed CMakePM: Allow loading of projects that do not have any targets
Fixes: QTCREATORBUG-25509
Change-Id: I4e56576f0d9fdffa50c81f4901fb30d17952553e
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-09-16 17:35:18 +00:00
Cristian Adam
a88f1426c3 CMakePM: Populate targets list on add new build step
The target list was recreated when the parsing of CMake project
finished.

But for already configured projects, the list was not used when
a new build step was added. This new step will only get the
targets list when the CMake project would be reparsed.

Fixes: QTCREATORBUG-25759
Change-Id: I54d12a71dacf9fcec2ad0f3e341fe8057880251d
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-09-16 16:35:55 +00:00
Christian Stenger
49c8471ef2 ClangTools: Adjust test files
Qt6 handles multimedia and multimediawidgets as add-on modules,
so they get installed only if explicitly checked while installing.
Make them optional for testing Qt6 as well.

Change-Id: I33b0686a61bf20ace790aa0c2bc27a5219d30aac
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-09-16 14:28:55 +00:00
Christian Kandeler
de8c90e9d9 Meson: Fix autotests
Change-Id: I5f690efe9db19ef8ae6f86ed5556b4939bb52a05
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2021-09-16 13:26:37 +00:00
Mahmoud Badri
eb870fb5c4 QmlDesigner: Include the ID in the invalid ID message
Change-Id: Ieacf36991cbe5e5f96cdc8dc26413cbbaec25608
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-09-16 13:22:46 +00:00
Christian Kandeler
7c5a830111 CompilationDatabaseProjectManager: Fix unexpected double emit of signal
Do not rely on QFutureWatcher::isFinished(), which triggers a crash in
the plugin unit test with Qt 6 (race condition?).

Change-Id: I379d894ebd4a28a64b1e70e0cee6eef9ab720a14
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
(cherry picked from commit 32541fef3b)
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-09-16 12:44:13 +00:00
Marco Bubke
8c30b29d76 QmlDesigner: Decrease timeout for capture image
It was 10 min. Now it is 10 s.

Task-number: QDS-5077
Change-Id: I703721d08631590102611c5779929fdeae47d971
Reviewed-by: Knud Dollereder <knud.dollereder@qt.io>
2021-09-16 12:31:01 +00:00
Christian Kandeler
d5ebefd0df CppEditor: Highlight strings in the basic highlighter
... in the context of #include and #define. These are not highlighted
with clangd.
Amends 99790aaa42.

Change-Id: Ia86f8606d9c1d72ff9f59909e36bfd0c44704b04
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-09-16 09:37:35 +00:00
Christian Kandeler
44912450f4 KSyntaxHighlighting: Streamline qbs build
We don't have to build all the source files, and with Qt6, we can't.

Change-Id: Ica16e90160cf4a90612f7bba28a1140d4e8c70a2
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-09-16 09:32:06 +00:00
Christian Kandeler
ad23d86b41 ClangCodeModel: Make use of clangd's non-const ref parameter tagging
clangd 14 will tag non-const reference parameters for us (https://
reviews.llvm.org/D108320), so let's make use of that at least as a
shortcut.

Change-Id: I0162b5d7b9fecc3e6ce0338e896980cd5b363ceb
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-09-16 09:09:51 +00:00
Christian Kandeler
bcfe229f8b ClangCodeModel: Get document symbols immediately
... when doing a decl/def switch via clangd.
The delay is fine for e.g. populating the outline, but shouldn't be used
when dealing with explicit user requests.

Change-Id: I0350ed6daf8220ec3b702a3876fbf0f726da8a67
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-09-16 09:09:27 +00:00
Assam Boudjelthia
b9add29ae0 Android: Handle Qt 5 CMake projects target build dir retrieval
This makes sure that Qt 5 CMake android projects return the build dir
and not the android build libs folder.

Change-Id: I675e2ea2946beb63bbe08b9bf4b7d9603c386f09
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-09-16 08:41:33 +00:00
David Schulz
4324f3e8c1 Editor: pass AssistInterface to createProcessor
The interface can be used for checking the context of a codeassist
request to determine
the correct processor that has to be created.

Change-Id: I47ddb05c46399566e27bae21711f11a3a4132c3f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-09-16 08:25:36 +00:00
hjk
897d3349fa Valgrind: Bring back label for suppression files list in settings
Also, top-align it again.

Change-Id: I33ac6e44fd1d47c262e5473a17dea997fa5d1b71
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-09-16 07:55:05 +00:00
Christian Kandeler
32541fef3b CompilationDatabaseProjectManager: Fix unexpected double emit of signal
Do not rely on QFutureWatcher::isFinished(), which triggers a crash in
the plugin unit test with Qt 6 (race condition?).

Change-Id: I379d894ebd4a28a64b1e70e0cee6eef9ab720a14
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-09-16 07:23:25 +00:00
Christian Stenger
64e438ed83 Docker: Implement directoryEntries alternative
Use 'find' on a docker image to search for diretory entries
if it is available.
If the find call fails we still may fallback to using 'ls'.
This silences currently active soft asserts regarding the
usage of sort or file filters when we are able to use 'find'.
Only support the most common and currently used options and
bark if some unsupported option is in use.

Task-number: QTCREATORBUG-26258
Change-Id: I9a082ea7aca1b6db7dcb668cfe40ed0ed48cd567
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-09-16 06:18:59 +00:00
Henning Gruendl
aa0a682c11 QmlDesigner: Fix floating dock widget behavior
Fix floating dock widget being covered by the main window if not having
focus on macOS.

Task-number: QDS-3144
Change-Id: I25230819a567a5582b97a0a52f0e46594dbab6ea
Reviewed-by: Knud Dollereder <knud.dollereder@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2021-09-15 14:05:44 +00:00
Jarek Kobus
844cfe70b7 Valgrind: Fix parsing of remote pid
Before we have matched actually "grep valgrind" process pid
and the intention was to match valgrind process pid itself.

Change-Id: I87576aa6fcf4ac302feb28f046421f7c21c1bcb4
Reviewed-by: hjk <hjk@qt.io>
2021-09-15 13:04:33 +00:00
Artem Sokolovskii
464f665735 FilePath: Add const to iterateDirectory
Change-Id: I49c1366ca16ca295d0f54a17740a501a6d7a9442
Reviewed-by: hjk <hjk@qt.io>
2021-09-15 11:41:07 +00:00
Assam Boudjelthia
a2b6dba0bc Android: fix for retrieving the path to deployment file and build dir
The Android deployment file for CMake project was constructed based
on the main project target and thus was always expecting the file
to be under the build folder root path. This makes sure the correct
path to the output path is retrieved.

This practically different problems with running examples when the
main project is a Qt module, for both qmake and cmake.

Fixes: QTCREATORBUG-25793
Change-Id: I5fdedd94c7c4c84c351c28476ca14b0f95f99f22
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-09-15 11:02:21 +00:00
Artem Sokolovskii
d543ab0fbd FilePath: Add function which iterates through the directory
Change-Id: Iaebd2b08341781307b98b6aae61b0b44b127ce18
Reviewed-by: hjk <hjk@qt.io>
2021-09-15 10:51:45 +00:00
Eike Ziller
342a24d56a Merge remote-tracking branch 'origin/5.0'
Change-Id: I0ef7cd302ba7cba64fec401f3426dd682b8dc036
2021-09-15 11:18:11 +02:00
Christian Kandeler
1206ac03cc LanguageClient: Do not update semantic tokens on every document update
Due to the potential cost of the re-highlighting procedure, we'd like to
delay the semantic tokens update request to a time where the new token
information won't get invalidated right away due to further document
changes. While the document updates in principle have such a delay
already, it is often "sabotaged", for instance due to auto-completion
requests which require the server to know the current document contents
right away.
Therefore, we request new semantic tokens along with a document update
only if it's the "regular" delayed one, and otherwise add an additional
delay.

Change-Id: I074647d1cdfdbcc6aa5fc5ec2a2d5ae6ccd493ba
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-09-15 09:12:18 +00:00
Christian Kandeler
2b09c81682 TextEditor: Handle context help requests like tooltip requests
That is, don't just ask one random hover handler, but try all of them
and use the best one.

Change-Id: I38d0a90e96090c56240314a90f0f428c88fd222c
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-09-15 09:11:29 +00:00
Christian Stenger
0f58258e04 AutoTest: Silence soft assert
We synchronize the test tools now earlier and may
not have finished setting up the configuration of
the current project.
This means the project might have no valid target
yet.
Amends 481070d808.

Change-Id: Ic0c1817318a343e68587930c492397a6094a4ce2
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-09-15 08:13:54 +00:00
Piotr Mikolajczyk
41f4313012 Add const to getters
stdErr, stdOut and exitMessage made const

Change-Id: Ia84d1441d632e4e08c24f817c6bdf742c154bed7
Reviewed-by: Alp Öz <aoz@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-09-15 07:52:35 +00:00
Eike Ziller
877bfa4056 Add FileSystemWatcher::clear()
Change-Id: I9f28e763c943a6d8c5cf3082755e64d7e4df7155
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-09-15 06:40:38 +00:00
Mahmoud Badri
7fe61d1f97 QmlDesigner: Provide a descriptive message for invalid IDs
Fixes: QDS-5044
Change-Id: I12f78851f5200e417fe6f323a0773587400cd90f
Reviewed-by: Johanna Vanhatapio <johanna.vanhatapio@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-09-14 18:47:54 +00:00
Christian Kandeler
30cbda2b2d LanguageClient: Improve use of Client::m_documentsToUpdate
In particular, calling keys() and then take() for all the keys is
wasteful (and obscures what's going on).

Change-Id: Ic66803cf3579a39c23c32f1fc65e2c9399dcc583
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-09-14 12:50:22 +00:00
David Schulz
e397394090 CMake: skip auto-setup.cmake for docker kits
Change-Id: Iaf9e98f8368167b0e665687a118f29d196c20941
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-09-14 12:30:41 +00:00
Eike Ziller
1d466499f6 Fix bug in mime type magic rules with Qt 6.2
There was a bug in the copying and comparison of mime magic rules, that
did not copy/compare the sub-rules.

With Qt 5 this was probably never actually used, because we save the
magic rules in a QList, and that didn't use MimeMagicRule as "values",
but internally used pointers to heap-allocated objects, so e.g.
appending a list of rules to another list of rules would only copy the
pointers to the actual objects (as long as the items were never
modified).

In Qt 6, QList has the same semantics as QVector, so MimeMagicRule is
actually used as values, which uses the copy operations. As a result,
the moment the MimeMagicRule was copied from the parser to the mime
type, it would loose its sub-rules. Which breaks the whole mime magic
logic, and leads to wrong mime type resolution, e.g. for *.ui files.

Change-Id: I90c46264423f18f73a6efc01887a0b8b6199d35d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-09-14 12:21:34 +00:00
David Schulz
1831a7a6ad Core: use default icons for remote FilePaths
Change-Id: Iecf4b7c9498bd7f3ddca9455b2e5b9886e86628f
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-09-14 11:44:54 +00:00