6#include <QtCore/qlatin1stringview.h>
7#include <QtCore/qscopeguard.h>
8#include <QtCore/qtimer.h>
12using namespace std::chrono_literals;
36 if (directories->contains(
path))
38 directories->append(
path);
39 if (!
path.endsWith(u
'/'))
41 this->directories.insert(
path, fi);
46 this->files.insert(
path, fi);
52#ifdef QT_BUILD_INTERNAL
58 if ((!this->files.isEmpty() ||
59 !
this->directories.isEmpty()) &&
61 timer.
start(interval,
this);
73 if (this->directories.remove(
path)) {
74 directories->removeAll(
path);
75 }
else if (this->files.remove(
path)) {
78 unhandled.push_back(
path);
82 if (this->files.isEmpty() &&
83 this->directories.isEmpty()) {
102 }
else if (
it.value() != fi) {
112 if (!
path.endsWith(u
'/'))
118 }
else if (
it.value() != fi) {
135#include "moc_qfilesystemwatcher_polling_p.cpp"
void start(int msec, QObject *obj)
\obsolete Use chrono overload instead.
int timerId() const noexcept
Returns the timer's ID.
void stop()
Stops the timer.
bool isActive() const noexcept
Returns true if the timer is running and has not been stopped; otherwise returns false.
void directoryChanged(const QString &path, bool removed)
void fileChanged(const QString &path, bool removed)
iterator begin()
Returns an \l{STL-style iterators}{STL-style iterator} pointing to the first item in the hash.
iterator erase(const_iterator it)
iterator end() noexcept
Returns an \l{STL-style iterators}{STL-style iterator} pointing to the imaginary item after the last ...
QObject * parent() const
Returns a pointer to the parent object.
QString objectName
the name of this object
virtual void timerEvent(QTimerEvent *event)
This event handler can be reimplemented in a subclass to receive timer events for the object.
QPollingFileSystemWatcherEngine(QObject *parent)
void timerEvent(QTimerEvent *) final
This event handler can be reimplemented in a subclass to receive timer events for the object.
QStringList addPaths(const QStringList &paths, QStringList *files, QStringList *directories) override
QStringList removePaths(const QStringList &paths, QStringList *files, QStringList *directories) override
\macro QT_RESTRICTED_CAST_FROM_ASCII
int timerId() const
Returns the unique timer identifier, which is the same identifier as returned from QObject::startTime...
QSet< QString >::iterator it
Combined button and popup list for selecting options.
static constexpr auto PollingInterval
GLsizei const GLuint * paths
GLsizei const GLchar *const * path
QScopeGuard< typename std::decay< F >::type > qScopeGuard(F &&f)
[qScopeGuard]