mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-08-14 18:44:13 +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;
|
||||
}
|
||||
m_index_0_0_data.insert(role, value);
|
||||
emit dataChanged(index, index, QVector<int>(role));
|
||||
emit dataChanged(index, index, {role});
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -332,7 +332,7 @@ void ProjectDBModel::dataBaseUpdated()
|
||||
auto row = m_record.size();
|
||||
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