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

folderlistmodel holds the folder open even after changing, prevents ejecting removable devices

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.2.1
    • Quick: Other
    • None
    • Windows

    Description

      qt.labs.folderlistmodel:
      change 'folder' will not free old 'folder', it looks like it still watch old 'folder', which result in:
      we can't eject removable usb storage.

      after checked the src code, I found that removePath and setPath used different parameter, maybe they should all use 'd->currentDir.path()' or all use resolved path as parameter:

      void QQuickFolderListModel::setFolder(const QUrl &folder)
      {
      ......
          QString resolvedPath = QQuickFolderListModelPrivate::resolvePath(folder);
      .......
              d->fileInfoThread.removePath(d->currentDir.path());
      
          d->currentDir = folder;
      ......
          d->fileInfoThread.setPath(resolvedPath);
      }
      

      Attachments

        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
            niqingliang2003 niqingliang2003
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes