cleanup: replace deprecated methods

Sadly the replacements are new in Qt6.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2022-02-15 12:20:49 -08:00
parent 300248f446
commit 2ede1a4563
2 changed files with 8 additions and 0 deletions

View file

@ -20,7 +20,11 @@ void qPrefPrivate::propSetValue(const QString &key, const QVariant &value, const
{
QSettings s;
bool isDefault = false;
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
if (value.isValid() && value.typeId() == QMetaType::Double)
#else
if (value.isValid() && value.type() == QVariant::Double)
#endif
isDefault = IS_FP_SAME(value.toDouble(), defaultValue.toDouble());
else
isDefault = (value == defaultValue);