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>
Added check that target node is actually a model when applying material.
Fixes: QDS-7843
Change-Id: I6e165280c8b79ebbf8316861fe0eb9b947eac3be
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Now we store the current value of copied properties at copy time
instead of just storing a reference to copied property. This ensures
we paste the correct value.
When copying all properties, properties set by base state,
current state, and active timeline are copied.
Fixes: QDS-7804
Change-Id: Id6315dde96b30304fde007a87da578faaab43233
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>
When copying specific set of properties, old values need to be cleared
just like in case of copying all properties to ensure also default
values get copied.
Fixes: QDS-7522
Change-Id: I314ff70b6e611bec3f662b86f964d789618c1df7
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Many validation tests can now be skipped.
Task-number: QDS-7454
Change-Id: I01c37ff9747260940400043d2a0e39bb2700ee5b
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
We apply not very often the parent to views. So it can lead to dangling
pointer if the parent is used by other objects and does not handle the
null pointer case. It can lead to double deletion if the parent is
deleted before the object when it is on the stack or handled by smart
pointer.
If you really want to use it there is still setParent.
Change-Id: I1fc6b145a50f037a0e9d415fb36e7970ea7296ed
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
TO save space and make material names clearer.
Change-Id: I1cea8787ca03a37adca6e4a0f352732d50bc1b40
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
When apply a material from the material bundle directly to a model in
the 3D scene, check frist if there is an existing material that has no
properties set, if so apply it instead of creating a new instance.
Also few tweaks.
Change-Id: I4ddadfd84442164b671645af5e4f5d9e8dcb7cb0
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
IsSubClass is renamed to isBasedOn and takes now NodeMetaInfo as a
parameter. But for most cases there are is... functions as short cut.
The model is providing shortcut NodeMetaInfos too. This is done in the
sake of caching.
Task-number: QDS-7445
Change-Id: Iff2dea66e253b412105427134bd49cb16ed76193
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
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>
Load property groups file only if Quick3D import exists
Change-Id: Idf7b95cb4efa34dde6196964e5e2cbad54341193
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
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>
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>
If browser model is not cleared, subsequent project open may crash.
Fixes: QDS-7194
Change-Id: Ic897086c8da1f774ff035af9e2bcaa378bff3af5
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
It has the advantage to to move the attribute to the declaration instead
of using a workaround.
Change-Id: I08b712f146a0625d0367657c31d6c1e5f7caec41
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Added model pointer validity checks into a few places.
Fixes: QDS-7191
Change-Id: I94beb134f4d9a0b1c7fc9dc87da1d02ad255beaa
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Ensure just one reset call for cases where multiple materials are added
at once, and detect reset completion from root instance completion
notification instead of reset trigger notification, as it comes later
and catches all puppet reset cases.
Fixes: QDS-7119
Change-Id: I99baa718bd1c85b4581f07ce75193213110e8e96
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Import change causes puppet to reset, so bit of delay is needed there
before triggering material browser refresh.
Also added similar delay to refresh done at model attach as it seems
puppet reset can sometimes be triggered after attach as well.
Fixes: QDS-7172
Change-Id: I47f7af54e55af074fb2b9e8cdb9e78fb051a16cc
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This is workaround for material rendering issues in quick3d when a
material is shared by multiple windows.
Fixes: QDS-7096
Fixes: QDS-7118
Change-Id: I64fe2e51c5dda8e238502e5d926b6938b7b0731a
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
When there is no valid model selected, disable the "apply to selected"
actions in the material editor and browser.
Change-Id: Id8e771c64e69c0ba2f42dff01d19ffbf4afafb77
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>