Change to lt namespace

Quoting from libtorrent doc:
> In the future, libtorrent will be the alias and lt the namespace name.
This commit is contained in:
Chocobo1
2019-05-09 12:45:52 +08:00
parent 4b263f057d
commit 3955eef50d
18 changed files with 124 additions and 127 deletions

View File

@@ -40,27 +40,27 @@ namespace BitTorrent
{
public:
InfoHash();
InfoHash(const libtorrent::sha1_hash &nativeHash);
InfoHash(const lt::sha1_hash &nativeHash);
InfoHash(const QString &hashString);
InfoHash(const InfoHash &other) = default;
static constexpr int length()
{
#if (LIBTORRENT_VERSION_NUM < 10200)
return libtorrent::sha1_hash::size;
return lt::sha1_hash::size;
#else
return libtorrent::sha1_hash::size();
return lt::sha1_hash::size();
#endif
}
bool isValid() const;
operator libtorrent::sha1_hash() const;
operator lt::sha1_hash() const;
operator QString() const;
private:
bool m_valid;
libtorrent::sha1_hash m_nativeHash;
lt::sha1_hash m_nativeHash;
QString m_hashString;
};