1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-01-11 07:18:08 +00:00

Fix wrong v2 hash string displayed in WebUI

Previously `0000...` was erroneously displayed when v2 hash is absent,
now it correctly shows the `N/A`.

PR #16846.
This commit is contained in:
Chocobo1 2022-04-10 12:46:24 +08:00 committed by GitHub
parent dded874350
commit 189514c6de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -122,7 +122,7 @@ public:
QString hashString() const QString hashString() const
{ {
if (m_hashString.isEmpty()) if (m_hashString.isEmpty() && isValid())
{ {
const QByteArray raw = QByteArray::fromRawData(m_nativeDigest.data(), length()); const QByteArray raw = QByteArray::fromRawData(m_nativeDigest.data(), length());
m_hashString = QString::fromLatin1(raw.toHex()); m_hashString = QString::fromLatin1(raw.toHex());