| 285 | } |
| 286 | |
| 287 | void rowsInserted(const QModelIndex &parent, int start, int end) override |
| 288 | { |
| 289 | Q_ASSERT(m_model != nullptr); |
| 290 | Q_ASSERT(parent.model() == m_model || !parent.isValid()); |
| 291 | |
| 292 | if (parent != m_rootIndex || start >= m_model->rowCount(m_rootIndex)) |
| 293 | return; |
| 294 | |
| 295 | Q_ASSERT(start <= end); |
| 296 | Q_ASSERT(end - start + 1 <= m_model->rowCount(m_rootIndex)); |
| 297 | |
| 298 | m_data.insert(start, end - start + 1, QVector<T>(m_model->columnCount(m_rootIndex))); |
| 299 | m_cacheValid.insert(start, end - start + 1, QVector<bool>(m_model->columnCount(m_rootIndex), false)); |
| 300 | |
| 301 | Q_ASSERT(m_data.count() == m_model->rowCount(m_rootIndex)); |
| 302 | Q_ASSERT(m_cacheValid.count() == m_model->rowCount(m_rootIndex)); |
| 303 | } |
| 304 | |
| 305 | void rowsRemoved(const QModelIndex &parent, int start, int end) override |
| 306 | { |
no test coverage detected