[LyX/master] Address Qt6 deprecation warning (QLibraryInfo::location())
Juergen Spitzmueller
spitz at lyx.org
Sun Mar 21 11:33:12 UTC 2021
commit b7f983bc47dd49683dc12339edd0ee6bfca31e71
Author: Juergen Spitzmueller <spitz at lyx.org>
Date: Sun Mar 21 12:30:34 2021 +0100
Address Qt6 deprecation warning (QLibraryInfo::location())
---
src/frontends/qt/GuiApplication.cpp | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/src/frontends/qt/GuiApplication.cpp b/src/frontends/qt/GuiApplication.cpp
index a5cb3c8..e6964ed 100644
--- a/src/frontends/qt/GuiApplication.cpp
+++ b/src/frontends/qt/GuiApplication.cpp
@@ -2713,7 +2713,11 @@ void GuiApplication::setGuiLanguage()
// opposite. Therefore, long name should be used without truncation.
// c.f. http://doc.trolltech.com/4.1/qtranslator.html#load
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))) {
+#endif
LYXERR(Debug::LOCALE, "Could not find Qt translations for locale "
<< language_name);
} else {
More information about the lyx-cvs
mailing list