qt-models: Change Q_UNUSED to no parameter name

C++ permits use of parameters without name, which signals unused

Signed-off-by: Jan Iversen <jani@apache.org>
This commit is contained in:
jan Iversen 2018-05-21 17:53:42 +02:00 committed by Dirk Hohndel
parent 52031f0aba
commit b0e48a5e8f
18 changed files with 39 additions and 90 deletions

View file

@ -15,19 +15,17 @@ const QString &TankInfoModel::biggerString() const
return biggerEntry;
}
bool TankInfoModel::insertRows(int row, int count, const QModelIndex &parent)
bool TankInfoModel::insertRows(int, int count, const QModelIndex &parent)
{
Q_UNUSED(row);
beginInsertRows(parent, rowCount(), rowCount());
rows += count;
endInsertRows();
return true;
}
bool TankInfoModel::setData(const QModelIndex &index, const QVariant &value, int role)
bool TankInfoModel::setData(const QModelIndex &index, const QVariant &value, int)
{
//WARN Seems wrong, we need to check for role == Qt::EditRole
Q_UNUSED(role);
if (index.row() < 0 || index.row() > MAX_TANK_INFO - 1)
return false;
@ -84,9 +82,8 @@ QVariant TankInfoModel::data(const QModelIndex &index, int role) const
return ret;
}
int TankInfoModel::rowCount(const QModelIndex &parent) const
int TankInfoModel::rowCount(const QModelIndex&) const
{
Q_UNUSED(parent);
return rows + 1;
}