depot/third_party/nixpkgs/pkgs/applications/misc/valentina/fix-qttranslations-path.patch
Default email b450903751 Project import generated by Copybara.
GitOrigin-RevId: 74a1793c659d09d7cf738005308b1f86c90cb59b
2022-09-09 16:08:57 +02:00

37 lines
1.6 KiB
Diff

diff --git i/src/libs/vmisc/vabstractapplication.cpp w/src/libs/vmisc/vabstractapplication.cpp
index b64817bab..5f9aa3518 100644
--- i/src/libs/vmisc/vabstractapplication.cpp
+++ w/src/libs/vmisc/vabstractapplication.cpp
@@ -221,26 +221,26 @@ void VAbstractApplication::LoadTranslation(const QString &locale)
ClearTranslation();
qtTranslator = new QTranslator(this);
-#if defined(Q_OS_WIN) || defined(Q_OS_MAC)
+#if defined(Q_OS_WIN)
qtTranslator->load("qt_" + locale, translationsPath(locale));
#else
- qtTranslator->load("qt_" + locale, QLibraryInfo::location(QLibraryInfo::TranslationsPath));
+ qtTranslator->load("qt_" + locale, QLatin1String("@qttranslations@/translations"));
#endif
installTranslator(qtTranslator);
qtxmlTranslator = new QTranslator(this);
-#if defined(Q_OS_WIN) || defined(Q_OS_MAC)
+#if defined(Q_OS_WIN)
qtxmlTranslator->load("qtxmlpatterns_" + locale, translationsPath(locale));
#else
- qtxmlTranslator->load("qtxmlpatterns_" + locale, QLibraryInfo::location(QLibraryInfo::TranslationsPath));
+ qtxmlTranslator->load("qtxmlpatterns_" + locale, QLatin1String("@qttranslations@/translations"));
#endif
installTranslator(qtxmlTranslator);
qtBaseTranslator = new QTranslator(this);
-#if defined(Q_OS_WIN) || defined(Q_OS_MAC)
+#if defined(Q_OS_WIN)
qtBaseTranslator->load("qtbase_" + locale, translationsPath(locale));
#else
- qtBaseTranslator->load("qtbase_" + locale, QLibraryInfo::location(QLibraryInfo::TranslationsPath));
+ qtBaseTranslator->load("qtbase_" + locale, QLatin1String("@qttranslations@/translations"));
#endif
installTranslator(qtBaseTranslator);