QmlDesigner: Adapt to C++ 17 [[maybe_unused]]

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>
This commit is contained in:
Marco Bubke
2022-07-07 18:04:18 +02:00
committed by Tim Jenssen
parent 67324512e9
commit 9faf6d0826
71 changed files with 220 additions and 396 deletions

View File

@@ -656,10 +656,8 @@ WidgetInfo MaterialEditorView::widgetInfo()
}
void MaterialEditorView::selectedNodesChanged(const QList<ModelNode> &selectedNodeList,
const QList<ModelNode> &lastSelectedNodeList)
[[maybe_unused]] const QList<ModelNode> &lastSelectedNodeList)
{
Q_UNUSED(lastSelectedNodeList)
m_selectedModels.clear();
for (const ModelNode &node : selectedNodeList) {
@@ -717,11 +715,9 @@ void MaterialEditorView::modelNodePreviewPixmapChanged(const ModelNode &node, co
m_qmlBackEnd->updateMaterialPreview(pixmap);
}
void MaterialEditorView::importsChanged(const QList<Import> &addedImports, const QList<Import> &removedImports)
void MaterialEditorView::importsChanged([[maybe_unused]] const QList<Import> &addedImports,
[[maybe_unused]] const QList<Import> &removedImports)
{
Q_UNUSED(addedImports)
Q_UNUSED(removedImports)
m_hasQuick3DImport = model()->hasImport("QtQuick3D");
m_qmlBackEnd->contextObject()->setHasQuick3DImport(m_hasQuick3DImport);
@@ -779,11 +775,11 @@ void MaterialEditorView::duplicateMaterial(const ModelNode &material)
});
}
void MaterialEditorView::customNotification(const AbstractView *view, const QString &identifier,
const QList<ModelNode> &nodeList, const QList<QVariant> &data)
void MaterialEditorView::customNotification([[maybe_unused]] 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);