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

QFileSystemWatcher::removePaths() Does not removes drive

    XMLWordPrintable

Details

    • Windows
    • 6d1769791 (dev), cffe6800d (6.4), 6d971d01b (6.5)

    Description

      If any drive is added to QFileSystemWatcher and latter removePaths() is called to remove all directories, this returns false.
      following tiny example shows this:

      #include <QtCore/QCoreApplication>
      #include <QFileSystemWatcher>
      #include <QDebug>
      #include <QStringList>
      
      int main(int argc, char *argv[])
      {
          QCoreApplication a(argc, argv);
          QFileSystemWatcher* w = new QFileSystemWatcher;
          w->addPath("D:\\");
          auto r = w->removePaths(w->directories());
          qDebug()<<r;// This still prints D:\
      
          //w->addPath("D:\\tmp");
          // auto r = w->removePaths(w->directories());// This works
          //qDebug()<<r; // prints nothing
          return a.exec();
      } 

      Attachments

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

        Activity

          People

            thiago Thiago Macieira
            irfan.omair@digia.com Irfan Omair
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: