mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-11-25 02:36:10 +03:00
Change some types (uint -> int) in Session class
This commit is contained in:
parent
87864531ab
commit
deffdbe881
3 changed files with 12 additions and 12 deletions
|
@ -498,7 +498,7 @@ Session::Session(QObject *parent)
|
||||||
|
|
||||||
// Regular saving of fastresume data
|
// Regular saving of fastresume data
|
||||||
connect(m_resumeDataTimer, &QTimer::timeout, this, [this]() { generateResumeData(); });
|
connect(m_resumeDataTimer, &QTimer::timeout, this, [this]() { generateResumeData(); });
|
||||||
const uint saveInterval = saveResumeDataInterval();
|
const int saveInterval = saveResumeDataInterval();
|
||||||
if (saveInterval > 0) {
|
if (saveInterval > 0) {
|
||||||
m_resumeDataTimer->setInterval(saveInterval * 60 * 1000);
|
m_resumeDataTimer->setInterval(saveInterval * 60 * 1000);
|
||||||
m_resumeDataTimer->start();
|
m_resumeDataTimer->start();
|
||||||
|
@ -581,12 +581,12 @@ void Session::setAppendExtensionEnabled(const bool enabled)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
uint Session::refreshInterval() const
|
int Session::refreshInterval() const
|
||||||
{
|
{
|
||||||
return m_refreshInterval;
|
return m_refreshInterval;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Session::setRefreshInterval(const uint value)
|
void Session::setRefreshInterval(const int value)
|
||||||
{
|
{
|
||||||
if (value != refreshInterval()) {
|
if (value != refreshInterval()) {
|
||||||
m_refreshInterval = value;
|
m_refreshInterval = value;
|
||||||
|
@ -2619,12 +2619,12 @@ void Session::setBandwidthSchedulerEnabled(const bool enabled)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
uint Session::saveResumeDataInterval() const
|
int Session::saveResumeDataInterval() const
|
||||||
{
|
{
|
||||||
return m_saveResumeDataInterval;
|
return m_saveResumeDataInterval;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Session::setSaveResumeDataInterval(const uint value)
|
void Session::setSaveResumeDataInterval(const int value)
|
||||||
{
|
{
|
||||||
if (value == m_saveResumeDataInterval)
|
if (value == m_saveResumeDataInterval)
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -276,8 +276,8 @@ namespace BitTorrent
|
||||||
void setTrackerEnabled(bool enabled);
|
void setTrackerEnabled(bool enabled);
|
||||||
bool isAppendExtensionEnabled() const;
|
bool isAppendExtensionEnabled() const;
|
||||||
void setAppendExtensionEnabled(bool enabled);
|
void setAppendExtensionEnabled(bool enabled);
|
||||||
uint refreshInterval() const;
|
int refreshInterval() const;
|
||||||
void setRefreshInterval(uint value);
|
void setRefreshInterval(int value);
|
||||||
bool isPreallocationEnabled() const;
|
bool isPreallocationEnabled() const;
|
||||||
void setPreallocationEnabled(bool enabled);
|
void setPreallocationEnabled(bool enabled);
|
||||||
QString torrentExportDirectory() const;
|
QString torrentExportDirectory() const;
|
||||||
|
@ -302,8 +302,8 @@ namespace BitTorrent
|
||||||
bool isBandwidthSchedulerEnabled() const;
|
bool isBandwidthSchedulerEnabled() const;
|
||||||
void setBandwidthSchedulerEnabled(bool enabled);
|
void setBandwidthSchedulerEnabled(bool enabled);
|
||||||
|
|
||||||
uint saveResumeDataInterval() const;
|
int saveResumeDataInterval() const;
|
||||||
void setSaveResumeDataInterval(uint value);
|
void setSaveResumeDataInterval(int value);
|
||||||
int port() const;
|
int port() const;
|
||||||
void setPort(int port);
|
void setPort(int port);
|
||||||
bool useRandomPort() const;
|
bool useRandomPort() const;
|
||||||
|
@ -697,7 +697,7 @@ namespace BitTorrent
|
||||||
CachedSettingValue<bool> m_isAddTorrentPaused;
|
CachedSettingValue<bool> m_isAddTorrentPaused;
|
||||||
CachedSettingValue<bool> m_isKeepTorrentTopLevelFolder;
|
CachedSettingValue<bool> m_isKeepTorrentTopLevelFolder;
|
||||||
CachedSettingValue<bool> m_isAppendExtensionEnabled;
|
CachedSettingValue<bool> m_isAppendExtensionEnabled;
|
||||||
CachedSettingValue<uint> m_refreshInterval;
|
CachedSettingValue<int> m_refreshInterval;
|
||||||
CachedSettingValue<bool> m_isPreallocationEnabled;
|
CachedSettingValue<bool> m_isPreallocationEnabled;
|
||||||
CachedSettingValue<QString> m_torrentExportDirectory;
|
CachedSettingValue<QString> m_torrentExportDirectory;
|
||||||
CachedSettingValue<QString> m_finishedTorrentExportDirectory;
|
CachedSettingValue<QString> m_finishedTorrentExportDirectory;
|
||||||
|
@ -707,7 +707,7 @@ namespace BitTorrent
|
||||||
CachedSettingValue<int> m_altGlobalUploadSpeedLimit;
|
CachedSettingValue<int> m_altGlobalUploadSpeedLimit;
|
||||||
CachedSettingValue<bool> m_isAltGlobalSpeedLimitEnabled;
|
CachedSettingValue<bool> m_isAltGlobalSpeedLimitEnabled;
|
||||||
CachedSettingValue<bool> m_isBandwidthSchedulerEnabled;
|
CachedSettingValue<bool> m_isBandwidthSchedulerEnabled;
|
||||||
CachedSettingValue<uint> m_saveResumeDataInterval;
|
CachedSettingValue<int> m_saveResumeDataInterval;
|
||||||
CachedSettingValue<int> m_port;
|
CachedSettingValue<int> m_port;
|
||||||
CachedSettingValue<bool> m_useRandomPort;
|
CachedSettingValue<bool> m_useRandomPort;
|
||||||
CachedSettingValue<QString> m_networkInterface;
|
CachedSettingValue<QString> m_networkInterface;
|
||||||
|
|
|
@ -268,7 +268,7 @@ void AppController::preferencesAction()
|
||||||
// Current network interface address
|
// Current network interface address
|
||||||
data["current_interface_address"] = BitTorrent::Session::instance()->networkInterfaceAddress();
|
data["current_interface_address"] = BitTorrent::Session::instance()->networkInterfaceAddress();
|
||||||
// Save resume data interval
|
// Save resume data interval
|
||||||
data["save_resume_data_interval"] = static_cast<double>(session->saveResumeDataInterval());
|
data["save_resume_data_interval"] = session->saveResumeDataInterval();
|
||||||
// Recheck completed torrents
|
// Recheck completed torrents
|
||||||
data["recheck_completed_torrents"] = pref->recheckTorrentsOnCompletion();
|
data["recheck_completed_torrents"] = pref->recheckTorrentsOnCompletion();
|
||||||
// Resolve peer countries
|
// Resolve peer countries
|
||||||
|
|
Loading…
Reference in a new issue