Fix compilation with libtorrent 1.x.x v2

This commit is contained in:
sledgehammer999
2013-06-08 18:21:15 +03:00
parent 94b58ca229
commit 22e2bafa7a
18 changed files with 98 additions and 98 deletions

View File

@@ -221,7 +221,7 @@ void PeerListWidget::limitUpRateSelectedPeers(const QStringList& peer_ips)
bool ok = false;
int cur_limit = -1;
#if LIBTORRENT_VERSION_MINOR > 15 || LIBTORRENT_VERSION_MAJOR > 0
#if LIBTORRENT_VERSION_NUM >= 001600
boost::asio::ip::tcp::endpoint first_ep = m_peerEndpoints.value(peer_ips.first(),
boost::asio::ip::tcp::endpoint());
if (first_ep != boost::asio::ip::tcp::endpoint())
@@ -256,7 +256,7 @@ void PeerListWidget::limitDlRateSelectedPeers(const QStringList& peer_ips)
return;
bool ok = false;
int cur_limit = -1;
#if LIBTORRENT_VERSION_MINOR > 15 || LIBTORRENT_VERSION_MAJOR > 0
#if LIBTORRENT_VERSION_NUM >= 001600
boost::asio::ip::tcp::endpoint first_ep = m_peerEndpoints.value(peer_ips.first(),
boost::asio::ip::tcp::endpoint());
if (first_ep != boost::asio::ip::tcp::endpoint())
@@ -416,7 +416,7 @@ QString PeerListWidget::getConnectionString(int connection_type)
{
QString connection;
switch(connection_type) {
#if LIBTORRENT_VERSION_MINOR > 15 || LIBTORRENT_VERSION_MAJOR > 0
#if LIBTORRENT_VERSION_NUM >= 001600
case peer_info::bittorrent_utp:
connection = "uTP";
break;