QmlDesigner: Mark unused params in material editor and browser

Change-Id: I5d1e2dcd340e766f829fe78edb63dfa8beacfa78
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
This commit is contained in:
Mahmoud Badri
2022-06-01 13:59:03 +03:00
parent 6469f99995
commit e1bb5d058d
2 changed files with 21 additions and 1 deletions

View File

@@ -135,6 +135,8 @@ void MaterialBrowserView::modelAboutToBeDetached(Model *model)
void MaterialBrowserView::selectedNodesChanged(const QList<ModelNode> &selectedNodeList,
const QList<ModelNode> &lastSelectedNodeList)
{
Q_UNUSED(lastSelectedNodeList)
ModelNode selectedModel;
for (const ModelNode &node : selectedNodeList) {
@@ -176,6 +178,8 @@ void MaterialBrowserView::modelNodePreviewPixmapChanged(const ModelNode &node, c
void MaterialBrowserView::variantPropertiesChanged(const QList<VariantProperty> &propertyList,
PropertyChangeFlags propertyChange)
{
Q_UNUSED(propertyChange)
for (const VariantProperty &property : propertyList) {
ModelNode node(property.parentModelNode());
@@ -189,6 +193,8 @@ void MaterialBrowserView::nodeReparented(const ModelNode &node,
const NodeAbstractProperty &oldPropertyParent,
PropertyChangeFlags propertyChange)
{
Q_UNUSED(propertyChange)
if (!isMaterial(node))
return;
@@ -226,6 +232,9 @@ void MaterialBrowserView::nodeRemoved(const ModelNode &removedNode,
const NodeAbstractProperty &parentProperty,
PropertyChangeFlags propertyChange)
{
Q_UNUSED(removedNode)
Q_UNUSED(propertyChange)
if (parentProperty.parentModelNode().id() != Constants::MATERIAL_LIB_ID)
return;
@@ -234,6 +243,9 @@ void MaterialBrowserView::nodeRemoved(const ModelNode &removedNode,
void MaterialBrowserView::importsChanged(const QList<Import> &addedImports, const QList<Import> &removedImports)
{
Q_UNUSED(addedImports)
Q_UNUSED(removedImports)
bool hasQuick3DImport = model()->hasImport("QtQuick3D");
if (hasQuick3DImport == m_hasQuick3DImport)
@@ -241,12 +253,13 @@ void MaterialBrowserView::importsChanged(const QList<Import> &addedImports, cons
m_hasQuick3DImport = hasQuick3DImport;
refreshModel();
}
void MaterialBrowserView::customNotification(const AbstractView *view, const QString &identifier,
const QList<ModelNode> &nodeList, const QList<QVariant> &data)
{
Q_UNUSED(data)
if (view == this)
return;

View File

@@ -672,6 +672,8 @@ WidgetInfo MaterialEditorView::widgetInfo()
void MaterialEditorView::selectedNodesChanged(const QList<ModelNode> &selectedNodeList,
const QList<ModelNode> &lastSelectedNodeList)
{
Q_UNUSED(lastSelectedNodeList)
m_selectedModels.clear();
for (const ModelNode &node : selectedNodeList) {
@@ -727,6 +729,9 @@ void MaterialEditorView::modelNodePreviewPixmapChanged(const ModelNode &node, co
void MaterialEditorView::importsChanged(const QList<Import> &addedImports, const QList<Import> &removedImports)
{
Q_UNUSED(addedImports)
Q_UNUSED(removedImports)
m_hasQuick3DImport = model()->hasImport("QtQuick3D");
m_qmlBackEnd->contextObject()->setHasQuick3DImport(m_hasQuick3DImport);
@@ -784,6 +789,8 @@ void MaterialEditorView::duplicateMaterial(const ModelNode &material)
void MaterialEditorView::customNotification(const AbstractView *view, const QString &identifier,
const QList<ModelNode> &nodeList, const QList<QVariant> &data)
{
Q_UNUSED(view)
if (identifier == "selected_material_changed") {
m_selectedMaterial = nodeList.first();
QTimer::singleShot(0, this, &MaterialEditorView::resetView);