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

removed files displays in qfilesystemmodel

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.6.0 RC
    • 5.5.1
    • Widgets: Itemviews
    • None
    • MAC OS X, Windows etc.
    • 0d54b0f4ddb3ec3e14f39d954eb43b10100bbce9

    Description

      When you try to remove non-empty folder using rmdir you get unexpected result: folder will not be deleted, but will not watched, so if you will delete files in this folder - those files still will be displayed.

      Problem is here:
      QFileSystemModel.cpp, line 1673 (Qt 5.4)

      Bar.java
      bool QFileSystemModel::rmdir(const QModelIndex &aindex)
      {
          QString path = filePath(aindex);
      #ifndef QT_NO_FILESYSTEMWATCHER
          QFileSystemModelPrivate * d = const_cast<QFileSystemModelPrivate*>(d_func());
          d->fileInfoGatherer.removePath(path); //will remove path from gatherer
      #endif
          return QDir().rmdir(path); // can return false and will not remove dir, so this dir will be removed from gatherer but not will be removed from file system
      }
      

      Attachments

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

        Activity

          People

            peppe Giuseppe D'Angelo
            ctin Konstantin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes