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

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

XMLWordPrintable

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

      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);
      }
      

        For Gerrit Dashboard: QTBUG-98147
        # Subject Branch Project Status CR V

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            niqingliang2003 niqingliang2003
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                There is 1 open Gerrit change