diff options
author | Gabriel de Dietrich <gabriel.dietrich-de@nokia.com> | 2009-12-07 12:40:14 (GMT) |
---|---|---|
committer | Gabriel de Dietrich <gabriel.dietrich-de@nokia.com> | 2009-12-07 14:18:31 (GMT) |
commit | 9a45e1853374c735dc08bf2e23b9d820900b1ccb (patch) | |
tree | 905311431b7985469bcf65e29667674a9510a6bf /src | |
parent | fb78a402b512b017c850e7410745c4d20da04a7c (diff) | |
download | Qt-9a45e1853374c735dc08bf2e23b9d820900b1ccb.zip Qt-9a45e1853374c735dc08bf2e23b9d820900b1ccb.tar.gz Qt-9a45e1853374c735dc08bf2e23b9d820900b1ccb.tar.bz2 |
Assert in designer while drag & dropping items from a QListWidget
Did not honour returned value from beginMoveRows(). Auto-test included.
Reviewed-by: leo
Task-number: QTBUG-6532
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/itemviews/qlistwidget.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/itemviews/qlistwidget.cpp b/src/gui/itemviews/qlistwidget.cpp index 5dd1d76..929d688 100644 --- a/src/gui/itemviews/qlistwidget.cpp +++ b/src/gui/itemviews/qlistwidget.cpp @@ -176,7 +176,8 @@ void QListModel::move(int srcRow, int dstRow) || dstRow < 0 || dstRow >= items.count()) return; - beginMoveRows(QModelIndex(), srcRow, srcRow, QModelIndex(), dstRow); + if (!beginMoveRows(QModelIndex(), srcRow, srcRow, QModelIndex(), dstRow)) + return; if (srcRow < dstRow) --dstRow; items.move(srcRow, dstRow); |