diff --git a/core/qt-init.cpp b/core/qt-init.cpp index fb816ae07..b6e05d14c 100644 --- a/core/qt-init.cpp +++ b/core/qt-init.cpp @@ -83,8 +83,12 @@ void init_qt_late() QString translationLocation; #if defined(Q_OS_ANDROID) || defined(Q_OS_IOS) translationLocation = QLatin1String(":/"); +#else +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) + translationLocation = QLibraryInfo::path(QLibraryInfo::TranslationsPath); #else translationLocation = QLibraryInfo::location(QLibraryInfo::TranslationsPath); +#endif #endif if (uiLang != "en_US" && uiLang != "en-US") { if (qtTranslator.load(loc, "qtbase", "_", translationLocation) || diff --git a/core/settings/qPrefPrivate.cpp b/core/settings/qPrefPrivate.cpp index e1622c3e7..f021027e7 100644 --- a/core/settings/qPrefPrivate.cpp +++ b/core/settings/qPrefPrivate.cpp @@ -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);