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

FolderListModel insertion bug

XMLWordPrintable

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

      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.

        1. fileinfothread.patch
          1.0 kB
          Jonathan Pence
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

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

              Created:
              Updated:

                There are no open Gerrit changes