Commit Graph

71402 Commits

Author SHA1 Message Date
Christian Kandeler
575ca89b3e CppEditor: Do not save clangd file path in settings
... if it is the default value.

Change-Id: I5efde72abe5a1979144352d09d461642f936224a
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-10-20 09:03:53 +00:00
Leena Miettinen
ac2906cd60 Doc: Update info about available project wizard templates
The Qt Quick Application wizard template was simplified.

Change-Id: I716d8d03aa508b6f8204b028c5e11691e1e469c3
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-10-20 09:00:50 +00:00
David Schulz
a95ee64fed Editor: Fix build for Qt < 5.15.2
Change-Id: I06d1ec50159f3370fde05633de8e14f599140369
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-10-20 08:07:17 +00:00
Eike Ziller
0e5d632e5b Move FilePath's hash methods to the right header
Change-Id: Ie3932daf381bc03f37ae67722dcddc5b2e4823e5
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-10-20 07:53:52 +00:00
Eike Ziller
93ae6f4c06 Fix performance issue in Locator with Qt 6
Locator tries to de-duplicate entries in case results from multiple
filters are collected. This is done so we don't get e.g. multiple
results for file names, from the various file filters (open documents,
project files, included files, ...).

For this we define operator== and qHash for LocatorFilterEntry, and add
them to a set of "seen" items based on their "internalData" QVariant.

For string data that works fine. For non-string data we used qHash for
the variant's internal data, and that changed in Qt 6 so we get the same
hash a lot of times which hits on the performance big time.

Defining qHash generically for QVariant isn't really supported. Since
our use case is to de-duplicate items if the internal data is a string,
simply restrict our de-duplication to that explicitly.

Fixes: QTCREATORBUG-26415
Task-number: QTCREATORBUG-24098
Change-Id: Ifdad17e7e66e9fe4b1300de51c45a5efac73cf3a
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-10-20 07:51:42 +00:00
Christian Kandeler
755932eca7 CppEditor: Fix crash
Fixes: QTCREATORBUG-26441
Change-Id: Ib5a99d474eac8677a65eb8a4a9b4fbe259c61ad3
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2021-10-19 16:25:31 +00:00
Tasuku Suzuki
f41bebc843 Core: Disable the "New Search" tool button after clearing searches
Change-Id: Ib0784faf4ebfe867ed6977b97c3fdd07978f5a68
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-10-19 14:39:57 +00:00
Tasuku Suzuki
fa54b01dc5 Find: Enlarge Scope combobox
When a project name is long, "Project %1" isn't fully visible.

Change-Id: I7f265d9a2c5c61cd4baa7b0829223fc8cf07061c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-10-19 14:39:36 +00:00
Mahmoud Badri
5de4743bb4 QmlDesigner: Persist horizontal component library's selected category
Moved showing and hiding categories logic to Cpp side so that:
- Currently selected category is persisted when the component library
  model is reset.
- QML side is clean of the mix of logic and UI.

Also reworked some logic/variables that are making the logic complex.

Task-number: QDS-5215
Change-Id: I8e9f5893f37a982283f1b1be9fee022f0b8afa32
Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2021-10-19 14:13:58 +00:00
Mahmoud Badri
80feee2b63 QmlDesigner: Distiguish between cancel and fail when importing assets
When asset importing fails we show a warning, but not when the user
cancels the importing.

Change-Id: I950d3b43c0f7c78a5abfb31a1974d2a9cd193522
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2021-10-19 14:10:18 +00:00
Eike Ziller
57b5cd69b9 Fix build with C++20
"erase" without namespace conflicts with std::erase, with the latter
taking precedence.

Amends 9929d3dd73

Fixes: QTCREATORBUG-26386
Change-Id: I7fa64827ad61f1da262ce48082854975bc431c69
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-10-19 13:02:03 +00:00
Jarek Kobus
39b36bf773 Remove unneeded terminating of failed process
Since we employ QtcProcess, the reaping of possibly
running process is done internally by QtcProcess already.

Change-Id: Ie65314a4aecf5bb1808b0f2c46a50503d82fd6fb
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-10-19 12:57:35 +00:00
Christian Kandeler
d40fa5b353 LSP: Allow users to see timing data
It's often interesting to know how long it takes for a reply to a
request to come in. While that data is in principle already available
from the inspector, a dedicated logging category gives much quicker
results.

Change-Id: Idd43c6e69422140863a7adaa33a7bc17dd8e6492
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-10-19 12:47:17 +00:00
Mahmoud Badri
5cdce37ea4 QmlDesigner: Refactor the code for adding assets
Change-Id: I25ddfb6df40494eee92d2d90faf3e90c15a82c3e
Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2021-10-19 12:41:31 +00:00
Christian Kandeler
8c86b9bca1 CppEditor: Make sure fallback project part is up to date
... with regards to the session include paths.
Amends 0636238429.

Fixes: QTCREATORBUG-26323
Change-Id: I8e2cd5f5e87d9dc3d2df3f943e13599bc7139768
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-10-19 12:20:47 +00:00
Huixiong Cao
eb7efec934 Support MIPS 32 and 64 abi simultaneously for mips architecture
The original implementation only support MIPS 32. Extend it to
support MIPS 64 too.

Change-Id: Ibd11d93f448c87a5643d23014f07dcd9eb420544
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-10-19 10:49:00 +00:00
David Schulz
fc11797218 Editor: update ksyntaxhighlighting engine to v5.87.0
Change-Id: If9dab8b321799f0ce908c831e812c20301a714e1
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2021-10-19 10:44:16 +00:00
Christian Kandeler
e77e57420a ClangCodeModel: Check for AST nodes from foreign files
... when highlighting with clangd. This can happen due to macro
invocations or unusually placed includes.

Task-number: QTCREATORBUG-26396
Change-Id: I471faee13c62fa511bdedfdd5b864327e858f6b8
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-10-19 09:11:36 +00:00
Orgad Shaneh
4b245bbb49 DocumentManager: Check for permission change on every reload
Fixes: QTCREATORBUG-22447
Change-Id: Iae26c01b97340ee4d6bb67a4655534130ba5537f
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-10-19 09:03:05 +00:00
Vikas Pachdha
dc43cd5236 Doc: Remove SVG format from Photoshop Bridge docs
Qt-Bridge plugin for Photoshop does not support SVG generation

Task-number: QDS-4783
Change-Id: I527faef82ea889fede6309e1d66974e0cf41cca1
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2021-10-19 07:56:30 +00:00
Mahmoud Badri
6a6faec3b6 QmlDesigner: Prevent error reporting when cancelling resouces dialog
Task-number: QDS-5265
Change-Id: Ie2583fae8d1fd8564243499f30c6a2f82fd1dbbd
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io>
2021-10-18 16:53:58 +00:00
Alessandro Portale
719cdfd426 ProjectExplorer: Don't print out warnings when wizard.json parsing fails
If plugins are disabled (e.g. Designer), some form page types (e.g.
"Form") might be missing. Therefore the parsing of some wizard.json
files will fail, which is expected.

A recent patch added warning output for this case:
   Failed to create wizard:  "wizard.json"

Let's remove that, because that is the job of Qt Creator's Option:
   -customwizard-verbose

Amends: 32799b3a7b

Change-Id: Idda037c2e48ef290ff95754393572ec4309347b2
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-10-18 16:22:36 +00:00
Cristian Adam
4544d891aa GitHub Actions: Do not build qbs with Qt Creator
Due to the recent changes that broke the MinGW 8.1 compilation and
the qbs documentation python issues with both MinGW and MSVC.

Change-Id: I401c2a1bd8f31de8fc7e44bb060247df75d9d1a0
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-10-18 14:20:03 +00:00
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
Thomas Hartmann
3cde937ea1 QmlDesigner: Fix casting of <cpp>.bool
Font.bold is of type <cpp>.bool and we did not recognize it.

Task-number: QDS-5274
Change-Id: I420dc62e1f1dc8b9e22a2c0678c882a72d8b0907
Reviewed-by: Aleksei German <aleksei.german@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
qds/v2.2.1
2021-10-15 16:10:00 +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
Samuel Ghinet
df8b62c6fa Add new theme colors necessary for New Project Dialog on QDS
We need colors for the dialog box background, and for warning text messages.

Note: We currently don't have carefully picked colors for warning, so I used
standard yellow (ffff00). The values, for each theme, will need to be adjusted
later on.

Task-number: QDS-4490
Change-Id: I257522216b03610d9f12951e7cb6f7cfa182489f
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-10-14 12:32:29 +00:00