Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.9.3
-
None
Description
bool QStandardItemPrivate::insertRows(int row, const QList<QStandardItem*> &items) { Q_Q(QStandardItem); if ((row < 0) || (row > rowCount())) return false; int count = items.count(); if (model) model->d_func()->rowsAboutToBeInserted(q, row, row + count - 1);
If 'count' is 0 and 'row' is 0, than 'row + count - 1' will -1.
In this situation QAbstractItemModel::beginInsertRows failed on
Q_ASSERT(last >= first);
Attachments
For Gerrit Dashboard: QTBUG-66491 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
222044,2 | QStandardItem: add more sanity checks on insertRow(s)/Column(s) | 5.11 | qt/qtbase | Status: MERGED | +2 | 0 |