From a2302284410a0ece758b3eb1a1d4f98663691e8c Mon Sep 17 00:00:00 2001 From: "Vladimir Golovnev (Glassez)" Date: Fri, 19 Mar 2021 16:05:02 +0300 Subject: [PATCH] Don't compare bool with int In Qt6 QHash::remove() returns bool to indicate operation status. --- src/base/settingsstorage.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/base/settingsstorage.cpp b/src/base/settingsstorage.cpp index d9ac0a337..37eabc625 100644 --- a/src/base/settingsstorage.cpp +++ b/src/base/settingsstorage.cpp @@ -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();