QT6: Mod QLibraryInfo::location use QLibraryInfo::path

This commit is contained in:
Simon De Backer
2020-10-03 09:25:29 +02:00
parent bc0cb6b1b3
commit caac531de1
2 changed files with 48 additions and 8 deletions

View File

@@ -167,7 +167,14 @@ void QETApp::setLanguage(const QString &desired_language) {
QString languages_path = languagesPath();
// load Qt library translations
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) // ### Qt 6: remove
QString qt_l10n_path = QLibraryInfo::location(QLibraryInfo::TranslationsPath);
#else
#if TODO_LIST
#pragma message("@TODO remove code for QT 6 or later")
#endif
QString qt_l10n_path = QLibraryInfo::path(QLibraryInfo::TranslationsPath);
#endif
if (!qtTranslator.load("qt_" + desired_language, qt_l10n_path)) {
qtTranslator.load("qt_" + desired_language, languages_path);
}