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>
Unused form. QbsCleanStep has been aspectified a while ago.
Change-Id: I97da5e081ce1442efd278e5a3d60f77031c612e1
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>