Drop support of libtorrent < 1.1.10

This commit is contained in:
Vladimir Golovnev (Glassez)
2019-01-08 15:52:12 +03:00
parent 77fc731dec
commit 302c99d7d5
22 changed files with 19 additions and 963 deletions

View File

@@ -68,15 +68,9 @@ TorrentInfo TorrentInfo::load(const QByteArray &data, QString *error) noexcept
const int tokenLimit = 10000000;
libt::error_code ec;
#if LIBTORRENT_VERSION_NUM < 10100
libt::lazy_entry node;
libt::lazy_bdecode(data.constData(), (data.constData() + data.size()), node, ec
, nullptr, depthLimit, tokenLimit);
#else
libt::bdecode_node node;
bdecode(data.constData(), (data.constData() + data.size()), node, ec
, nullptr, depthLimit, tokenLimit);
#endif
if (ec) {
if (error)
*error = QString::fromStdString(ec.message());