mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-11 07:18:08 +00:00
Display message about libtorrent plugins for the correct case.
This commit is contained in:
parent
f391b24b1d
commit
59b570cf62
@ -308,6 +308,8 @@ Session::Session(QObject *parent)
|
|||||||
, m_isDisableAutoTMMWhenCategorySavePathChanged(BITTORRENT_SESSION_KEY("DisableAutoTMMTriggers/CategorySavePathChanged"), true)
|
, m_isDisableAutoTMMWhenCategorySavePathChanged(BITTORRENT_SESSION_KEY("DisableAutoTMMTriggers/CategorySavePathChanged"), true)
|
||||||
, m_isTrackerEnabled(BITTORRENT_KEY("TrackerEnabled"), false)
|
, m_isTrackerEnabled(BITTORRENT_KEY("TrackerEnabled"), false)
|
||||||
, m_bannedIPs("State/BannedIPs")
|
, m_bannedIPs("State/BannedIPs")
|
||||||
|
, m_wasPexEnabled(m_isPeXEnabled)
|
||||||
|
, m_wasTrackerExchangeEnabled(m_wasTrackerExchangeEnabled)
|
||||||
, m_numResumeData(0)
|
, m_numResumeData(0)
|
||||||
, m_extraLimit(0)
|
, m_extraLimit(0)
|
||||||
, m_useProxy(false)
|
, m_useProxy(false)
|
||||||
@ -515,10 +517,9 @@ bool Session::isPeXEnabled() const
|
|||||||
|
|
||||||
void Session::setPeXEnabled(bool enabled)
|
void Session::setPeXEnabled(bool enabled)
|
||||||
{
|
{
|
||||||
if (enabled != isPeXEnabled()) {
|
m_isPeXEnabled = enabled;
|
||||||
m_isPeXEnabled = enabled;
|
if (m_wasPexEnabled != enabled)
|
||||||
Logger::instance()->addMessage(tr("Restart is required to toggle PeX support"), Log::WARNING);
|
Logger::instance()->addMessage(tr("Restart is required to toggle PeX support"), Log::WARNING);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Session::isTrackerExchangeEnabled() const
|
bool Session::isTrackerExchangeEnabled() const
|
||||||
@ -528,10 +529,9 @@ bool Session::isTrackerExchangeEnabled() const
|
|||||||
|
|
||||||
void Session::setTrackerExchangeEnabled(bool enabled)
|
void Session::setTrackerExchangeEnabled(bool enabled)
|
||||||
{
|
{
|
||||||
if (enabled != isTrackerExchangeEnabled()) {
|
m_isTrackerExchangeEnabled = enabled;
|
||||||
m_isTrackerExchangeEnabled = enabled;
|
if (m_wasTrackerExchangeEnabled != enabled)
|
||||||
Logger::instance()->addMessage(tr("Restart is required to toggle Tracker Exchange support"), Log::WARNING);
|
Logger::instance()->addMessage(tr("Restart is required to toggle Tracker Exchange support"), Log::WARNING);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Session::isTempPathEnabled() const
|
bool Session::isTempPathEnabled() const
|
||||||
|
@ -572,6 +572,12 @@ namespace BitTorrent
|
|||||||
CachedSettingValue<bool> m_isTrackerEnabled;
|
CachedSettingValue<bool> m_isTrackerEnabled;
|
||||||
CachedSettingValue<QStringList> m_bannedIPs;
|
CachedSettingValue<QStringList> m_bannedIPs;
|
||||||
|
|
||||||
|
// Order is important. These need to be declared after their CachedSettingsValue
|
||||||
|
// counterparts, because they use them for initialization in the constructor
|
||||||
|
// initialization list.
|
||||||
|
const bool m_wasPexEnabled;
|
||||||
|
const bool m_wasTrackerExchangeEnabled;
|
||||||
|
|
||||||
int m_numResumeData;
|
int m_numResumeData;
|
||||||
int m_extraLimit;
|
int m_extraLimit;
|
||||||
QList<BitTorrent::TrackerEntry> m_additionalTrackerList;
|
QList<BitTorrent::TrackerEntry> m_additionalTrackerList;
|
||||||
|
Loading…
Reference in New Issue
Block a user