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

FolderListModel insertion bug

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.1.1
    • Quick: Other
    • None

    Description

      The FolderListModel component behaves incorrectly when a file gets appended to the end of the model. For example, if I'm watching a folder with two files, "alice" and "bob", an then create a file named "carol", the view attached to my FolderListModel will be updated to show "alice", "bob", and "bob".

      The error is in FileInfoThread::findChangeRange(const QList<FileProperty> &list, int &fromIndex, int &toIndex). The return parameter "fromIndex" gets decremented when the change occurs at the end of the list. This is incorrect! Simply removing the "changeFound" condition solves the problem.

      I'm currently using Qt 5.1.1 but this bug is still present in the latest 5.3 alpha.

      Attachments

        Issue Links

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

          Activity

            People

              qt.team.quick.subscriptions Qt Quick and Widgets Team
              japence Jonathan Pence
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes