mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-30 20:28:05 -06:00
Clean up code
This commit is contained in:
@@ -30,6 +30,8 @@
|
||||
|
||||
#include <QtGlobal>
|
||||
|
||||
#include <chrono>
|
||||
|
||||
#if defined(Q_OS_MACOS) || defined(Q_OS_FREEBSD) || defined(Q_OS_OPENBSD)
|
||||
#include <cstring>
|
||||
#include <sys/mount.h>
|
||||
@@ -42,9 +44,11 @@
|
||||
#include "base/logger.h"
|
||||
#include "base/utils/fs.h"
|
||||
|
||||
using namespace std::chrono_literals;
|
||||
|
||||
namespace
|
||||
{
|
||||
const int WATCH_INTERVAL = 10000; // 10 sec
|
||||
const std::chrono::duration WATCH_INTERVAL = 10s;
|
||||
const int MAX_PARTIAL_RETRIES = 5;
|
||||
}
|
||||
|
||||
|
||||
@@ -31,7 +31,6 @@
|
||||
#include <QDir>
|
||||
#include <QFileSystemWatcher>
|
||||
#include <QHash>
|
||||
#include <QtContainerFwd>
|
||||
#include <QTimer>
|
||||
#include <QVector>
|
||||
|
||||
@@ -39,9 +38,10 @@
|
||||
* Subclassing QFileSystemWatcher in order to support Network File
|
||||
* System watching (NFS, CIFS) on Linux and Mac OS.
|
||||
*/
|
||||
class FileSystemWatcher : public QFileSystemWatcher
|
||||
class FileSystemWatcher final : public QFileSystemWatcher
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_DISABLE_COPY(FileSystemWatcher)
|
||||
|
||||
public:
|
||||
explicit FileSystemWatcher(QObject *parent = nullptr);
|
||||
@@ -53,7 +53,7 @@ public:
|
||||
signals:
|
||||
void torrentsAdded(const QStringList &pathList);
|
||||
|
||||
protected slots:
|
||||
private slots:
|
||||
void scanLocalFolder(const QString &path);
|
||||
void processPartialTorrents();
|
||||
void scanNetworkFolders();
|
||||
|
||||
Reference in New Issue
Block a user