3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/misc/valentina/fix-qttranslations-path.patch

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

38 lines
1.6 KiB
Diff
Raw Normal View History

2022-08-29 20:40:13 +01:00
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);