mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 14:25:27 +00:00
Silence warnings in weightsysteminfomodel
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
b895c8574e
commit
dda7dda971
1 changed files with 4 additions and 0 deletions
|
@ -11,6 +11,7 @@ WSInfoModel *WSInfoModel::instance()
|
||||||
|
|
||||||
bool WSInfoModel::insertRows(int row, int count, const QModelIndex &parent)
|
bool WSInfoModel::insertRows(int row, int count, const QModelIndex &parent)
|
||||||
{
|
{
|
||||||
|
Q_UNUSED(row);
|
||||||
beginInsertRows(parent, rowCount(), rowCount());
|
beginInsertRows(parent, rowCount(), rowCount());
|
||||||
rows += count;
|
rows += count;
|
||||||
endInsertRows();
|
endInsertRows();
|
||||||
|
@ -19,6 +20,8 @@ bool WSInfoModel::insertRows(int row, int count, const QModelIndex &parent)
|
||||||
|
|
||||||
bool WSInfoModel::setData(const QModelIndex &index, const QVariant &value, int role)
|
bool WSInfoModel::setData(const QModelIndex &index, const QVariant &value, int role)
|
||||||
{
|
{
|
||||||
|
//WARN: check for Qt::EditRole
|
||||||
|
Q_UNUSED(role);
|
||||||
struct ws_info_t *info = &ws_info[index.row()];
|
struct ws_info_t *info = &ws_info[index.row()];
|
||||||
switch (index.column()) {
|
switch (index.column()) {
|
||||||
case DESCRIPTION:
|
case DESCRIPTION:
|
||||||
|
@ -66,6 +69,7 @@ QVariant WSInfoModel::data(const QModelIndex &index, int role) const
|
||||||
|
|
||||||
int WSInfoModel::rowCount(const QModelIndex &parent) const
|
int WSInfoModel::rowCount(const QModelIndex &parent) const
|
||||||
{
|
{
|
||||||
|
Q_UNUSED(parent);
|
||||||
return rows + 1;
|
return rows + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue