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

QAbstractItemModelPrivate::allowMove not allowing a valid move operation

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Not Evaluated
    • None
    • 4.6.0
    • Widgets: Itemviews
    • 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

            monsen Marius Bugge Monsen
            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