do not lock QFileSystemWatcherEngineUnix when build on host with kevent support

fixes deadlocks on BSD

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2021-03-09 21:04:14 +02:00
parent e684904dbf
commit b54b1bb785
2 changed files with 0 additions and 7 deletions

View file

@ -221,7 +221,6 @@ QStringList QFileSystemWatcherEngineUnix::removePaths(const QStringList &paths,
}
}
#elif defined(QT_HAVE_KEVENT)
QMutexLocker locker(&mutex);
if (pathToID.isEmpty())
return p;
@ -307,7 +306,6 @@ void QFileSystemWatcherEngineUnix::readFromFd()
int fd = kev.ident;
// qDebug() << "QFileSystemWatcherEngineUnix: processing kevent" << kev.ident << kev.filter;
QMutexLocker locker(&mutex);
int id = fd;
QString path = idToPath.value(id);

View file

@ -38,7 +38,6 @@
#ifndef QT_NO_FILESYSTEMWATCHER
#include <QtCore/qhash.h>
#include <QtCore/qmutex.h>
#include <QtCore/qsocketnotifier.h>
QT_BEGIN_NAMESPACE
@ -65,10 +64,6 @@ private:
QHash<QString, int> pathToID;
QHash<int, QString> idToPath;
QSocketNotifier notifier;
#if defined(QT_HAVE_KEVENT)
QMutex mutex;
#endif
};