MCPcopy Create free account
hub / github.com/KDAB/KDChart / rowsInserted

Method rowsInserted

src/KDChart/KDChartModelDataCache_p.h:287–303  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 {

Callers 1

dataMethod · 0.45

Calls 4

modelMethod · 0.45
isValidMethod · 0.45
rowCountMethod · 0.45
columnCountMethod · 0.45

Tested by

no test coverage detected