-
Bug
-
Resolution: Fixed
-
P3: Somewhat important
-
5.15.12
-
-
6d1769791 (dev), cffe6800d (6.4), 6d971d01b (6.5)
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(); }