Commit Graph

69993 Commits

Author SHA1 Message Date
Christian Stenger
99ae8b19e6 QmlJS: Fix build with Qt5.14
Amends af88a7876b.

Change-Id: If3f45922dd822797d477ac8116b4fcbed86c746a
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-07-20 10:11:42 +00:00
Fawzi Mohamed
864c1da05b qmljs: fix order in BoundName
constructor and field order should be consistent

Change-Id: If698fd66cf67ab54c4be1638f19d758a54e33d5f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-07-20 10:10:40 +00:00
Fawzi Mohamed
2f13810633 qmljs: update gen-parser.sh and related patches
ensure that the script works with the current source
* update manual patches
* use reverse patches to simplify updating procedure
* describe updating procedure

Change-Id: I23f8ee5bd73506df03b8b6b75e535170dff5f2b5
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2021-07-20 09:02:25 +00:00
Fawzi Mohamed
af88a7876b qmljs: update Qml parser to parser of Qt 6.2
this is needed (among other things) for
 * null coalescing
 * shebang support

Change-Id: I1b37fd86593f143de8b39c0daf433831a8785568
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-07-20 09:02:15 +00:00
Fawzi Mohamed
dc654cfcba qmljs: use SourceLocation::length in reformatter instead of isValid
isValid becomes more strict in Qt6.2, meaning invalid (default
initialized) SourceLocation.
Reformatter used it to check for absent (i.e. 0 length) tokens, which
might still be valid (according to the new definition) as they mark
the start or end of an AST element.
Thus use length != 0 instead of isValid() in these places.

Change-Id: I4fbc1466ccef6b4b4e2c1d6b5169189b34dc6ae3
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-07-20 08:43:18 +00:00
Christian Kandeler
42fe70b93e ClangdClient: Fix possible crash
Fixes: QTCREATORBUG-26018
Change-Id: Ib93d6067950b548f6d437bb06cc9f11a8246e105
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-19 13:11:33 +00:00
Christian Kandeler
217dfdda7a ClangTools: Fix clang-tidy command-line construction
Fixes: QTCREATORBUG-26015
Change-Id: I2850e6efa5b75748599f55e8b9c96757582f5cb4
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-19 12:12:27 +00:00
Cristian Adam
e1a68f2598 CMakePM: Better path comparison for missing expandable CMake variables
Amends 2d8cd0c90c

Change-Id: I2192dfdd7624917e07a2a1cbda9fc5867add7ab5
Reviewed-by: hjk <hjk@qt.io>
2021-07-19 09:44:01 +00:00
Christian Kandeler
0636238429 CppTools: Do not access kits in non-UI thread
Amends 9c3420120e.

Change-Id: Iba8b1069bf4468119c7f518c562e4229141ac66b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-19 08:40:35 +00:00
Thomas Hartmann
ef8f18fb70 QmlDesigner: Do not instanciate ApplicationWindow
Change-Id: I7a57de60aba72823579e986e9ad6278c4a7e84a8
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2021-07-19 07:53:39 +00:00
Wojciech Smigaj
3af9590db2 Rename "Show Source and Header Groups"
This patch renames the "Show Source and Header Groups" filter to "Hide
Source and Header Groups" for consistency with existing filters such as
"Hide Generated Files".

Change-Id: I34c204f7cae55bab60a50932cf307614987ef2ea
Reviewed-by: hjk <hjk@qt.io>
2021-07-16 19:53:38 +00:00
hjk
486fd8f7d6 Docker: Implement fallback for DockerDevice::directoryEntries()
Change-Id: I57430bc4cf79abfc07ccbe06746a0857e10053da
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-16 14:37:15 +00:00
hjk
5acbe8d9d8 Docker: Implement fallback for DockerDevice::readFileContents()
Change-Id: I89ca268d226019a21bb73a2f039e781d0f595336
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-16 14:09:04 +00:00
hjk
c1d95beef6 Docker: Make fallback code less repetitive
Change-Id: I81762ef7e2ee66e9b053d3fcf8676a7920a63e12
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-16 14:08:51 +00:00
hjk
1bde4ddbec ProjectExplorer: Use FilePaths in project tree nodes
Change-Id: I31b15c428d9b962333947b1e32641fd80f61d069
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-16 13:45:06 +00:00
Thomas Hartmann
a58686cf96 QmlDesigner: Improve .qrc file generation
* Filter for more suffixes and avoid code duplication.
* Always use the project path for file dialogs.
* Allow choosing (existing?) .qrc file.

It is now possible to 'append' to and manage an existing .qrc file.

Change-Id: Ib66751adc49839fd3fae7ac3ee3ae5fa741b7d50
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-07-16 13:11:54 +00:00
Thomas Hartmann
c395e52c2b QmlDesigner: Disallow ApplicationWindow
ApplicationWindow is not properly working in the design mode
and files using ApplicationWindow are usually not written with
the design mode in mind.

Task-number: QTCREATORBUG-25984
Task-number: QTCREATORBUG-25983
Change-Id: Ia30ec26e9078ca0a9c1da11970202983e15ce4c8
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2021-07-16 13:11:47 +00:00
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
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
Eike Ziller
67d85d1592 Bump version to 5.0 RC1
Skipping Beta 2 due to summer slothfulness.

Change-Id: If3ee6c1c218b17d413d2f28023b9fb094a969cdd
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-07-16 09:31:23 +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
Thomas Hartmann
ec8f0ff703 QmlDesigner: Fix testRewriterComponentId
Only attach a single rewriter view.

Change-Id: I5ee4e12c8939e6738803a1d50026ea8b143e9d3b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-07-16 08:45:44 +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
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
Tim Jenssen
9857985013 macOS: workaround for missing libqsqlite.dylib
Change-Id: I667d144035a36aed55f2bdc3e6e021832c058236
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2021-07-15 16:53:49 +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
Thomas Hartmann
361e0f0eb4 QmlDesigner: Fix testRewriterView and add testRewriterView2
The new test testRewriterView2 is a variant with slightly different setup.
We have to wait for the type information to be parsed.

Change-Id: I231b8d13e6be5ad52a8c3b72ebaf81c13a24f782
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2021-07-15 07:53:12 +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
Christian Stenger
75aa1f2a6c Tests: Expect fail
Amends ada39349a2.

Change-Id: I4221590941ba17e28fff1d12bb0c80d92ecac911
Reviewed-by: hjk <hjk@qt.io>
2021-07-15 04:59:38 +00:00
Knud Dollereder
30f6084f0d Execute pixmapChangedCommands only if items have changed
This patch prevents continuous image updates by making sure
to only execute pixmapChangedCommnds if an item is dirty.

Change-Id: Icadc1d8a2a2298d18147b31fbed3fbc4205f0ea8
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-07-14 20:54:29 +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
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