mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-01 13:18:06 -06:00
Merge pull request #636 from sledgehammer999/libtorrent_trunk
Fix compilation with libtorrent 1.x.x.
This commit is contained in:
@@ -222,7 +222,7 @@ void PeerListWidget::limitUpRateSelectedPeers(const QStringList& peer_ips)
|
||||
|
||||
bool ok = false;
|
||||
int cur_limit = -1;
|
||||
#if LIBTORRENT_VERSION_MINOR > 15
|
||||
#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())
|
||||
@@ -257,7 +257,7 @@ void PeerListWidget::limitDlRateSelectedPeers(const QStringList& peer_ips)
|
||||
return;
|
||||
bool ok = false;
|
||||
int cur_limit = -1;
|
||||
#if LIBTORRENT_VERSION_MINOR > 15
|
||||
#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())
|
||||
@@ -419,7 +419,7 @@ QString PeerListWidget::getConnectionString(int connection_type)
|
||||
{
|
||||
QString connection;
|
||||
switch(connection_type) {
|
||||
#if LIBTORRENT_VERSION_MINOR > 15
|
||||
#if LIBTORRENT_VERSION_NUM >= 001600
|
||||
case peer_info::bittorrent_utp:
|
||||
connection = "uTP";
|
||||
break;
|
||||
|
||||
@@ -459,7 +459,7 @@ void PropertiesWidget::displayFilesListMenu(const QPoint&) {
|
||||
myFilesLlistMenu.addSeparator();
|
||||
}
|
||||
QMenu subMenu;
|
||||
#if LIBTORRENT_VERSION_MINOR > 15
|
||||
#if LIBTORRENT_VERSION_NUM >= 001600
|
||||
if (!h.status(0x0).is_seeding) {
|
||||
#else
|
||||
if (!static_cast<torrent_handle>(h).is_seed()) {
|
||||
|
||||
@@ -161,7 +161,7 @@ public:
|
||||
if (index.column() != PRIORITY) return 0;
|
||||
if (properties) {
|
||||
QTorrentHandle h = properties->getCurrentTorrent();
|
||||
#if LIBTORRENT_VERSION_MINOR > 15
|
||||
#if LIBTORRENT_VERSION_NUM >= 001600
|
||||
if (!h.is_valid() || !h.has_metadata() || h.status(0x0).is_seeding) return 0;
|
||||
#else
|
||||
if (!h.is_valid() || !h.has_metadata() || static_cast<libtorrent::torrent_handle>(h).is_seed()) return 0;
|
||||
|
||||
Reference in New Issue
Block a user