diff options
author | A-Team <ateam@pad.test.qt.nokia.com> | 2010-10-16 22:00:12 (GMT) |
---|---|---|
committer | A-Team <ateam@pad.test.qt.nokia.com> | 2010-10-16 22:00:12 (GMT) |
commit | 6c8748a1f4738c49ba333023c190104a53a647a1 (patch) | |
tree | d212a9619438b995a444a38e82ad14c052b46cff /src/corelib | |
parent | 0b47cfe1163598bbc3e867073fb1b7c5b238fe73 (diff) | |
parent | 1cc498e36725e4019afad367b08e992e5e497be4 (diff) | |
download | Qt-6c8748a1f4738c49ba333023c190104a53a647a1.zip Qt-6c8748a1f4738c49ba333023c190104a53a647a1.tar.gz Qt-6c8748a1f4738c49ba333023c190104a53a647a1.tar.bz2 |
Merge branch '4.7-upstream' into 4.7-doc
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/kernel/qabstractitemmodel.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/corelib/kernel/qabstractitemmodel.cpp b/src/corelib/kernel/qabstractitemmodel.cpp index 6e37aee..16b14730 100644 --- a/src/corelib/kernel/qabstractitemmodel.cpp +++ b/src/corelib/kernel/qabstractitemmodel.cpp @@ -2636,8 +2636,6 @@ void QAbstractItemModel::endMoveRows() QAbstractItemModelPrivate::Change insertChange = d->changes.pop(); QAbstractItemModelPrivate::Change removeChange = d->changes.pop(); - d->itemsMoved(removeChange.parent, removeChange.first, removeChange.last, insertChange.parent, insertChange.first, Qt::Vertical); - QModelIndex adjustedSource = removeChange.parent; QModelIndex adjustedDestination = insertChange.parent; @@ -2648,6 +2646,8 @@ void QAbstractItemModel::endMoveRows() if (removeChange.needsAdjust) adjustedSource = createIndex(adjustedSource.row() + numMoved, adjustedSource.column(), adjustedSource.internalPointer()); + d->itemsMoved(adjustedSource, removeChange.first, removeChange.last, adjustedDestination, insertChange.first, Qt::Vertical); + emit rowsMoved(adjustedSource, removeChange.first, removeChange.last, adjustedDestination, insertChange.first); emit layoutChanged(); } @@ -2860,8 +2860,6 @@ void QAbstractItemModel::endMoveColumns() QAbstractItemModelPrivate::Change insertChange = d->changes.pop(); QAbstractItemModelPrivate::Change removeChange = d->changes.pop(); - d->itemsMoved(removeChange.parent, removeChange.first, removeChange.last, insertChange.parent, insertChange.first, Qt::Horizontal); - QModelIndex adjustedSource = removeChange.parent; QModelIndex adjustedDestination = insertChange.parent; @@ -2872,6 +2870,8 @@ void QAbstractItemModel::endMoveColumns() if (removeChange.needsAdjust) adjustedSource = createIndex(adjustedSource.row(), adjustedSource.column() + numMoved, adjustedSource.internalPointer()); + d->itemsMoved(adjustedSource, removeChange.first, removeChange.last, adjustedDestination, insertChange.first, Qt::Horizontal); + emit columnsMoved(adjustedSource, removeChange.first, removeChange.last, adjustedDestination, insertChange.first); emit layoutChanged(); } |