mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 18:40:05 +00:00
fixed missing static cast on size_t to int convertion
This commit is contained in:
parent
0c20e49831
commit
60a059078c
1 changed files with 3 additions and 2 deletions
|
|
@ -244,10 +244,11 @@ bool MarkerModel::setData(const QModelIndex& index,
|
||||||
|
|
||||||
void MarkerModel::HandleMarkersInitialized(size_t count)
|
void MarkerModel::HandleMarkersInitialized(size_t count)
|
||||||
{
|
{
|
||||||
|
const int index = static_cast<int>(count - 1);
|
||||||
QModelIndex topLeft = createIndex(0, kFirstColumn);
|
QModelIndex topLeft = createIndex(0, kFirstColumn);
|
||||||
QModelIndex bottomRight = createIndex(count - 1, kLastColumn);
|
QModelIndex bottomRight = createIndex(index, kLastColumn);
|
||||||
|
|
||||||
beginInsertRows(QModelIndex(), 0, count - 1);
|
beginInsertRows(QModelIndex(), 0, index);
|
||||||
endInsertRows();
|
endInsertRows();
|
||||||
|
|
||||||
Q_EMIT dataChanged(topLeft, bottomRight);
|
Q_EMIT dataChanged(topLeft, bottomRight);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue