mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-16 02:03:07 -07:00
Fix compilation with libtorrent 1.x.x v2
This commit is contained in:
parent
94b58ca229
commit
22e2bafa7a
18 changed files with 98 additions and 98 deletions
|
@ -88,7 +88,7 @@ QString prefjson::getPreferences()
|
|||
data.add("max_connec", pref.getMaxConnecs());
|
||||
data.add("max_connec_per_torrent", pref.getMaxConnecsPerTorrent());
|
||||
data.add("max_uploads_per_torrent", pref.getMaxUploadsPerTorrent());
|
||||
#if LIBTORRENT_VERSION_MINOR >= 16 || LIBTORRENT_VERSION_MAJOR > 0
|
||||
#if LIBTORRENT_VERSION_NUM >= 001600
|
||||
data.add("enable_utp", pref.isuTPEnabled());
|
||||
data.add("limit_utp_rate", pref.isuTPRateLimited());
|
||||
#endif
|
||||
|
@ -110,7 +110,7 @@ QString prefjson::getPreferences()
|
|||
data.add("pex", pref.isPeXEnabled());
|
||||
data.add("lsd", pref.isLSDEnabled());
|
||||
data.add("encryption", pref.getEncryptionSetting());
|
||||
#if LIBTORRENT_VERSION_MINOR >= 16 || LIBTORRENT_VERSION_MAJOR > 0
|
||||
#if LIBTORRENT_VERSION_NUM >= 001600
|
||||
data.add("anonymous_mode", pref.isAnonymousModeEnabled());
|
||||
#endif
|
||||
// Proxy
|
||||
|
@ -246,7 +246,7 @@ void prefjson::setPreferences(const QString& json)
|
|||
pref.setMaxConnecsPerTorrent(m["max_connec_per_torrent"].toInt());
|
||||
if (m.contains("max_uploads_per_torrent"))
|
||||
pref.setMaxUploadsPerTorrent(m["max_uploads_per_torrent"].toInt());
|
||||
#if LIBTORRENT_VERSION_MINOR >= 16 || LIBTORRENT_VERSION_MAJOR > 0
|
||||
#if LIBTORRENT_VERSION_NUM >= 001600
|
||||
if (m.contains("enable_utp"))
|
||||
pref.setuTPEnabled(m["enable_utp"].toBool());
|
||||
if (m.contains("limit_utp_rate"))
|
||||
|
@ -284,7 +284,7 @@ void prefjson::setPreferences(const QString& json)
|
|||
pref.setLSDEnabled(m["lsd"].toBool());
|
||||
if (m.contains("encryption"))
|
||||
pref.setEncryptionSetting(m["encryption"].toInt());
|
||||
#if LIBTORRENT_VERSION_MINOR >= 16 || LIBTORRENT_VERSION_MAJOR > 0
|
||||
#if LIBTORRENT_VERSION_NUM >= 001600
|
||||
if (m.contains("anonymous_mode"))
|
||||
pref.enableAnonymousMode(m["anonymous_mode"].toBool());
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue