| 181 | } |
| 182 | |
| 183 | T fetchFromModel(int row, int column, int role) const |
| 184 | { |
| 185 | Q_ASSERT(m_model != nullptr); |
| 186 | |
| 187 | const QModelIndex index = m_model->index(row, column, m_rootIndex); |
| 188 | const QVariant data = index.data(role); |
| 189 | const T value = data.isNull() ? ModelDataCachePrivate::nan<T>() |
| 190 | : (data.value<T>()); |
| 191 | |
| 192 | m_data[row][column] = value; |
| 193 | m_cacheValid[row][column] = true; |
| 194 | |
| 195 | return value; |
| 196 | } |
| 197 | |
| 198 | void columnsInserted(const QModelIndex &parent, int start, int end) override |
| 199 | { |