Browse Source

Don't compare bool with int

In Qt6 QHash::remove() returns bool to indicate operation status.
adaptive-webui-19844
Vladimir Golovnev (Glassez) 4 years ago
parent
commit
a230228441
No known key found for this signature in database
GPG Key ID: 52A2C7DEE2DFA6F7
  1. 4
      src/base/settingsstorage.cpp

4
src/base/settingsstorage.cpp

@ -224,7 +224,11 @@ void SettingsStorage::removeValue(const QString &key) @@ -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();

Loading…
Cancel
Save