mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-19 06:57:24 -06:00
Make use of chrono literals from std library
This commit is contained in:
@@ -29,7 +29,9 @@
|
||||
|
||||
#include "settingsstorage.h"
|
||||
|
||||
#include <chrono>
|
||||
#include <memory>
|
||||
|
||||
#include <QFile>
|
||||
#include <QHash>
|
||||
|
||||
@@ -39,6 +41,8 @@
|
||||
#include "profile.h"
|
||||
#include "utils/fs.h"
|
||||
|
||||
using namespace std::chrono_literals;
|
||||
|
||||
namespace
|
||||
{
|
||||
// Encapsulates serialization of settings in "atomic" way.
|
||||
@@ -73,7 +77,7 @@ SettingsStorage::SettingsStorage()
|
||||
: m_data {TransactionalSettings(u"qBittorrent"_qs).read()}
|
||||
{
|
||||
m_timer.setSingleShot(true);
|
||||
m_timer.setInterval(5 * 1000);
|
||||
m_timer.setInterval(5s);
|
||||
connect(&m_timer, &QTimer::timeout, this, &SettingsStorage::save);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user