Qt: Fix test for appending rows to UAT tables
We want to return with failure when the number of entries in the row we're trying to append is greater than the number of columns, not less than the number of rows in the table. The IO Graph is the only place that uses appendEntry, and this allows adding IO Graphs past the tenth graph. Fix #18762
This commit is contained in:
parent
764890d159
commit
bf8f30eba4
|
@ -239,8 +239,9 @@ int UatModel::columnCount(const QModelIndex &parent) const
|
|||
|
||||
QModelIndex UatModel::appendEntry(QVariantList rowData)
|
||||
{
|
||||
// A row with less entries could be added, where the remaining entries are empty
|
||||
if (rowData.count() == 0 || rowData.count() < rowCount())
|
||||
// Don't add an empty row, or a row with more entries than we have columns,
|
||||
// but a row with fewer can be added, where the remaining entries are empty
|
||||
if (rowData.count() == 0 || rowData.count() > columnCount())
|
||||
return QModelIndex();
|
||||
|
||||
QModelIndex newIndex;
|
||||
|
|
Loading…
Reference in New Issue