mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-08-15 11:04:12 +02:00
sources/qetgraphicsitem/ViewItem/projectdbmodel.cpp
QVector<int>(Qt::DisplayRole) creates a vector of size 0 (since Qt::DisplayRole == 0), not a vector containing DisplayRole. Fixed
to {Qt::DisplayRole}.
The sam applies to QVector<int>(role) which gets changed to {role}.
This commit is contained in:
@@ -146,7 +146,7 @@ bool ProjectDBModel::setData(const QModelIndex &index, const QVariant &value, in
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
m_index_0_0_data.insert(role, value);
|
m_index_0_0_data.insert(role, value);
|
||||||
emit dataChanged(index, index, QVector<int>(role));
|
emit dataChanged(index, index, {role});
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -332,7 +332,7 @@ void ProjectDBModel::dataBaseUpdated()
|
|||||||
auto row = m_record.size();
|
auto row = m_record.size();
|
||||||
auto col = row ? m_record.first().count() : 1;
|
auto col = row ? m_record.first().count() : 1;
|
||||||
|
|
||||||
emit dataChanged(this->index(0,0), this->index(row-1, col-1), QVector<int>(Qt::DisplayRole));
|
emit dataChanged(this->index(0,0), this->index(row-1, col-1), {Qt::DisplayRole});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user