Mod: fix several compiler warnings:

* fix -Wsometimes-uninitialized
* fix -Wunused-parameter
* fix -Wunused-variable
* fix -Winconsistent-missing-override
* fix -Wsign-compare
* fix -Wreorder-ctor
* fix -Wtautological-overlap-compare
This commit is contained in:
wmayer
2024-02-07 11:44:00 +01:00
committed by Chris Hennes
parent 5af7933462
commit df7e783513
12 changed files with 17 additions and 21 deletions

View File

@@ -140,8 +140,6 @@ void Array2D::onDataChanged(const QModelIndex& topLeft,
void Array2D::onContextMenu(const QPoint& pos)
{
QModelIndex index = ui->tableView->indexAt(pos);
QMenu contextMenu(tr("Context menu"), this);
contextMenu.addAction(&_deleteAction);

View File

@@ -54,10 +54,12 @@ public:
protected:
Materials::MaterialValue::ValueType getType(const QModelIndex& index) const override
{
Q_UNUSED(index)
return _type;
}
QString getUnits(const QModelIndex& index) const override
{
Q_UNUSED(index)
return _units;
}
QVariant getValue(const QModelIndex& index) const override;

View File

@@ -263,7 +263,7 @@ void MaterialDelegate::showImageModal(const QString& propertyName, QStandardItem
dlg->adjustSize();
connect(dlg, &QDialog::finished, this, [&](int result) {});
//connect(dlg, &QDialog::finished, this, [&](int result) {});
dlg->exec();
}
@@ -277,7 +277,7 @@ void MaterialDelegate::showListModal(const QString& propertyName, QStandardItem*
dlg->adjustSize();
connect(dlg, &QDialog::finished, this, [&](int result) {});
//connect(dlg, &QDialog::finished, this, [&](int result) {});
dlg->exec();
}
@@ -291,7 +291,7 @@ void MaterialDelegate::showMultiLineStringModal(const QString& propertyName, QSt
dlg->adjustSize();
connect(dlg, &QDialog::finished, this, [&](int result) {});
//connect(dlg, &QDialog::finished, this, [&](int result) {});
dlg->exec();
}
@@ -306,7 +306,7 @@ void MaterialDelegate::showArray2DModal(const QString& propertyName, QStandardIt
dlg->adjustSize();
connect(dlg, &QDialog::finished, this, [&](int result) {});
//connect(dlg, &QDialog::finished, this, [&](int result) {});
dlg->exec();
}
@@ -320,7 +320,7 @@ void MaterialDelegate::showArray3DModal(const QString& propertyName, QStandardIt
dlg->adjustSize();
connect(dlg, &QDialog::finished, this, [&](int result) {});
//connect(dlg, &QDialog::finished, this, [&](int result) {});
dlg->exec();
}

View File

@@ -63,8 +63,8 @@ MaterialsEditor::MaterialsEditor(QWidget* parent)
: QDialog(parent)
, ui(new Ui_MaterialsEditor)
, _material(std::make_shared<Materials::Material>())
, _edited(false)
, _rendered(nullptr)
, _edited(false)
, _recentMax(0)
{
ui->setupUi(this);