Commit Graph

70865 Commits

Author SHA1 Message Date
Leena Miettinen
73fa76f776 Doc: Remove info about Qt Quick Designer plugin from Qt Creator Manual
Fixes: QTCREATORBUG-26321
Change-Id: I8738cbdc56d6469a4d133b17741871787e0cba9f
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-10-18 07:21:39 +00:00
Orgad Shaneh
badc1f8551 Debugger: Use correct macroExpander when substituting regexp
Change-Id: I1d17063044b0e0e52b055a3e53b214f311cf6008
Reviewed-by: hjk <hjk@qt.io>
2021-10-16 16:43:36 +00:00
Jarek Kobus
10a6497146 Sync mimeglobpattern sources with Qt
The optimization for VdrPattern and AnimPattern speeds up
loading of Qt6 project with further ~200 ms.

Change-Id: I28451a627d6c509854907736da48efcf68a86019
Reviewed-by: hjk <hjk@qt.io>
2021-10-15 15:03:03 +00:00
Christian Kandeler
13bca02801 ProjectExplorer: Clean paths in OutputLineParser::absoluteFilePath()
Fixes: QTCREATORBUG-26422
Change-Id: I350bbd076007647c4de21db08f2b034d654eb812
Reviewed-by: hjk <hjk@qt.io>
2021-10-15 14:57:38 +00:00
Mahmoud Badri
a746510937 StudioWelcome: Fix studio welcome plugin crash
crash introduced by ea8400a9ff

Change-Id: I7302e71076634caaf68dd52cf61451110629ce0d
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2021-10-15 13:54:29 +00:00
Christian Kandeler
5f1e6b15bf LanguageClient: Only present snippets in addition to proper completions
Prevents spurious suggestions of snippets and is in line with what we
did for C++ so far.

Change-Id: I54e11b6567f00938f9aa7dfe771547471e87439c
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-10-15 12:46:32 +00:00
Christian Kandeler
097efa58ba ClangCodeModel: Add some clangd completion logging
Change-Id: I35dea3ad2815683181eb5dfbe1ea7d985037f55c
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-10-15 12:39:12 +00:00
Orgad Shaneh
52f9db1ae0 GDB: Expand macros on substitute paths
Change-Id: Ifb7a7f007a7c46045d7c315c02c8309f0a599dbc
Reviewed-by: hjk <hjk@qt.io>
2021-10-15 12:09:54 +00:00
Orgad Shaneh
dafc32d8e2 GDB: Do not pass regular expressions to set substitute-path
Change-Id: If647e2d12b261ba2137c952640dfdb3a984fcfbf
Reviewed-by: hjk <hjk@qt.io>
2021-10-15 10:55:24 +00:00
Alessandro Portale
cab210ad36 WebAssembly: Call emrun.py directly instead of via the wrapper script
From now on do on Linux and macOS what was already done on Windows in
order to launch a WebAssembly program: Directly call the emrun.py python
script instead of indirectly via the wrapper shell script.

The wrapper was too fragile. Also, this change consolidates the code
paths on the three host platforms a bit.

Fixes: QTCREATORBUG-25905
Fixes: QTCREATORBUG-26189
Change-Id: If79567e4dc688de460b38daa479becb53d3c5f03
Reviewed-by: Juha Vuolle <juha.vuolle@insta.fi>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-10-15 10:12:22 +00:00
Christian Kandeler
40f863b9cf LanguageClient: Allow to log to console rather than message window
And make use of that in ClangdClient.
When I get a slowdown while typing, it is usually accompanied by the
clangd message "Request cancelled because the document was modified"
occurring in the message window, often many times in a row. I'd like to
find out whether writing to the message window itself is a contributing
factor to the slowdown.

Change-Id: Iff7c459af0aed27d22366b9aade573f51eb5dbc7
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-10-15 09:26:37 +00:00
Christian Stenger
a0a1495d20 Update qbs submodule
To HEAD of 1.21.

Change-Id: I748ee0bb38bcdd692316c5379946fe9d4d72d7ff
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-10-15 08:54:05 +00:00
Christian Kandeler
fe4a033a44 ClangCodeModel: Improve completion with clangd
Namely, do not duplicate parts of the to-be-completed item (including
parentheses) that already exist at the cursor position.
The code is taken from ClangAssistProposalItem; I had left it off in the
original implementation, because I mistakenly assumed that clangd would
handle this situation itself.

Change-Id: I216f5d507a54db90cd23af2fadb26060dbc4a735
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-10-15 07:55:22 +00:00
Christian Kandeler
c4256a9a2b CppEditor: Squash three copies of the "is in comment or string" check
Change-Id: Id6c4e35ae2d3b3031e5c95ea04f5b971bef58389
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-10-15 07:54:51 +00:00
Christian Kandeler
9234bc369b ClangCodeModel: Fix highlighting of user-defined string literals
... with clangd.

Task-number: QTCREATORBUG-26425
Change-Id: I805ed5a68a990528ef20dcac015591a2a600066b
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-10-15 07:54:28 +00:00
Christian Kandeler
9c86e6746f CppEditor: Prefer target flags from the build system
The build system has in-depth knowledge of how to build the project and
is therefore a much more reliable source of information about the
concrete target triple than what we extracted generically from the
toolchain.

Fixes: QTCREATORBUG-25615
Change-Id: I820f8dd99da3832326308510a50aa7cbb4aa8fdb
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-10-15 07:52:38 +00:00
Miikka Heikkinen
f91b64f645 QmlDesigner: Add item library icons for Component, Loader, and Repeater
Task-number: QDS-5063
Change-Id: If397b89e22b626c210bffece0e66041b043f2897
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-10-15 07:44:40 +00:00
Assam Boudjelthia
f36ab58451 Android: Align api and revision columns to the right
Change-Id: Ib6e0d1e0b6922cfe5b90e320b25b2dce2dcaba14
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-10-15 06:47:14 +00:00
hjk
fcc981937f Debugger: Expand macros in "Additional Startup Commands"
Fixes: QTCREATORBUG-26382
Change-Id: I43cc2ac9451dbb44bcc12ed8555535fb8b4e437e
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-10-15 06:22:59 +00:00
hjk
8938864876 FakeVim: Use setEnabler for the vimrc path aspect
This fixes the enabling/disabling of the line edit and triggers the
(re-)read of the .vimrc at the right times.

Change-Id: I13a022aafc23ea761d3c1c4d0359cc5f137695d5
Reviewed-by: Lukas Holecek <hluk@email.cz>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-10-15 06:22:25 +00:00
Orgad Shaneh
5365dd531b Fix some MSVC warnings
* Implicit conversion of size_t to int
* Comparing bool with operator >

Change-Id: I4bc5bef57bfa0125b1c82953a7a2cfc24066bc8c
Reviewed-by: hjk <hjk@qt.io>
2021-10-15 06:22:23 +00:00
Christian Stenger
e1a15b2db5 QmlJS: Soften strict equality check
Judging on the sense of a strict equality check depends on
different aspects. As attached properties cannot be inspected
easily and e.g. function calls cannot be evaluated as they may
have different return values for different code paths we need
to soften the check to avoid false positives.

Fixes: QTCREATORBUG-25917
Change-Id: I121335a387eb235090346162df4703d3000b7426
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-10-15 05:18:23 +00:00
Christian Kandeler
57fccec1d7 ProjectExplorer: Do not run the build output parser test from a thread
Tasks must only be created in the main thread.

Change-Id: I7d0e6f850bec3eb1d700ffa8fdba0c2e253d47aa
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2021-10-14 15:46:57 +00:00
Orgad Shaneh
a19da3af74 ElfReader: Fix running locally
Amends commit 736820a1a0.

Change-Id: Id0a8aa9b0939e53f6eafc7b9f0e1cb821883e90a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-10-14 13:27:24 +00:00
Alessandro Portale
c099f622bb Core: Allow dialogs and popups be styled as "panelwidgets"
A recent change that prevented popups from being styled as "panelwidget"
unintentionally removed the styling from the upper part of the mini
target chooser.

This change re-allows styling contents of popups (and dialogs) if they
have the "panelwidget" property set to true.

Amends: 0786e967dd

Fixes: QTCREATORBUG-26403
Change-Id: Ib85b06d0a2823a5caf736d1354cf025a6ddd475c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-10-14 13:13:54 +00:00
Eike Ziller
0543a810e5 Bump version to 6.0.0-beta2
Change-Id: If15ba5f3b6484a7b649baac5bd0eb25147cc10db
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-10-14 10:04:12 +00:00
Christian Kandeler
d9dd3612da ClangCodeModel: Fix QStringView crashes
Some AST nodes have no range, triggering crashes in QStringView::mid().
Rather than checking all callers, we just use a safe variant.

Change-Id: I3c8d388693f9161249f201ecd4e8bad933463960
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-10-14 09:39:08 +00:00
David Schulz
6bf7521a89 CppEditor: check result line before finding block
Task-number: QTCREATORBUG-26396
Change-Id: Iccd6df3495336ff550da6f1fd1f9c17c588a80e3
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-10-14 09:17:05 +00:00
Christian Kandeler
c92deea33f ClangCodeModel: Provide source of diagnostics in tooltip
It's helpful to know whether a particular issue came from clangd,
libclang, or somewhere else.

Change-Id: I9e00d79ffe630a91028c2aeff219571e9979dbee
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-10-14 08:26:36 +00:00
Marco Bubke
1b16eb209c QmlDesigner: Add QmlDocumentParser and QmlTypesParser
Task-number: QDS-5174
Task-number: QDS-5228
Change-Id: I0889e8d63b0260aeb0efae1b3c8a373c18ea1f03
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-10-14 07:40:49 +00:00
Aleksei German
cbf96341a1 QmlDesigner: Fix for BindingEditor warning
Change-Id: I98fc27392e882e86221ca253ee35b2099dff8d52
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-10-14 07:19:58 +00:00
Alessandro Portale
84ee9289a0 ProjectExplorer: Handle file names from command line as user input
Change-Id: I5787e118b34d487059e9eb2f4fe6a0e05bfd3807
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-10-14 07:11:01 +00:00
Tuomo Pelkonen
b996bae04d QmlProject: Add support for primaryLanguage
Task-number: QDS-5187
Change-Id: I05aafa726fd6c2b586d57b64239cf08c1f2342ab
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-10-14 04:57:22 +00:00
David Schulz
631b7f2815 Editor: Fix crash when select last snippet
The first variable index might not be zero.

Fixes: QTCREATORBUG-26406
Change-Id: I54a9575da61d770ba82f3ddb9b1e8b0128ae51dd
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-10-14 04:14:38 +00:00
Orgad Shaneh
d76c9bec06 Perforce: Update document permissions after p4 edit
Task-number: QTCREATORBUG-22447
Change-Id: I9d521c17409e082b66141ba607fc0256d78798b7
Reviewed-by: hjk <hjk@qt.io>
2021-10-13 17:39:02 +00:00
Assam Boudjelthia
336cee445e Android: Remove unnecessary parameters in AndroidConfigurations
No need to manually provide a parameter to adbToolPath inside
AndroidConfigurations itself, functions that needs it can just
get it directly.

Change-Id: Ie319e82e4ea3b7e3ad6588284168f6116bef2686
Reviewed-by: hjk <hjk@qt.io>
2021-10-13 14:59:03 +00:00
Assam Boudjelthia
6e4d829a40 Android: handle return correct serialNumber for a running avd
AVDs don't get a serial number until they are started, and avdmanager
don't make it easy to get their serial either, so we need to check
the running devices with adb "emu avd name" command and compare.

Change-Id: I3253d25a3461a36eb9918b3c796062bf9e82e0c6
Reviewed-by: hjk <hjk@qt.io>
2021-10-13 14:58:27 +00:00
Assam Boudjelthia
3619223cbe Move SDK Manager instal/uninstall checkbox to left of package name
This will makes it much easier selecting packages for install/uninstall
operations, and makes more space for the package name by removing the
operation column, as well as making changes more apparent by marking
pending changes in bold font.

Change-Id: Iec86c384195dd8c51fd8f00c1de56cdbb2bab62a
Reviewed-by: hjk <hjk@qt.io>
2021-10-13 14:56:49 +00:00
Assam Boudjelthia
78da7e2922 Move sdkmanager's sdk level parsing to AndroidConfig
Both the sdkmanger and avdmanager (maybe more) need to parse the sdk
level for packages and devices which may contain letters, make them
use the same logic.

Change-Id: Iff7fef3a66e00fac11b833f73f2f334a4cf1a766
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-10-13 14:56:06 +00:00
hjk
e1a69fccb1 FakeVim: Only drop full-line comments
This is not what real vim does, but :help comments looks scary,
we don't support more complex scripts anyway, and full-line
comments at least allow some commenting.

Fixes: QTCREATORBUG-26254
Change-Id: I9018d06d2a929fad6d3d301240928b6a8b109710
Reviewed-by: Lukas Holecek <hluk@email.cz>
Reviewed-by: hjk <hjk@qt.io>
2021-10-13 14:39:04 +00:00
Christian Kandeler
6dd66e012b CppEditor: Fix possible crash in CompleteSwitchCaseStatement
There can be an unexpected null pointer if the built-in code model fails
to parse the code properly.

Fixes: QTCREATORBUG-26316
Change-Id: I5751be505b1182df17f58e1a174d645cef1e95cf
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-10-13 14:05:37 +00:00
Christian Kandeler
38b97b404a Fix various compiler warnings
Change-Id: I59db57e8501bbd0d0293ccce1b520df8acc07413
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-10-13 13:56:11 +00:00
Thomas Hartmann
ea8400a9ff StudioWelcome: Do not use TitilliumWeb as system font
Task-number: QDS-1081
Change-Id: I6c78fc0a95163f72168a29373a8e190d4bdf3167
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-10-13 09:38:26 +00:00
David Schulz
6e6753a064 Docker: use mapped working directory for remote processes
Change-Id: Ibbc89f963ca42510cf072b242a5cdfdc0d4c23ff
Reviewed-by: hjk <hjk@qt.io>
2021-10-13 09:35:57 +00:00
Thomas Hartmann
8b45f1f6c5 QmlDesigner: Only create components as primitives if actually possible
The type might not actually be exported and imported as a folder import.

Change-Id: I0ada27d619727044c2f8b8a601a2632a44c5a7cb
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-10-13 09:35:55 +00:00
David Schulz
7e9f955a58 Docker: Use only path part of FilePath when mapping to device
Otherwise neither normalizedPathName nor startsWithDriveLetter works as
intended when used with a non local path, but these are required to take
the correct code path in FilePath::mapToDevicePath.

Change-Id: I25e8f1a6a01a3e4056633ff3afec883cfbeb0e46
Reviewed-by: hjk <hjk@qt.io>
2021-10-13 09:35:51 +00:00
hjk
ba7aa5ea9c Docker: Also add Qt Quick stuff to test image
Had to tweak things a bit, and the QML part doesn't start up yet:

Starting docker://e5813ba3db76/data/dev/sessions/docker-quick-cmake/docker-quick-cmake...
QML debugging is enabled. Only use this in a safe environment.
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-'
QQmlApplicationEngine failed to load component
qrc:/main.qml:2 module "QtQuick.Window" is not installed
qrc:/main.qml:1 module "QtQuick" is not installed
qrc:/main.qml:2 module "QtQuick.Window" is not installed
qrc:/main.qml:1 module "QtQuick" is not installed

Change-Id: If7ec4aebee27880e01af6184ae22509e97054137
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-10-13 08:47:26 +00:00
hjk
11fc62e9b1 EditorManager: Avoid one use of FilePath::toFileInfo()
Change-Id: Id6312657298d29eab2f487213d296c0d5ffe2f9a
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-10-13 08:37:01 +00:00
Orgad Shaneh
a9ef0a8af8 ClearCase: Minor cleanup
Replace iteration over all documents with a faster lookup.

Change-Id: Iccc20ff2e5a44eef9d0bc925e25ef5c7ebaa98e9
Reviewed-by: hjk <hjk@qt.io>
2021-10-13 08:08:01 +00:00
hjk
f58663ce1c CMake: Use FilePath::mapToDevicePath for construction cmake line
Change-Id: I178803f39b5fa7707c1e4338ff02b9de18b22858
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-10-13 08:07:59 +00:00