summaryrefslogtreecommitdiff
path: root/src/controls/Private/qquicktreemodeladaptor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/controls/Private/qquicktreemodeladaptor.cpp')
-rw-r--r--src/controls/Private/qquicktreemodeladaptor.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/controls/Private/qquicktreemodeladaptor.cpp b/src/controls/Private/qquicktreemodeladaptor.cpp
index 287b388f..c2c36494 100644
--- a/src/controls/Private/qquicktreemodeladaptor.cpp
+++ b/src/controls/Private/qquicktreemodeladaptor.cpp
@@ -741,13 +741,13 @@ void QQuickTreeModelAdaptor1::modelRowsAboutToBeMoved(const QModelIndex & source
int bufferCopyOffset;
if (destIndex > endIndex) {
for (int i = endIndex + 1; i < destIndex; i++) {
- m_items.swap(i, i - totalMovedCount); // Fast move from 1st to 2nd position
+ m_items.swapItemsAt(i, i - totalMovedCount); // Fast move from 1st to 2nd position
}
bufferCopyOffset = destIndex - totalMovedCount;
} else {
// NOTE: we will not enter this loop if startIndex == destIndex
for (int i = startIndex - 1; i >= destIndex; i--) {
- m_items.swap(i, i + totalMovedCount); // Fast move from 1st to 2nd position
+ m_items.swapItemsAt(i, i + totalMovedCount); // Fast move from 1st to 2nd position
}
bufferCopyOffset = destIndex;
}