23 : QFileSystemWatcher(parent)
29 : QFileSystemWatcher(paths, parent)
34void DelayedFileWatcher::init()
36 connect(
this, &QFileSystemWatcher::directoryChanged,
this, &DelayedFileWatcher::slotDirectoryChanged);
37 connect(
this, &QFileSystemWatcher::fileChanged,
this, &DelayedFileWatcher::slotFileChanged);
40void DelayedFileWatcher::slotDirectoryChanged(
const QString &path)
42 m_dirQueue.enqueue(path);
43 QTimer::singleShot(500,
this, &DelayedFileWatcher::dequeueDirectory);
46void DelayedFileWatcher::slotFileChanged(
const QString &path)
48 m_fileQueue.enqueue(path);
49 QTimer::singleShot(500,
this, &DelayedFileWatcher::dequeueFile);
52void DelayedFileWatcher::dequeueDirectory()
57void DelayedFileWatcher::dequeueFile()
DelayedFileWatcher(QObject *parent=nullptr)
void delayedFileChanged(const QString &path)
void delayedDirectoryChanged(const QString &path)