Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-6940

QAbstractItemModelPrivate::allowMove not allowing a valid move operation

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Not Evaluated
    • Resolution: Invalid
    • Affects Version/s: 4.6.0
    • Fix Version/s: None
    • Component/s: Widgets: Itemviews
    • Labels:
      None

      Description

      When using QAbstractItemModel::beginInsertRows it is not possible to move a row to the position below it (when having the same parent).

      There seems to be a bug in the validity test : (in QAbstractItemModelPrivate::allowMove)
      // Don't move the range within itself.
      if (destinationParent == srcParent)
      return !(destinationStart >= start && destinationStart <= end + 1);

      Should be :
      // Don't move the range within itself.
      if (destinationParent == srcParent)
      return !(destinationStart >= start && destinationStart <= end);

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            • Assignee:
              monsen Marius Bugge Monsen
              Reporter:
              jmgr Jonathan Mercier-Ganady
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Gerrit Reviews

                There are no open Gerrit changes