commit e89d67ea44a0362592a2d8273745637bca489d36
parent e12ddd6e0604fabba1938feeb43d5296256357f3
Author: Nikolay Korotkiy <sikmir@gmail.com>
Date: Mon, 27 Apr 2020 20:23:15 +0300
Fix qt translations path on darwin
Diffstat:
2 files changed, 15 insertions(+), 7 deletions(-)
diff --git a/pkgs/applications/gpxlab/fix-qttranslations-path.diff b/pkgs/applications/gpxlab/fix-qttranslations-path.diff
@@ -1,9 +1,13 @@
diff --git i/GPXLab/main.cpp w/GPXLab/main.cpp
-index b12d2dd..d0c3000 100644
+index b12d2dd..58d37c5 100644
--- i/GPXLab/main.cpp
+++ w/GPXLab/main.cpp
-@@ -22,7 +22,7 @@ int main(int argc, char *argv[])
- #if defined(Q_OS_WIN32) || defined(Q_OS_MAC)
+@@ -19,10 +19,10 @@ int main(int argc, char *argv[])
+ app.installTranslator(&gpxlab);
+
+ QTranslator qt;
+-#if defined(Q_OS_WIN32) || defined(Q_OS_MAC)
++#if defined(Q_OS_WIN32)
qt.load(QLocale::system(), "qt", "_", TRANSLATIONS_DIR);
#else
- qt.load(QLocale::system(), "qt", "_", QLibraryInfo::location(QLibraryInfo::TranslationsPath));
diff --git a/pkgs/applications/gpxsee/fix-qttranslations-path.diff b/pkgs/applications/gpxsee/fix-qttranslations-path.diff
@@ -1,14 +1,18 @@
diff --git i/src/GUI/app.cpp w/src/GUI/app.cpp
-index 10e84d5..ac9059b 100644
+index 10e84d5..1e0abbe 100644
--- i/src/GUI/app.cpp
+++ w/src/GUI/app.cpp
-@@ -37,8 +37,7 @@ App::App(int &argc, char **argv) : QApplication(argc, argv)
- #if defined(Q_OS_WIN32) || defined(Q_OS_MAC)
+@@ -34,11 +34,10 @@ App::App(int &argc, char **argv) : QApplication(argc, argv)
+ installTranslator(gpxsee);
+
+ QTranslator *qt = new QTranslator(this);
+-#if defined(Q_OS_WIN32) || defined(Q_OS_MAC)
++#if defined(Q_OS_WIN32)
qt->load(QLocale::system(), "qt", "_", ProgramPaths::translationsDir());
#else // Q_OS_WIN32 || Q_OS_MAC
- qt->load(QLocale::system(), "qt", "_", QLibraryInfo::location(
- QLibraryInfo::TranslationsPath));
-+ qt->load(QLocale::system(), "qt", "_", "@qttranslations@/translations");
++ qt->load(QLocale::system(), "qt", "_", QLatin1String("@qttranslations@/translations"));
#endif // Q_OS_WIN32 || Q_OS_MAC
installTranslator(qt);