const int movedRangeEnd = range.index + range.count;
for (int i = range.index; i < movedRangeEnd; ++i) {
- const int newIndex = movedToIndexes.at(i);
+ const int newIndex = movedToIndexes.at(i - range.index);
newSizeHintCache[newIndex] = m_sizeHintCache.at(i);
}
void KItemListSizeHintResolver::clearCache()
{
- const int count = m_sizeHintCache.count();
- for (int i = 0; i < count; ++i) {
- m_sizeHintCache[i] = QSizeF();
- }
+ m_sizeHintCache.fill(QSizeF());
}