forked from qt-creator/qt-creator
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:
@@ -135,6 +135,8 @@ void MaterialBrowserView::modelAboutToBeDetached(Model *model)
|
|||||||
void MaterialBrowserView::selectedNodesChanged(const QList<ModelNode> &selectedNodeList,
|
void MaterialBrowserView::selectedNodesChanged(const QList<ModelNode> &selectedNodeList,
|
||||||
const QList<ModelNode> &lastSelectedNodeList)
|
const QList<ModelNode> &lastSelectedNodeList)
|
||||||
{
|
{
|
||||||
|
Q_UNUSED(lastSelectedNodeList)
|
||||||
|
|
||||||
ModelNode selectedModel;
|
ModelNode selectedModel;
|
||||||
|
|
||||||
for (const ModelNode &node : selectedNodeList) {
|
for (const ModelNode &node : selectedNodeList) {
|
||||||
@@ -176,6 +178,8 @@ void MaterialBrowserView::modelNodePreviewPixmapChanged(const ModelNode &node, c
|
|||||||
void MaterialBrowserView::variantPropertiesChanged(const QList<VariantProperty> &propertyList,
|
void MaterialBrowserView::variantPropertiesChanged(const QList<VariantProperty> &propertyList,
|
||||||
PropertyChangeFlags propertyChange)
|
PropertyChangeFlags propertyChange)
|
||||||
{
|
{
|
||||||
|
Q_UNUSED(propertyChange)
|
||||||
|
|
||||||
for (const VariantProperty &property : propertyList) {
|
for (const VariantProperty &property : propertyList) {
|
||||||
ModelNode node(property.parentModelNode());
|
ModelNode node(property.parentModelNode());
|
||||||
|
|
||||||
@@ -189,6 +193,8 @@ void MaterialBrowserView::nodeReparented(const ModelNode &node,
|
|||||||
const NodeAbstractProperty &oldPropertyParent,
|
const NodeAbstractProperty &oldPropertyParent,
|
||||||
PropertyChangeFlags propertyChange)
|
PropertyChangeFlags propertyChange)
|
||||||
{
|
{
|
||||||
|
Q_UNUSED(propertyChange)
|
||||||
|
|
||||||
if (!isMaterial(node))
|
if (!isMaterial(node))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -226,6 +232,9 @@ void MaterialBrowserView::nodeRemoved(const ModelNode &removedNode,
|
|||||||
const NodeAbstractProperty &parentProperty,
|
const NodeAbstractProperty &parentProperty,
|
||||||
PropertyChangeFlags propertyChange)
|
PropertyChangeFlags propertyChange)
|
||||||
{
|
{
|
||||||
|
Q_UNUSED(removedNode)
|
||||||
|
Q_UNUSED(propertyChange)
|
||||||
|
|
||||||
if (parentProperty.parentModelNode().id() != Constants::MATERIAL_LIB_ID)
|
if (parentProperty.parentModelNode().id() != Constants::MATERIAL_LIB_ID)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -234,6 +243,9 @@ void MaterialBrowserView::nodeRemoved(const ModelNode &removedNode,
|
|||||||
|
|
||||||
void MaterialBrowserView::importsChanged(const QList<Import> &addedImports, const QList<Import> &removedImports)
|
void MaterialBrowserView::importsChanged(const QList<Import> &addedImports, const QList<Import> &removedImports)
|
||||||
{
|
{
|
||||||
|
Q_UNUSED(addedImports)
|
||||||
|
Q_UNUSED(removedImports)
|
||||||
|
|
||||||
bool hasQuick3DImport = model()->hasImport("QtQuick3D");
|
bool hasQuick3DImport = model()->hasImport("QtQuick3D");
|
||||||
|
|
||||||
if (hasQuick3DImport == m_hasQuick3DImport)
|
if (hasQuick3DImport == m_hasQuick3DImport)
|
||||||
@@ -241,12 +253,13 @@ void MaterialBrowserView::importsChanged(const QList<Import> &addedImports, cons
|
|||||||
|
|
||||||
m_hasQuick3DImport = hasQuick3DImport;
|
m_hasQuick3DImport = hasQuick3DImport;
|
||||||
refreshModel();
|
refreshModel();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MaterialBrowserView::customNotification(const AbstractView *view, const QString &identifier,
|
void MaterialBrowserView::customNotification(const AbstractView *view, const QString &identifier,
|
||||||
const QList<ModelNode> &nodeList, const QList<QVariant> &data)
|
const QList<ModelNode> &nodeList, const QList<QVariant> &data)
|
||||||
{
|
{
|
||||||
|
Q_UNUSED(data)
|
||||||
|
|
||||||
if (view == this)
|
if (view == this)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@@ -672,6 +672,8 @@ WidgetInfo MaterialEditorView::widgetInfo()
|
|||||||
void MaterialEditorView::selectedNodesChanged(const QList<ModelNode> &selectedNodeList,
|
void MaterialEditorView::selectedNodesChanged(const QList<ModelNode> &selectedNodeList,
|
||||||
const QList<ModelNode> &lastSelectedNodeList)
|
const QList<ModelNode> &lastSelectedNodeList)
|
||||||
{
|
{
|
||||||
|
Q_UNUSED(lastSelectedNodeList)
|
||||||
|
|
||||||
m_selectedModels.clear();
|
m_selectedModels.clear();
|
||||||
|
|
||||||
for (const ModelNode &node : selectedNodeList) {
|
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)
|
void MaterialEditorView::importsChanged(const QList<Import> &addedImports, const QList<Import> &removedImports)
|
||||||
{
|
{
|
||||||
|
Q_UNUSED(addedImports)
|
||||||
|
Q_UNUSED(removedImports)
|
||||||
|
|
||||||
m_hasQuick3DImport = model()->hasImport("QtQuick3D");
|
m_hasQuick3DImport = model()->hasImport("QtQuick3D");
|
||||||
m_qmlBackEnd->contextObject()->setHasQuick3DImport(m_hasQuick3DImport);
|
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,
|
void MaterialEditorView::customNotification(const AbstractView *view, const QString &identifier,
|
||||||
const QList<ModelNode> &nodeList, const QList<QVariant> &data)
|
const QList<ModelNode> &nodeList, const QList<QVariant> &data)
|
||||||
{
|
{
|
||||||
|
Q_UNUSED(view)
|
||||||
|
|
||||||
if (identifier == "selected_material_changed") {
|
if (identifier == "selected_material_changed") {
|
||||||
m_selectedMaterial = nodeList.first();
|
m_selectedMaterial = nodeList.first();
|
||||||
QTimer::singleShot(0, this, &MaterialEditorView::resetView);
|
QTimer::singleShot(0, this, &MaterialEditorView::resetView);
|
||||||
|
Reference in New Issue
Block a user