nixpkgs/pkgs/applications/misc/gpxsee/fix-qttranslations-path.diff

19 lines
722 B
Diff
Raw Normal View History

2020-06-01 09:45:46 +01:00
diff --git i/src/GUI/app.cpp w/src/GUI/app.cpp
2020-12-22 22:29:59 +00:00
index 37e9d3f..d4a065c 100644
2020-06-01 09:45:46 +01:00
--- i/src/GUI/app.cpp
+++ w/src/GUI/app.cpp
2020-12-22 22:29:59 +00:00
@@ -35,11 +35,10 @@ App::App(int &argc, char **argv) : QApplication(argc, argv)
installTranslator(gpxsee);
2020-06-01 09:45:46 +01:00
QTranslator *qt = new QTranslator(this);
-#if defined(Q_OS_WIN32) || defined(Q_OS_MAC)
+#if defined(Q_OS_WIN32)
2020-12-22 22:29:59 +00:00
if (qt->load(QLocale::system(), "qt", "_", ProgramPaths::translationsDir()))
2020-06-01 09:45:46 +01:00
#else // Q_OS_WIN32 || Q_OS_MAC
2020-12-22 22:29:59 +00:00
- if (qt->load(QLocale::system(), "qt", "_", QLibraryInfo::location(
- QLibraryInfo::TranslationsPath)))
+ if (qt->load(QLocale::system(), "qt", "_", QLatin1String("@qttranslations@/translations")))
2020-06-01 09:45:46 +01:00
#endif // Q_OS_WIN32 || Q_OS_MAC
2020-12-22 22:29:59 +00:00
installTranslator(qt);
2020-06-01 09:45:46 +01:00