Commit Graph

75236 Commits

Author SHA1 Message Date
Thomas Hartmann
c7f742a546 QmlDesigner: Recreate QuickWidget on download
Instead of resetting the engine we have to recreate the widget
to avoid a crashes.

Task-number: QDS-7355
Change-Id: Id0d202c5da1d13433a95442156815056168b998b
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2022-08-18 14:46:40 +00:00
Aleksei German
e8d05da529 QmlDesigner: Exclude Behavior children from Scene
Task-number: QDS-7444
Change-Id: I6bd04f7619ae15d2fce81d79d1a1c59e33e834c8
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-08-18 14:23:47 +00:00
Thomas Hartmann
b899a27c86 StudioWelcome: Disable welcome page during download
Change-Id: Ic85dfd79e4c43822805ce2a7f392f9b0a5d2a923
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-08-18 13:42:44 +00:00
Marcus Tillmanns
2770f92f53 QDS: Fix unused variable warnings
Change-Id: I3ea21d5883cb75dd2507ad3d0aa6b3e24ed8354e
Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-08-18 13:21:18 +00:00
Alessandro Portale
4084b2ae3f QbsProjectManager: delete qbscleanstepconfigwidget.ui
Unused form. QbsCleanStep has been aspectified a while ago.

Change-Id: I97da5e081ce1442efd278e5a3d60f77031c612e1
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-08-18 13:00:00 +00:00
Eike Ziller
792c5271e2 Bump version to 8.0.2
Change-Id: Ib7e45eb039bcba4430259babbd3d398258f62c5c
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-08-18 12:31:15 +00:00
Knud Dollereder
5c68fb68ce Do not update control values when pressing cancel
Change-Id: I3d365e760fa8ba4a0b36a995d0bf6a59f2d9734b
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-08-18 12:02:31 +00:00
David Schulz
dc2cd9db94 LanguageClient: correctly disconnect documents changed signal on reset
connect calls to a lambda can not be disconnected with the
sender->disconnect(receiver);
syntax, so save the connection in a QMetaObject::Connection and use this
to disconnect the signal.

Fixes: QTCREATORBUG-27596
Change-Id: I69f5d990aab4e85d768e2101f0157a7dee3c1fa1
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-08-18 11:58:57 +00:00
Marco Bubke
550dadb86e Utils: fix narrowing warning
We test the small string capacity anyway, so we never write a larger
size.

Change-Id: Ie3a2f907898229fdee6219149917d9fddd3297e6
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2022-08-18 11:35:07 +00:00
Miikka Heikkinen
e4b35fa576 QmlDesigner: Block preview data change handling when initializing
Handling the data change is pointless when we are initializing UI
to stored values, and can also trigger undesirable secondary effects
like showing color selection dialog.

Fixes: QDS-7415
Change-Id: I0321c47d5a63971dc890c37f90ec6fedc8293eca
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-08-18 11:10:53 +00:00
Miikka Heikkinen
326f70c40f QmlDesigner: Add support for component materials
Component materials can now be seen on material browser and their
properties are properly shown on material editor

Fixes: QDS-7390
Change-Id: I3f7edfe655bdb0da1fa71739c825d09d6101c386
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-08-18 11:10:42 +00:00
Miikka Heikkinen
2e8574bd76 QmlDesigner: Add scene root material support to material editor/browser
If the scene root item is Material subclass, material library is not
created for the scene. Material editor and browser functionalities that
relate to having material library are disabled.
Material editor will always show the material that is the scene root.

Fixes: QDS-7374
Change-Id: Icd1c212c17b59e4a2caa6b3b4d7e615e68b21eb9
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2022-08-18 11:10:04 +00:00
Cristian Adam
c7cdd55dea ClangFormat: Fix build for LLVM 15.0.0
This fixes the CMake build of Qt Creator against LLVM 15.0.0

Change-Id: Icecd45821091c8c2b565246cb17ce5a6e5c49f36
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-08-18 09:43:30 +00:00
Marco Bubke
5a8d7c3d51 Utils: Remove code duplication in SmallString
It removes unwanted null termination too.

Change-Id: Iaea8699f7ccc387776b43e897fdd099764af2773
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2022-08-18 09:25:55 +00:00
Mahmoud Badri
d4cc3fddc9 QmlDesigner: Implement copy/paste material properties
Fixes: QDS-7014
Change-Id: I2a8b779f97de353836a4d506b715720b490c349f
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2022-08-18 09:12:10 +00:00
Alessandro Portale
0ec7a3797d Utils: Add a non-toolbar variant of the MINUS icon
Make it consistent with Utils::Icons::PLUS and
Utils::Icons::PLUS_TOOLBAR

Change-Id: I2d5c69ec13ceba172c2c583895eea6fdff77a64e
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-08-18 09:02:58 +00:00
Christian Kandeler
1e56179d0c QbsProjectManager: Consider qbs.sysroot for code model flags
This is particularly relevant on macOS, where we have an implicit
sysroot that's not exposed in the kit.

Change-Id: I85f6cd989e2f32857c007822fd68fbaf0cead7e0
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-08-18 08:11:26 +00:00
Marcus Tillmanns
7c5e92f6fa CppEditor: Add missing include
Change-Id: I5a8724987e3c5888d5d07507cf2ae63a1b463c5a
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-08-18 06:33:44 +00:00
David Schulz
5b3b1a60a1 CppEditor: move outline model to document
This way we only have one model per document instead of one per editor.
Additionally we further separate the outline views (combobox and side
pane) from the actual model.

Change-Id: I9705716b5c9f8f19f75708ec73d7c3b3c5de586f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-08-18 06:20:10 +00:00
Christian Stenger
ec733999e1 QmlDesigner: Fix qbs build
Change-Id: If9fdad7ee19c1ab6e1180a1ba59d2cdc2d2535f5
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-08-18 06:04:37 +00:00
Alexander Drozdov
4a79623959 Fix crash on Preferences dialog close
Mitigation for regression introduced by
74ac09346f.

On finish() method call m_widget maybe nullptr, so call for any him
methods is dangerous without checking for nullptr.

Change-Id: Ia7ab5572946fef9bcc62c63709e5ffc69cd2ebae
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
2022-08-17 22:28:41 +00:00
Christian Stenger
26e47cb6ce Fix Qbs build on Windows
Change-Id: I0d03a73731eb02852d34626ef243597214597ee8
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-08-17 14:44:17 +00:00
Thomas Hartmann
aa893cb652 QmlDesigner: Do not open the Screen01 from wizard
The qmlproject wizard will open the main ui file with a slight
delay for the code model.

Task-number: QDS-7349
Change-Id: Ic4265eba78f3914564de0ba251d43aeb477bef5e
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-08-17 14:36:53 +00:00
Mahmoud Badri
ec565eea99 QmlDesigner: Allow deleting materials using the delete action
Fixes: QDS-7012
Change-Id: I5eb03971d33a997fc1463ec4ee70eb33a730a897
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-08-17 13:11:58 +00:00
Mahmoud Badri
01bb84b808 QmlDesigner: Fix faulty color during IconButton hover animation
Also removed hover animation from IconButton based on UX.

Fixes: QDS-7432
Change-Id: Ic9b218a288cf30079844b93bbcaec30a9024ca79
Reviewed-by: Brook Cronin <brook.cronin@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-08-17 12:55:42 +00:00
Thomas Hartmann
831e118b33 QmlDesigner: Do not amend if rewriter view is not attached
Task-number: QDS-7349
Change-Id: I6a4d1906ee6afea25e5dcc878f7f502456c6052b
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-08-17 12:48:59 +00:00
Thomas Hartmann
073693bab3 QmlDesigner: Fix heck in syncSignalDeclarationProperty
Change-Id: Ifa5d5ef6000a6a8a7eb6210cece43a09b6e42361
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-08-17 12:39:38 +00:00
Piotr Mućko
cb24da01b3 McuSupport: Evaluate environment variables in paths
Packages are created as defined in JSON. Some paths
contain variables. This creates dependencies between
packages. After all packages are created and collected
environment variables are evaluated in one pass. McuTarget
packages get updated.

This is needed because we shouldn't show the user paths
with variables in them. Also file picker wouldn't work.

There will be cmake variables support in separate commit.

Change-Id: Id210ea394f3f5bb5a14d87f3cf6a0a9a99e690bf
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-08-17 12:17:38 +00:00
Piotr Mućko
662281e837 McuSupport: Parse and create qt for MCUs package
Change-Id: I295f8c275d67992ba633f194ace119c2784d8525
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Yasser Grimes <yasser.grimes@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-08-17 12:16:27 +00:00
Florian Koch
4740430577 New option for disabling of tinting the right margin area in text editor
Since version 4.14 the right margin of the text editor is tinted. The
fill color corresponds to a darkened editor background color (for light
UI themes), or a lightened background color (for dark themes). However,
the default for most other editors and IDEs is just a single  vertical
line, as was the case in Qt Creator up until version 4.13. The different
colored area may be considered uncommon and irritating by some users.
Therefore, the new checkbox "Tint whole margin area" has been added under the
"Text Editor/Display/Text Wrapping" section in the settings for switching
between <= 4.13 and 4.14+ behavior.

Change-Id: I6761943477738a4c78b97a5f70a19f1ff8a428e5
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-08-17 10:44:15 +00:00
Piotr Mućko
038b839f9e McuSupport: Remove unavailable JSON param
freeRTOS' boardSdkSubDir param in JSON was removed long time ago.
It's time to remove corresponding code.

Change-Id: I6805aaa51cce599f5505fbc74692ed562f448ad4
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Dawid Śliwa <dawid.sliwa@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-08-17 10:27:42 +00:00
Henning Gruendl
5f41c09eb0 QmlDesigner: Fix Qt Advanced Docking System
Fix an issue with a wrong QWidget background rendering when dragging
a dock widget across a floating dock widgets border.

Task-number: QDS-7425
Change-Id: I018cc224a6316a0327cb1806512b6aa6a75d88a3
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-08-17 09:15:51 +00:00
Marcus Tillmanns
44cd2b59e5 smallstring: Fix warnings and compile error on macOS
Change-Id: I51f73aa5561d2f21e36ebba0e2e318cf662e36ed
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2022-08-17 09:08:14 +00:00
Alessandro Portale
c837737bab TextEditor: inline snippetssettingspage.ui
Change-Id: I483bc07b39328a491af373ce76b365e968176828
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-08-17 08:20:06 +00:00
Christian Kandeler
0d156ca545 CppEditor: Prevent user include paths matching built-in include paths
It can easily happen that the build system provides us with an include
path that matches a built-in path of the toolchain, for instance when a
project file pulls in an external library that's installed in /usr.
In such a case, we must make sure we only keep the path that's marked as
a built-in header, since otherwise the include paths we pass to clangd
will be in an unexpected order, breaking the parsing.

Change-Id: Ibb56129b9c6e1c419d741652fa8c3051a62552e7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-08-17 07:34:45 +00:00
Thomas Hartmann
b2567b5e1d QmlDesigner: Do not throw if metainfo is invalid
Task-number: QDS-7348
Change-Id: I96433369ad0e013d4fa62df297ade16084f8bc6a
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-08-17 07:25:20 +00:00
Thomas Hartmann
43bf516d10 QmlDesigner: Catch exception that leaves the notifer
No exception should ever leave the view and it should be caught locally.
If this still happens we should catch it and show an error message.
Otherwise we risk throwing a second exception when rewinding, if the
changes came from the text editor.
Catching and showing an error message should never do harm.

Change-Id: If275ed1179e4fa4245fef3df4dbc8d144a1588d3
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-08-17 07:21:12 +00:00
Thomas Hartmann
96d0f86552 QmlDesigner: Do not throw exception in meta info proxy case
If there is a metaInfoProxyModel the version numbers will be different.
(e.g. 6.3 im the document has a 6.3 import and 2.0 from the template).

This is no problem and we can ignore this case. The check is supposed
to be removed anyway.

Task-number: QDS-7350
Change-Id: I780fc7d4b744e298bc8f3b991e75f642a4e8ae8a
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-08-17 07:19:58 +00:00
Cristian Adam
848016673c Core: Show document icons in Ctrl-Tab open documents window
Having the document icon looks more natural than having an empty icon.

Change-Id: I69da3e4177da558b5d9f474e3495f8237c5f0352
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-08-16 18:56:50 +00:00
Cristian Adam
373b9f8b31 Core: Show document icons the "Open Documents" view
Having the document icon looks more natural than having just the text
of the document.

Change-Id: I7cb6fda6b4241c0d124c18c3c74dc4a1e614b02d
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-08-16 18:56:43 +00:00
Cristian Adam
d86d278044 CMakePM: Add configure environment widget
CMakePresets have the concept of modifying the configure process
environment variables.

Qt Creator had only one "build environment".

Change-Id: I131d54971b4bf7e5f87e680f817f93868d62ab29
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-08-16 18:56:36 +00:00
Marco Bubke
c9d45d1bc0 Utils: Remove null termination from SmallString
We expect mostly a string view which has no null termination. Code which
depends on null termination is broken and it is better break early.

Change-Id: I7c2c41fb114e6aaf3a23053b522b37f7af5e1abf
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2022-08-16 16:15:51 +00:00
Marco Bubke
cf064500aa Utils: Improve memory layout code
Actually, the layout is the same, but we move the control block. To prevent
padding of the short string, we use pragma pack(1). To align the pointer
again, we add some dummy data with the size of a pointer minus a control
block because alignas is not working like expected on GCC.

Change-Id: Ide86ace243dab5f487da63492ebac018da45098a
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2022-08-16 16:15:45 +00:00
Marco Bubke
735346adb5 Utils: SmallString trades copies for branches
There can be quite some copies with the swap method for the default case
that the string is inside the small string area. Instead now we minimize
copies of the smallstring area at the expense of more branches.

The swap approch needs no self tests and it uses the destructor to
remove allocated resources but it can copy three times more often. And
the destructor still has an additional branch in the copy case. Only in
the move case we can use the destructor of the other instance. This can
be surprising for some users which expect that the instance is empty
after a move(actually assuming that a instance is empty after a move is
undefined behavior).

Because SmallString is designed to hold the string in almost all cases
inside the small string area that case should be optimized.

Change-Id: I22cb62aa99b9713a221f103971f149c05e9ff6fa
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-08-16 16:15:26 +00:00
Marco Bubke
fa32b652c8 Utils: Optimze SmallString copies for larger sizes
So far the whole class was always copied. For a large SmallString
classes this were often many zeros if it was empty. Now only the non
zero area is copied in that case.

Change-Id: Ic0ea2d6f763513858a993bba3e829c9fc947e1a6
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-08-16 16:15:00 +00:00
Marco Bubke
8a0f7db8eb Utils: Make take of SmallString explicit
Using a value after the move is undefined. For example, if you move an
integer, it is not set to zero after the move. So you have to initialize
it again. Adding the take method to SmallString makes this explicit.
So if there is a case that you want to use the string again after
a move, use take or initialize it yourself.

Change-Id: I174116df9639d6a3f63c6f2c2a3bd184852927ce
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2022-08-16 16:14:51 +00:00
Marco Bubke
a91e6bd46c Utils: Adapt SmallString to C++ 17
if constexpr makes the code a little bit more readable.

Change-Id: I7bd508cbc81cf7213dd4ac627f3d4e489ab523c9
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-08-16 16:14:45 +00:00
Marco Bubke
2a22e81e72 QmlDesigner: Some cleanups
Change-Id: I5822e035bda817c3376a587c20e94d813ec61ac6
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2022-08-16 16:14:08 +00:00
Marco Bubke
9d0ad0412e QmlDesigner: Add language auxiliary property
Change-Id: I9c830e6d788bdd33b1d2fad44d5dc6c770b6b78c
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2022-08-16 16:13:59 +00:00
Marco Bubke
ccc8c7c997 QmlDesigner: rotBlock is using it own aux type
rotBlock was using the mechanism to overwrite values but actually it is
only for communication to the puppet. So now there is
NodeInstanceAuxiliary as a generic way. NodeInstance was renamed
NodeInstancePropertyOverwrite to make it clear that it is for
overwriting properties.

Task-number: QDS-7338
Change-Id: Id5ab1f5c4761a184964a347f00d1449ae2d7d77f
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2022-08-16 16:13:46 +00:00