summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qfilesystemwatcher_inotify.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/io/qfilesystemwatcher_inotify.cpp')
-rw-r--r--src/corelib/io/qfilesystemwatcher_inotify.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/corelib/io/qfilesystemwatcher_inotify.cpp b/src/corelib/io/qfilesystemwatcher_inotify.cpp
index eef21b2fd4..e60f688110 100644
--- a/src/corelib/io/qfilesystemwatcher_inotify.cpp
+++ b/src/corelib/io/qfilesystemwatcher_inotify.cpp
@@ -217,13 +217,14 @@ QInotifyFileSystemWatcherEngine::QInotifyFileSystemWatcherEngine(int fd, QObject
notifier(fd, QSocketNotifier::Read, this)
{
fcntl(inotifyFd, F_SETFD, FD_CLOEXEC);
- connect(&notifier, SIGNAL(activated(QSocketDescriptor)), SLOT(readFromInotify()));
+ QObject::connect(&notifier, &QSocketNotifier::activated,
+ this, &QInotifyFileSystemWatcherEngine::readFromInotify);
}
QInotifyFileSystemWatcherEngine::~QInotifyFileSystemWatcherEngine()
{
notifier.setEnabled(false);
- for (int id : qAsConst(pathToID))
+ for (int id : std::as_const(pathToID))
inotify_rm_watch(inotifyFd, id < 0 ? -id : id);
::close(inotifyFd);
@@ -334,7 +335,7 @@ void QInotifyFileSystemWatcherEngine::readFromInotify()
return;
QVarLengthArray<char, 4096> buffer(buffSize);
- buffSize = read(inotifyFd, buffer.data(), buffSize);
+ buffSize = int(read(inotifyFd, buffer.data(), buffSize));
char *at = buffer.data();
char * const end = at + buffSize;