Commit Graph

72473 Commits

Author SHA1 Message Date
Christian Kandeler
ce27886eeb ClangCodeModel: Fix dot-to-arrow completion with extra characters
We failed to overwrite existing characters that match the completion if
clangd also changes "." to "->" at the same time.
Note that it still doesn't work as expected if the cursor is after the
dot and before the extra character. I'm not sure yet how to fix that.

Fixes: QTCREATORBUG-27034
Change-Id: I852145fc41f34ab60d9e944783e822bc9505453b
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-02-11 09:43:48 +00:00
Leena Miettinen
756a67c563 Doc: Update CMake build settings
- Describe context menu options for syncing configurations
- Describe options for getting help on variables and options

Task-number: QTCREATORBUG-26983
Change-Id: Ide88172bc2e8032434ee657a9995528b6917a871
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2022-02-11 09:30:40 +00:00
Thomas Hartmann
9e0b7a0d60 QmlDesigner: Do not update instantly after creating component
If the update happens instantly the new component is not
parsed in sone cases, yet.

Change-Id: Ib43fc5e3dfd2e14f87a9e4fb46b1e2ba720768a5
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-02-11 09:25:39 +00:00
Christian Stenger
4c7a5b07c1 Docker: Fix and enable open shell in container
So far this had been restricted to Unix, but it works on
all platforms.

Change-Id: I578623341c906eca80a0dbc5fcc9b15e820d3597
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-02-11 08:57:52 +00:00
David Schulz
37f8fcd791 Editor: update ksyntaxhighlighting engine to v5.90.0
Task-number: QTCREATORBUG-22558
Change-Id: I7314c146a6de359ea8d60750d8a2c8e972b33fc9
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-02-11 08:00:00 +00:00
Christian Stenger
12c63bbce9 Tests: Fix manual plugin view test
Amends b822b3f9e2.

Change-Id: Ibbed286a8626396319738194f417cedc84332011
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-02-11 07:49:32 +00:00
Eike Ziller
a9c5d6b99f Fix accelerator/mnemonic conflicts in advanced search
Fixes: QTCREATORBUG-26914
Change-Id: I260e2dac92a2e2cac8d7a0cda111fe38d9265d19
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-02-11 07:35:36 +00:00
Alessandro Portale
26bf18e1fe Core: Turn LocatorFilterEntry ofn ILocatorFilter::accept to const &
In ILocatorFilter::accept and all the overrides.

Change-Id: I27cd6babb66d91aad57e85572a1cdc77aef4fd79
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-02-11 07:35:30 +00:00
Erik Verbruggen
93fc6b5c3c McuSupport: Make all member fields of McuTarget const
In proactive, the color depth was never changed after setCMakeOptions
was called. This change makes it clear that it is also not intended to
be changed: a board does not suddenly change color depth, and for a new
board configuration a new target is created.

Change-Id: Ie5b99726d833efcdf129655b8e70120a033914e6
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-02-10 21:19:07 +00:00
Thomas Hartmann
52e3f2cd5f QmlDesigner: Cache last image in 3D view and add busy indicator
This patch caches the last image from a document/model.
The result ist that when reopening a file in the 3D editor
the user sees immediately something.
Since the view is not interactive, yet, we show a busy indicator
until the view is fully initialized.

Change-Id: I26c8b0ea69f98ceb41580624c51d48d1e633ab80
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-02-10 21:00:11 +00:00
Erik Verbruggen
250f4fb72f McuSupport: Move McuDependenciesKitAspectWidget into its own file
Change-Id: I41a2a6ec48c5c02ca655cb09ad08080d73d336fe
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-02-10 20:42:59 +00:00
Thomas Hartmann
6472e8c5bb QmlDesigner: Set proper version when duplicating states
When duplicating a state we did not set the correct version.
This stopped the rewriter from syncing the property with the QML code.
I added a regression test.

Task-number: QDS-6185
Change-Id: I11552a9f880eb83f4df1341fb0b94c9a3a6e5035
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-02-10 16:33:51 +00:00
Eike Ziller
3ba00ac39f CMake build: Allow adding RPATHs via CMAKE_(BUILD|INSTALL)_RPATH
Prepend our own relative RPATHs to CMAKE_INSTALL_RPATH (or
CMAKE_BUILD_RPATH respectively) instead of overriding them completely.
That allows adding an RPATH to e.g. a self-compiled and separately
installed Qt to the installed Qt Creator.

Fixes: QTCREATORBUG-27008
Change-Id: I8cd9167fdf5ba9838850fcfab8135da9b79e6695
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-02-10 16:32:42 +00:00
Thiago Macieira
652639327f CMake: install the cmake files inside CMAKE_INSTALL_LIBDIR
Change-Id: I54f205f6b7314351b078fffd16d0bab2ccd81cd4
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-02-10 16:17:02 +00:00
hjk
44493857c2 SdkTool: Use slightly less repetitive approach for operation interface
Change-Id: I4d1d205c610df39be6a810dfda3049ae14a06806
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-02-10 15:06:36 +00:00
Miikka Heikkinen
f146b846cd QmlDesigner: Implement proper preview for pure 3D scenes
Refactored the existing 3D node preview generation to be done
synchronously, which enables their use also for creating state
and item library previews for 3D nodes with ease.

Fixes: QDS-5785
Change-Id: Ib493eccbc239f33bcad3301673a865494616a901
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-02-10 14:47:26 +00:00
Artem Sokolovskii
ab5fdd94f3 [ClangFormat] Add test checkking indentation after Q_OBJECT
Added test checking behavior when after Q_OBJECT all class structure
have correct indenting and redundent tabs doesn't appear before key words
such as  public:, private: , etc.
Made automatic addition Qt defines to StatementMacro to .clang-format files.

Fixes: QTCREATORBUG-26776
Change-Id: I3490421a9caf2831b593939597940358f7ce8f01
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-02-10 13:37:05 +00:00
Christian Stenger
8a29a78ebf CdbExt: Fix Python-C API handling
From 3.10 onwards we need an additional macro when parsing
and building values.

Change-Id: Ia0bcdde467d87a1c7d22ec8657e050cdf5f1e52e
Reviewed-by: David Schulz <david.schulz@qt.io>
v7.0.0-beta1
2022-02-10 13:06:46 +00:00
Christian Kandeler
6ede8b3bc0 ClangCodeModel: Support parse contexts with clangd
Fixes: QTCREATORBUG-27009
Change-Id: I177db0658d545211b940623cae071db91e82ddb4
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-02-10 12:58:30 +00:00
Jarek Kobus
959e2b0124 Fix showing non-zero exit code in output pane for remote app
Change-Id: Ifc1b26c439ad6e78669b4ba9ac38e7d7e6a8c614
Reviewed-by: hjk <hjk@qt.io>
2022-02-10 12:25:37 +00:00
Christian Kandeler
400ada2daa ProjectExplorer: Dis-ambiguate issues pane's "show output" action
Amends 08a86169db.

Fixes: QTCREATORBUG-27031
Change-Id: Ie6d214673f6c1c52aab1a035c84a7381f9965588
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-02-10 12:17:13 +00:00
Eike Ziller
5d675ff533 Remove QTC_ASSERT because unset toolchain is a valid condition
Change-Id: I2ba710cf4e0af31138787bb7859302ad3a3f3d03
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2022-02-10 11:48:11 +00:00
Cristian Adam
2eef90e86f CMakePM: Update generator kit value after Kit Configuration dialog
The CMAKE_GENERATOR variable in "Initial Configuration" didn't get
the Kit value after a change in the "Kit Configuration" dialog.

Change-Id: Ieb9d634e2e9b1a5522b189e16bb66f8cea4c63b1
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-02-10 11:08:39 +00:00
Cristian Adam
a204ad3236 CMakePM: Do not reconfigure project on KitUpdated
Initial Configuration will get the updated kit values and it's
up to the user to react.

The reconfiguration doesn't help at all, since none of
the variables / options ends up in the Current Configuration.

Change-Id: I5ee75fce1a33ce30a011ce6f1b6399fd79727ca6
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-02-10 11:08:26 +00:00
Christian Kandeler
14ee4654c1 ClangCodeModel: Fix detection of #ifdef'ed out blocks with clangd
We were erroneously merging adjacent disabled blocks.

Change-Id: I9f8f588c0362d488a24c044910474815b94efd59
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-02-10 10:59:23 +00:00
hjk
3bdab2f05e Docker: Simplify and fix "Open Shell in Container"
Change-Id: Icce72712a006f524b8a8328904d89f2b0e2b8a3d
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-02-10 10:02:33 +00:00
Leena Miettinen
7e00d5f662 Doc: Describe applying context menu actions to multiple issues
...in the Issues pane.

Task-number: QTCREATORBUG-26610
Change-Id: I5ad148b7f8e1696aa0f3b494f05b068df9d2210d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-02-10 09:49:09 +00:00
Erik Verbruggen
34345f8b7e Make McuToolChainPackage::Type an enum class
And make more use of switch statements without a default case, so each
type is handled explicitly. (Ok, there is a default, but that is
Q_UNREACHABLE).

Change-Id: I30ccc447e55a5aeebebe1a9879ea3136545f5e68
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <piotr.mucko@qt.io>
2022-02-10 08:52:59 +00:00
Erik Verbruggen
32f8ed7b66 Make (and return) more properties as const-ref in McuPackage
This implies that those properties are now passed into the constructor,
and their setters are removed.

Change-Id: I34b4d9d7450897e6a7a72b8edaffdc05961546d1
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <piotr.mucko@qt.io>
2022-02-10 08:52:45 +00:00
Erik Verbruggen
6b6b35f59e Move MCUPackage and MCUToolChain package to separate files
Also move `packagePathFromSettings` so it can be used from multiple
places. This function will probably move into a separate utility file
in future changes.

Change-Id: I208a5a7bc8aa689829178809a1f4053a961d93be
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <piotr.mucko@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-02-10 08:52:23 +00:00
Miikka Heikkinen
a3596e6527 QmlDesigner: Fix 3D import crash and import statement insertion
Sometimes importing 3D models would crash because null process output
callback, so just make an empty dummy callback.

Import statement insertion to the qml document for the asset also
failed, because new import creation is no longer automatically detected
by qmljs, probably due to some optimization.
Fixed by explicitly scanning the import target directory for new
content. This also allows us to know when scan is completed,
so we can reduce mandatory waiting time.
Also added check to see when the new imports are available in the model
to reduce mandatory waiting for that step, too.

Change-Id: I8d8757efea5481e0d3f15add2b93e6f0f5b155cb
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io>
2022-02-10 08:49:16 +00:00
Alessandro Portale
d84c5da4e9 Core: Limit rendering of tag rows in ListItemDelegate
Unlimited rows make the tags flow over the lower edge. Two rows should
be enough for proper tagging.

All tags are still used for searching, even if some are omitted in the
rendering.

Change-Id: Ia731031f362165c75ef5fa34a80200c85d2f93aa
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-02-10 08:41:50 +00:00
Christian Kandeler
64fee150ef ClangCodeModel: Consider whitespace in preprocessor directives
... when highlighting with clangd. That is, treat "# ifdef" the same as
"#ifdef".

Fixes: QTCREATORBUG-27021
Change-Id: Ic57ed42e09f95611dd85ca3c112e23b52a3f91fc
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-02-10 08:09:49 +00:00
Christian Kandeler
105e591060 ProjectExplorer: Delay project parsing until it's part of the session
E.g. code model logic relies on the session manager knowing about the
project currently being parsed.

Fixes: QTCREATORBUG-26987
Change-Id: I4d9a1c21ab8474f7ac21edaeebe667fc4f3a6c4e
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-02-10 08:06:09 +00:00
David Schulz
a1cc9b4e5c Editor: fix internal cursor position after backspace
Fixes: QTCREATORBUG-27035
Change-Id: Id39d8832c5e3327cd42ce10447da98ca78fe476d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-02-10 08:00:42 +00:00
David Schulz
d59047a4c2 LanguageClient: do not disconnect client from manager
The previously connected signals should be safe to stay connected while
the server restarts. This fixes restarting crashed clients more than once.

Change-Id: I161d41418e10b7e3bd3e17141720f4a5f399841c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-02-10 08:00:26 +00:00
hjk
385367cfd7 QmlJS: Fix compiulation with namespaces
Amends 125d7c0cce.

Change-Id: I75f2c562aca2e3a00bb0284f39c3951664e2c956
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-02-10 07:10:32 +00:00
Alessandro Portale
d61069b90f LanguageClient: Prevent extra frame border around outline view
For consistency with other views.

Change-Id: I3d495a3bd037fe917c99bf5e9916651ca48c03fd
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-02-10 07:06:15 +00:00
Alessandro Portale
08c25aef25 TextEditor: Fix High-DPI+Qt6 drawing of the refactor marker icon
Subtle devicePixelRatio-related changes in Qt require to restrict one
division by a Qt 5 specific #ifdef.

Fixes: QTCREATORBUG-26905
Change-Id: Ic5eecef5c7cb355abc8a5391708c5cd1050af282
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-02-10 06:38:46 +00:00
Christian Stenger
bafea94402 Clangd: Fix possible crash in inspector
When fast switching between clients listed inside the inspector
the message response for memory usage may arrive after the model
has been destroyed.

Change-Id: I0503bb334cf21b0919316f0ac2e731472f3433bd
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-02-10 05:52:51 +00:00
Christian Stenger
d408726023 Tests: Include flamegraphview test
Change-Id: Id30d171d43c7b5adf5bb7b45fda99364662c93be
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-02-10 05:52:07 +00:00
Knud Dollereder
b36bba03ba QmlDesigner: Improve performance of ConnectionManager
This is a pertial cherry-pick from master.
See commit: b9d59edeb1
I removed the changes to the process deletion.
This requires an extra cleanup patch in master.

Change-Id: If845ea44f483c5d3c646595ff9298bcdd3dfd59a
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-02-09 17:50:13 +00:00
Thomas Hartmann
cea31a2c4f QmlDesigner: Add cache for instances
When detaching the NodeInstanceView from a model
we insert all instances for this model into a cache.
The cache currently takes a maximum of 20 models.
If the model is reattached we use the existing instances, instead
of creating new ones.
We also recycle the state previews. Outdated data will be overridden by
new data once the puppet is sending the respective commands.

Task-number: QDS-6121
Change-Id: I15b5628afc5579ba8a03dca23ba5809e55022f3d
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-02-09 17:49:59 +00:00
Leena Miettinen
3bd96e7e73 Doc: Move creating files into a separate topic
"New File" is now a separate menu item in the "File" menu.
This way the topics are a bit shorter.

Task-number: QTCREATORBUG-26610
Change-Id: Iedfc79f196fc9c3b28f8613f7d8a5ed057770b9a
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-02-09 15:29:01 +00:00
hjk
0b131fae72 Docker: Use repo + tag for image identification
Makes configurations a bit better exchangable (sdktool...).

Change-Id: Ia566a516afea2205c973527e02ce5664634ebbdc
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-02-09 15:02:25 +00:00
Alessandro Portale
a6fcb4b3ce Tests: Fix crashing of tst_flamegraphview on Windows
...by setting the RHI backend to "opengl". That is preliminary.
QQuickWidget will work with other backends such as "d3d11", soon (likely
with Qt 6.4).

Change-Id: I57e1869e837794fa887894cae0905a548f9e436c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-02-09 14:44:00 +00:00
Eike Ziller
aac0e8ef6e Fix finding python development package for cdb extension
Amends e9f3f8cc64

We switched to find_package(Python3 ...) and that doesn't use
PYTHON_LIBRARY and PYTHON_INCLUDE_DIR. Simply provide the root path for
find_package(Python3 ...).

Change-Id: If862151c095af358be5f35d3d8002d77dcd17aa6
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-02-09 13:18:49 +00:00
Antti Määttä
cdeb3ae13f Add quick3d memory consumption to profiler
Change-Id: I300ef808793fafc7328118dcc694ab67e90f9f52
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-02-09 12:51:15 +00:00
Jarek Kobus
072750a284 Fix crash reporting in output pane when remote run in terminal
Fixes: QTCREATORBUG-27007
Change-Id: I6e409eb6489530dc6c48c90d20e28ff019eff187
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-02-09 12:34:57 +00:00
Jarek Kobus
ff68923846 Fix stopping the remote app run in terminal
It amends 9ec997b376
were in case of runInTerminal() we were not connected
to self started() signal anymore, so we were missing
a call to setState(SshDeviceProcessPrivate::ProcessRunning)
after start.

Amends 9ec997b376

Fixes: QTCREATORBUG-27014
Change-Id: I48bd2c223f36cd12b0b66bdc62f735b12cf7bdeb
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-02-09 12:28:30 +00:00