We've been requiring C++17 since Qt 6.0, and our qAsConst use finally
starts to bother us (QTBUG-99313), so time to port away from it
now.
Since qAsConst has exactly the same semantics as std::as_const (down
to rvalue treatment, constexpr'ness and noexcept'ness), there's really
nothing more to it than a global search-and-replace.
Task-number: QTBUG-99313
Change-Id: I88edd91395849574436299b8badda21bb93bea39
Reviewed-by: hjk <hjk@qt.io>
In some cases the binding for anchor targets is not properly resolved.
Using explicitly the root context we define the ids in does solve
the issue.
Change-Id: I69e5bd237668719ec9417d30d0bac8635c79506a
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This might be the implicit default, but let's make this
explicit.
Change-Id: Ic42735b12f22819767ceb642d265f813201c9146
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Fix an issue which caused the wrong state to be shown in the form editor
after reordering the states in the state editor.
Task-number: QDS-7753
Change-Id: I220bb5b11beb4f9bfc6a85069a688c9ff2984d8f
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This fixes an issue of the formeditor which did not update properly if
components contain items that have one of zvalue, opacity or visibility
attributes animated.
Change-Id: I1b20f09177878419b2b18aaf94c84b6ae437be7d
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
The node instance view and his commands should be not called directly
from other views. There are special classes QmlItem which can do it but
every change should go through the model.
Change-Id: I734e5538d7f6ecb07d736912f647c5eb92dc7631
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>
Converted old auxiliary properties usage in material preview to
the new API. Since most properties need to be both persisted to the
document and used by puppet, those properties had to be duplicated.
Fixes: QTCREATORBUG-28085
Fixes: QDS-7624
Change-Id: Idf51c773a2d49d44413bfaf69d4a683692ea8a0d
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Previously only 3D models could be picked for context menu target.
Now any node that can be resolved from a point at 3D edit view can be
picked.
Fixes: QDS-7518
Change-Id: Id4a30d96744c42907d45688493776bdff35b934e
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Replace the current license disclaimer in files by
a SPDX-License-Identifier.
Task-number: QTBUG-67283
Change-Id: I708fd1f9f2b73d60f57cc3568646929117825813
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
We were passing the image with premultiplied alpha obtained from
QSGRhiLayer::toImage() to be shown in form editor. This corrupts the
colors in with 3D materials having partially transparent colors.
Converting the image to QImage::Format_ARGB32 format fixes the issue.
Fixes: QDS-7474
Change-Id: Id0b689d7e2d9fc111e98f28b18db0af3ac30041f
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This entails selecting a model upon right-clicking if it is not selected.
Also fixed a memory leak and small tweaks.
Fixes: QDS-7401
Change-Id: I592acb3fff30ecc3236f3cf2fbe126de4fb389dc
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
The state is determined by the state view.
Change-Id: I3b76b25c618d4f860f13d2e005d88d93a660fbc0
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
There is no reason to set the when condition ever.
Change-Id: I4c6b5ca04cdb7ba62f833225c6878da83a02abaf
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
For now only 1 action is implemented (edit material), more actions are
coming next.
Task-number: QDS-7414
Task-number: QDS-7398
Change-Id: Id8e36c23d9a4d35ee94d55d3d6b15df78241a05d
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reverts/comments out parts of 45f93a817a,
which needs to be resolved in a follow-up commit.
Conflicts:
cmake/QtCreatorIDEBranding.cmake
qbs/modules/qtc/qtc.qbs
qtcreator_ide_branding.pri
share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5informationnodeinstanceserver.cpp
src/plugins/clangcodemodel/clangmodelmanagersupport.cpp
src/plugins/cmakeprojectmanager/cmakesettingspage.cpp
src/plugins/python/pythoneditor.cpp
src/plugins/qmldesigner/designercore/instances/nodeinstanceview.cpp
src/plugins/scxmleditor/common/colorsettings.cpp
Change-Id: I7f0f7b7120e75a9fc3a8886bc57c17345cbb501b
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>
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>
The model and the scene environment used to render material previews
can now be selected via buttons next to the preview in material editor.
Task-number: QDS-7347
Change-Id: I03089029e8420f80ed65be1c7b7a1ce4581f2fd4
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Auxiliary data so far used naming conventions to declare the kind of the
data. Now an enumeration is used. The auxiliaryData(...) is returning an
optional too so that it is known if a value exists. There is now
auxiliaryDataWithDefault(...) which is returning an invalid
QVariant instead.
The instance cache is now disabled because there is not notification for
information changes. So if we get the real data from the node instances
there will be no information changes because nothing changed. So the
form editor is a strange state of being reset but not all data
arrived. Before this patch there were still changes happen because of
some side effects that auxiliary properties were sent which were never
intended to be sent. If we re-enable the cache we need to send
information changes or every view must expect that the information is
already there.
Task-number: QDS-7338
Change-Id: I0cafd149c53df552c7c8442f1e8ba87f5451dbd1
Reviewed-by: Aleksei German <aleksei.german@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
It has the advantage to to move the attribute to the declaration instead
of using a workaround.
Change-Id: Ia6115ab8fefbe03f247edfea2b7bed73e9149068
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Because the project storage is integer id based the string based API
isn't fitting well for the new approach. PropertyMetaInfo can be easier
mapped to the project storage.
Task-number: QDS-7197
Change-Id: I49bc650abdaacf4b039d76c2514b5ad05ec84abe
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Added 3D checkerboard floor on all 3D previews.
Since shadows generally look bad for arbitrary 3D scenes, and would
mostly be obscured by the model itself as we want the light mostly
from the front, removed shadows also from the material preview to unify
the previews.
Qt5 had issues rendering the 3D floor texture, so used a static image
there, as Qt5 only generates previews of one size.
Fixes: QDS-7078
Change-Id: I74d094878ed01e6e531ad60df1f8d9d7cf415860
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
This is a workaround for quick3d issue QTBUG-103316, where
material library materials for editor are properly initialized only
if the first encountered View3D in the scene is also rendered first.
Fixes: QDS-7084
Change-Id: I8bb6a8e6bfe2fcffddfe86f92157d386fdf4095d
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
EffectReference is always dirty and it is the only dirty flag.
Instead, we update now if any property changed.
Task-number: QDS-7079
Change-Id: I157cf2d3b15120c33f4a6b3f53e526d555c7f80c
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>