mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-16 02:03:07 -07:00
- Fix compilation error with libtorrent v0.14.3
This commit is contained in:
parent
db9005158e
commit
9d79a51f18
1 changed files with 2 additions and 4 deletions
|
@ -474,8 +474,7 @@ public:
|
||||||
if(pos > -1) {
|
if(pos > -1) {
|
||||||
QString found = regHex.cap(1);
|
QString found = regHex.cap(1);
|
||||||
if(found.length() == 40) {
|
if(found.length() == 40) {
|
||||||
sha1_hash sha1;
|
sha1_hash sha1(QString(QByteArray::fromHex(regHex.cap(1).toLocal8Bit())).toStdString());
|
||||||
sha1.assign(QString(QByteArray::fromHex(regHex.cap(1).toLocal8Bit())).toStdString());
|
|
||||||
qDebug("magnetUriToHash (Hex): hash: %s", misc::toString(sha1).c_str());
|
qDebug("magnetUriToHash (Hex): hash: %s", misc::toString(sha1).c_str());
|
||||||
return misc::toQString(sha1);
|
return misc::toQString(sha1);
|
||||||
}
|
}
|
||||||
|
@ -486,8 +485,7 @@ public:
|
||||||
if(pos > -1) {
|
if(pos > -1) {
|
||||||
QString found = regBase32.cap(1);
|
QString found = regBase32.cap(1);
|
||||||
if(found.length() > 20 && (found.length()*5)%40 == 0) {
|
if(found.length() > 20 && (found.length()*5)%40 == 0) {
|
||||||
sha1_hash sha1;
|
sha1_hash sha1(base32decode(regBase32.cap(1).toStdString()));
|
||||||
sha1.assign(base32decode(regBase32.cap(1).toStdString()));
|
|
||||||
hash = misc::toQString(sha1);
|
hash = misc::toQString(sha1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue