1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-01-11 15:27:54 +00:00

Don't compare bool with int

In Qt6 QHash::remove() returns bool to indicate operation status.
This commit is contained in:
Vladimir Golovnev (Glassez) 2021-03-19 16:05:02 +03:00
parent 135cad576c
commit a230228441
No known key found for this signature in database
GPG Key ID: 52A2C7DEE2DFA6F7

View File

@ -224,7 +224,11 @@ void SettingsStorage::removeValue(const QString &key)
{
const QString realKey = mapKey(key);
const QWriteLocker locker(&m_lock);
#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
if (m_data.remove(realKey))
#else
if (m_data.remove(realKey) > 0)
#endif
{
m_dirty = true;
m_timer.start();