Address Qt6 deprecation warning (QLibraryInfo::location())

This commit is contained in:
Juergen Spitzmueller 2021-03-21 12:30:34 +01:00
parent 9ccbc11bf3
commit b7f983bc47

View File

@ -2713,7 +2713,11 @@ void GuiApplication::setGuiLanguage()
// opposite. Therefore, long name should be used without truncation. // opposite. Therefore, long name should be used without truncation.
// c.f. http://doc.trolltech.com/4.1/qtranslator.html#load // c.f. http://doc.trolltech.com/4.1/qtranslator.html#load
if (!d->qt_trans_.load(language_name, if (!d->qt_trans_.load(language_name,
#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
QLibraryInfo::path(QLibraryInfo::TranslationsPath))) {
#else
QLibraryInfo::location(QLibraryInfo::TranslationsPath))) { QLibraryInfo::location(QLibraryInfo::TranslationsPath))) {
#endif
LYXERR(Debug::LOCALE, "Could not find Qt translations for locale " LYXERR(Debug::LOCALE, "Could not find Qt translations for locale "
<< language_name); << language_name);
} else { } else {