diff options
author | Olivier Goffart <ogoffart@trolltech.com> | 2009-11-16 08:41:37 (GMT) |
---|---|---|
committer | Olivier Goffart <ogoffart@trolltech.com> | 2009-11-16 08:41:50 (GMT) |
commit | aa482dcbde0089fe32ca59e39f17e5e44fd8b244 (patch) | |
tree | ab780e2f6ac7197fc67440c2b7fb9328dbebd4f7 /src/corelib | |
parent | 4712a3a1ff6192f716d4f6894c6e69386ae55411 (diff) | |
parent | b2d5f886b36b4f4d317024db7cfd6668e2895cd4 (diff) | |
download | Qt-aa482dcbde0089fe32ca59e39f17e5e44fd8b244.zip Qt-aa482dcbde0089fe32ca59e39f17e5e44fd8b244.tar.gz Qt-aa482dcbde0089fe32ca59e39f17e5e44fd8b244.tar.bz2 |
Merge commit oslo-staging-2/4.6 into upstream/4.6
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/kernel/qabstractitemmodel.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/corelib/kernel/qabstractitemmodel.cpp b/src/corelib/kernel/qabstractitemmodel.cpp index 8e2273d..10a61ca 100644 --- a/src/corelib/kernel/qabstractitemmodel.cpp +++ b/src/corelib/kernel/qabstractitemmodel.cpp @@ -2475,10 +2475,8 @@ void QAbstractItemModel::endRemoveRows() bool QAbstractItemModelPrivate::allowMove(const QModelIndex &srcParent, int start, int end, const QModelIndex &destinationParent, int destinationStart, Qt::Orientation orientation) { // Don't move the range within itself. - if ( ( destinationParent == srcParent ) - && ( destinationStart >= start ) - && ( destinationStart <= end + 1) ) - return false; + if (destinationParent == srcParent) + return !(destinationStart >= start && destinationStart <= end + 1); QModelIndex destinationAncestor = destinationParent; int pos = (Qt::Vertical == orientation) ? destinationAncestor.row() : destinationAncestor.column(); |