diff options
author | Marc Mutz <marc.mutz@qt.io> | 2023-06-23 10:12:15 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@qt.io> | 2023-08-18 15:01:28 +0000 |
commit | a19585eee174dd593aa979e5232e9cca677bef44 (patch) | |
tree | 46ceb03d2ddaccf7d04c53af70dd9cbfaa862823 /src/corelib/io/qfilesystemwatcher_polling.cpp | |
parent | 22858ffcedda16cd9f773df9ec74a5bff72a081a (diff) |
QPollingFileSystemWatcherEngine: change PollingInterval to chrono::seconds
More expressive and type-safe.
Move it to the .cpp file (the only user) and make it static to avoid
creating a non-namespaced symbol.
Pick-to: 6.6
Change-Id: Ib9b393e660e51c1791ed3a9a4a12e5c75736bf2a
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/corelib/io/qfilesystemwatcher_polling.cpp')
-rw-r--r-- | src/corelib/io/qfilesystemwatcher_polling.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/corelib/io/qfilesystemwatcher_polling.cpp b/src/corelib/io/qfilesystemwatcher_polling.cpp index 6ec8b17ea4..a74205b713 100644 --- a/src/corelib/io/qfilesystemwatcher_polling.cpp +++ b/src/corelib/io/qfilesystemwatcher_polling.cpp @@ -2,11 +2,18 @@ // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #include "qfilesystemwatcher_polling_p.h" + #include <QtCore/qscopeguard.h> #include <QtCore/qtimer.h> +#include <chrono> + +using namespace std::chrono_literals; + QT_BEGIN_NAMESPACE +static constexpr auto PollingInterval = 1s; + QPollingFileSystemWatcherEngine::QPollingFileSystemWatcherEngine(QObject *parent) : QFileSystemWatcherEngine(parent) { |