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

@ -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) ||