mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-14 17:23:07 -07:00
Make use of chrono literals from std library
This commit is contained in:
parent
2a5dbe840c
commit
6de72ecc77
17 changed files with 57 additions and 32 deletions
|
@ -30,6 +30,8 @@
|
|||
|
||||
#include "rss_session.h"
|
||||
|
||||
#include <chrono>
|
||||
|
||||
#include <QDebug>
|
||||
#include <QJsonDocument>
|
||||
#include <QJsonObject>
|
||||
|
@ -48,7 +50,6 @@
|
|||
#include "rss_folder.h"
|
||||
#include "rss_item.h"
|
||||
|
||||
const int MsecsPerMin = 60000;
|
||||
const QString CONF_FOLDER_NAME = u"rss"_qs;
|
||||
const QString DATA_FOLDER_NAME = u"rss/articles"_qs;
|
||||
const QString FEEDS_FILE_NAME = u"feeds.json"_qs;
|
||||
|
@ -92,7 +93,7 @@ Session::Session()
|
|||
connect(&m_refreshTimer, &QTimer::timeout, this, &Session::refresh);
|
||||
if (isProcessingEnabled())
|
||||
{
|
||||
m_refreshTimer.start(refreshInterval() * MsecsPerMin);
|
||||
m_refreshTimer.start(std::chrono::minutes(refreshInterval()));
|
||||
refresh();
|
||||
}
|
||||
|
||||
|
@ -433,7 +434,7 @@ void Session::setProcessingEnabled(const bool enabled)
|
|||
m_storeProcessingEnabled = enabled;
|
||||
if (enabled)
|
||||
{
|
||||
m_refreshTimer.start(refreshInterval() * MsecsPerMin);
|
||||
m_refreshTimer.start(std::chrono::minutes(refreshInterval()));
|
||||
refresh();
|
||||
}
|
||||
else
|
||||
|
@ -480,7 +481,7 @@ void Session::setRefreshInterval(const int refreshInterval)
|
|||
if (m_storeRefreshInterval != refreshInterval)
|
||||
{
|
||||
m_storeRefreshInterval = refreshInterval;
|
||||
m_refreshTimer.start(m_storeRefreshInterval * MsecsPerMin);
|
||||
m_refreshTimer.start(std::chrono::minutes(m_storeRefreshInterval));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue