From 0b9f9aa0d726350e4fe340b7a8b8b60e066e016c Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Sun, 21 Nov 2010 09:58:24 +0000 Subject: [PATCH] Fix compilation errors with libtorrent < 0.15.5 --- src/qtlibtorrent/qbtsession.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/qtlibtorrent/qbtsession.cpp b/src/qtlibtorrent/qbtsession.cpp index fb6afc63b..b2a23e490 100644 --- a/src/qtlibtorrent/qbtsession.cpp +++ b/src/qtlibtorrent/qbtsession.cpp @@ -65,6 +65,7 @@ #include #include #include +#include #include #include @@ -1860,7 +1861,15 @@ void QBtSession::setSessionSettings(const session_settings &sessionSettings) { // Set Proxy void QBtSession::setProxySettings(const proxy_settings &proxySettings) { qDebug() << Q_FUNC_INFO; + +#if (LIBTORRENT_VERSION_MINOR > 15) || (LIBTORRENT_VERSION_MINOR == 15 && LIBTORRENT_VERSION_TINY > 4) s->set_proxy(proxySettings); +#else + s->set_peer_proxy(proxySettings); + s->set_web_seed_proxy(proxySettings); + s->set_tracker_proxy(proxySettings); + s->set_dht_proxy(proxySettings); +#endif // Define environment variable QString proxy_str; switch(proxySettings.type) {