Browse Source

Switch settings to signed int because libtorrent expects them that way.

adaptive-webui-19844
sledgehammer999 7 years ago
parent
commit
907f222a73
No known key found for this signature in database
GPG Key ID: 6E4A2D025B7CC9A2
  1. 12
      src/base/bittorrent/session.cpp
  2. 18
      src/base/bittorrent/session.h

12
src/base/bittorrent/session.cpp

@ -2818,12 +2818,12 @@ void Session::setDiskCacheSize(int size)
} }
} }
uint Session::diskCacheTTL() const int Session::diskCacheTTL() const
{ {
return m_diskCacheTTL; return m_diskCacheTTL;
} }
void Session::setDiskCacheTTL(uint ttl) void Session::setDiskCacheTTL(int ttl)
{ {
if (ttl != m_diskCacheTTL) { if (ttl != m_diskCacheTTL) {
m_diskCacheTTL = ttl; m_diskCacheTTL = ttl;
@ -2928,12 +2928,12 @@ void Session::setIgnoreSlowTorrentsForQueueing(bool ignore)
} }
} }
uint Session::outgoingPortsMin() const int Session::outgoingPortsMin() const
{ {
return m_outgoingPortsMin; return m_outgoingPortsMin;
} }
void Session::setOutgoingPortsMin(uint min) void Session::setOutgoingPortsMin(int min)
{ {
if (min != m_outgoingPortsMin) { if (min != m_outgoingPortsMin) {
m_outgoingPortsMin = min; m_outgoingPortsMin = min;
@ -2941,12 +2941,12 @@ void Session::setOutgoingPortsMin(uint min)
} }
} }
uint Session::outgoingPortsMax() const int Session::outgoingPortsMax() const
{ {
return m_outgoingPortsMax; return m_outgoingPortsMax;
} }
void Session::setOutgoingPortsMax(uint max) void Session::setOutgoingPortsMax(int max)
{ {
if (max != m_outgoingPortsMax) { if (max != m_outgoingPortsMax) {
m_outgoingPortsMax = max; m_outgoingPortsMax = max;

18
src/base/bittorrent/session.h

@ -329,8 +329,8 @@ namespace BitTorrent
void setAnnounceToAllTrackers(bool val); void setAnnounceToAllTrackers(bool val);
int diskCacheSize() const; int diskCacheSize() const;
void setDiskCacheSize(int size); void setDiskCacheSize(int size);
uint diskCacheTTL() const; int diskCacheTTL() const;
void setDiskCacheTTL(uint ttl); void setDiskCacheTTL(int ttl);
bool useOSCache() const; bool useOSCache() const;
void setUseOSCache(bool use); void setUseOSCache(bool use);
bool isAnonymousModeEnabled() const; bool isAnonymousModeEnabled() const;
@ -339,10 +339,10 @@ namespace BitTorrent
void setQueueingSystemEnabled(bool enabled); void setQueueingSystemEnabled(bool enabled);
bool ignoreSlowTorrentsForQueueing() const; bool ignoreSlowTorrentsForQueueing() const;
void setIgnoreSlowTorrentsForQueueing(bool ignore); void setIgnoreSlowTorrentsForQueueing(bool ignore);
uint outgoingPortsMin() const; int outgoingPortsMin() const;
void setOutgoingPortsMin(uint min); void setOutgoingPortsMin(int min);
uint outgoingPortsMax() const; int outgoingPortsMax() const;
void setOutgoingPortsMax(uint max); void setOutgoingPortsMax(int max);
bool ignoreLimitsOnLAN() const; bool ignoreLimitsOnLAN() const;
void setIgnoreLimitsOnLAN(bool ignore); void setIgnoreLimitsOnLAN(bool ignore);
bool includeOverheadInLimits() const; bool includeOverheadInLimits() const;
@ -573,7 +573,7 @@ namespace BitTorrent
CachedSettingValue<QString> m_IPFilterFile; CachedSettingValue<QString> m_IPFilterFile;
CachedSettingValue<bool> m_announceToAllTrackers; CachedSettingValue<bool> m_announceToAllTrackers;
CachedSettingValue<int> m_diskCacheSize; CachedSettingValue<int> m_diskCacheSize;
CachedSettingValue<uint> m_diskCacheTTL; CachedSettingValue<int> m_diskCacheTTL;
CachedSettingValue<bool> m_useOSCache; CachedSettingValue<bool> m_useOSCache;
CachedSettingValue<bool> m_isAnonymousModeEnabled; CachedSettingValue<bool> m_isAnonymousModeEnabled;
CachedSettingValue<bool> m_isQueueingEnabled; CachedSettingValue<bool> m_isQueueingEnabled;
@ -581,8 +581,8 @@ namespace BitTorrent
CachedSettingValue<int> m_maxActiveUploads; CachedSettingValue<int> m_maxActiveUploads;
CachedSettingValue<int> m_maxActiveTorrents; CachedSettingValue<int> m_maxActiveTorrents;
CachedSettingValue<bool> m_ignoreSlowTorrentsForQueueing; CachedSettingValue<bool> m_ignoreSlowTorrentsForQueueing;
CachedSettingValue<uint> m_outgoingPortsMin; CachedSettingValue<int> m_outgoingPortsMin;
CachedSettingValue<uint> m_outgoingPortsMax; CachedSettingValue<int> m_outgoingPortsMax;
CachedSettingValue<bool> m_ignoreLimitsOnLAN; CachedSettingValue<bool> m_ignoreLimitsOnLAN;
CachedSettingValue<bool> m_includeOverheadInLimits; CachedSettingValue<bool> m_includeOverheadInLimits;
CachedSettingValue<QString> m_announceIP; CachedSettingValue<QString> m_announceIP;

Loading…
Cancel
Save