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>
This commit is contained in:
parent
22858ffced
commit
a19585eee1
@ -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)
|
||||
{
|
||||
|
@ -27,8 +27,6 @@
|
||||
QT_REQUIRE_CONFIG(filesystemwatcher);
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
enum { PollingInterval = 1000 };
|
||||
|
||||
class QPollingFileSystemWatcherEngine : public QFileSystemWatcherEngine
|
||||
{
|
||||
Q_OBJECT
|
||||
|
Loading…
Reference in New Issue
Block a user