Browse Source

Merge pull request #13369 from Chocobo1/msg

Avoid using libtorrent internal functions
adaptive-webui-19844
Mike Tzou 4 years ago committed by GitHub
parent
commit
1e01147c31
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 19
      src/base/bittorrent/session.cpp

19
src/base/bittorrent/session.cpp

@ -202,26 +202,37 @@ namespace @@ -202,26 +202,37 @@ namespace
QString toString(const lt::socket_type_t socketType)
{
#if (LIBTORRENT_VERSION_NUM >= 20000)
return QString::fromLatin1(lt::socket_type_name(socketType));
#else
switch (socketType)
{
#if (LIBTORRENT_VERSION_NUM >= 20000)
case lt::socket_type_t::http:
return QLatin1String("HTTP");
case lt::socket_type_t::http_ssl:
return QLatin1String("HTTP_SSL");
#endif
case lt::socket_type_t::i2p:
return QLatin1String("I2P");
case lt::socket_type_t::socks5:
return QLatin1String("SOCKS5");
#if (LIBTORRENT_VERSION_NUM >= 20000)
case lt::socket_type_t::socks5_ssl:
return QLatin1String("SOCKS5_SSL");
#endif
case lt::socket_type_t::tcp:
return QLatin1String("TCP");
case lt::socket_type_t::tcp_ssl:
return QLatin1String("TCP_SSL");
#if (LIBTORRENT_VERSION_NUM >= 20000)
case lt::socket_type_t::utp:
return QLatin1String("UTP");
#else
case lt::socket_type_t::udp:
return QLatin1String("UDP");
#endif
case lt::socket_type_t::utp_ssl:
return QLatin1String("UTP_SSL");
}
return QLatin1String("INVALID");
#endif
}
QString toString(const lt::address &address)

Loading…
Cancel
Save