d5f4a57cbf
GitOrigin-RevId: ce5e4a6ef2e59d89a971bc434ca8ca222b9c7f5e
74 lines
3.6 KiB
Diff
74 lines
3.6 KiB
Diff
diff --git i/src/qmapshack/setup/CAppSetupLinux.cpp w/src/qmapshack/setup/CAppSetupLinux.cpp
|
|
index 7581ef32..26eba3c8 100644
|
|
--- i/src/qmapshack/setup/CAppSetupLinux.cpp
|
|
+++ w/src/qmapshack/setup/CAppSetupLinux.cpp
|
|
@@ -30,7 +30,7 @@ void CAppSetupLinux::initQMapShack() {
|
|
prepareGdal("", "");
|
|
|
|
// setup translators
|
|
- QString resourceDir = QLibraryInfo::location(QLibraryInfo::TranslationsPath);
|
|
+ QLatin1String resourceDir = QLatin1String("@qttranslations@/translations");
|
|
QString translationPath = QCoreApplication::applicationDirPath();
|
|
translationPath.replace(QRegExp("bin$"), "share/qmapshack/translations");
|
|
prepareTranslator(resourceDir, "qt_");
|
|
diff --git i/src/qmapshack/setup/CAppSetupMac.cpp w/src/qmapshack/setup/CAppSetupMac.cpp
|
|
index 37602802..ae4a5a23 100644
|
|
--- i/src/qmapshack/setup/CAppSetupMac.cpp
|
|
+++ w/src/qmapshack/setup/CAppSetupMac.cpp
|
|
@@ -56,7 +56,7 @@ void CAppSetupMac::initQMapShack() {
|
|
|
|
// setup translators
|
|
QString translationPath = getApplicationDir(relTranslationDir).absolutePath();
|
|
- prepareTranslator(translationPath, "qt_");
|
|
+ prepareTranslator(QLatin1String("@qttranslations@/translations"), "qt_");
|
|
prepareTranslator(translationPath, "qmapshack_");
|
|
|
|
// load and apply style sheet
|
|
diff --git i/src/qmaptool/setup/CAppSetupLinux.cpp w/src/qmaptool/setup/CAppSetupLinux.cpp
|
|
index b703e7bb..637d653e 100644
|
|
--- i/src/qmaptool/setup/CAppSetupLinux.cpp
|
|
+++ w/src/qmaptool/setup/CAppSetupLinux.cpp
|
|
@@ -29,7 +29,7 @@ void CAppSetupLinux::initQMapTool() {
|
|
prepareGdal("", "");
|
|
|
|
// setup translators
|
|
- QString resourceDir = QLibraryInfo::location(QLibraryInfo::TranslationsPath);
|
|
+ QLatin1String resourceDir = QLatin1String("@qttranslations@/translations");
|
|
QString translationPath = QCoreApplication::applicationDirPath();
|
|
translationPath.replace(QRegExp("bin$"), "share/qmaptool/translations");
|
|
prepareTranslator(resourceDir, "qt_");
|
|
diff --git i/src/qmaptool/setup/CAppSetupMac.cpp w/src/qmaptool/setup/CAppSetupMac.cpp
|
|
index dd68b9c1..84351cf4 100644
|
|
--- i/src/qmaptool/setup/CAppSetupMac.cpp
|
|
+++ w/src/qmaptool/setup/CAppSetupMac.cpp
|
|
@@ -57,7 +57,7 @@ void CAppSetupMac::initQMapTool() {
|
|
|
|
// setup translators
|
|
QString translationPath = getApplicationDir(relTranslationDir).absolutePath();
|
|
- prepareTranslator(translationPath, "qt_");
|
|
+ prepareTranslator(QLatin1String("@qttranslations@/translations"), "qt_");
|
|
prepareTranslator(translationPath, "qmaptool_");
|
|
|
|
migrateDirContent(defaultCachePath());
|
|
diff --git i/src/qmt_rgb2pct/main.cpp w/src/qmt_rgb2pct/main.cpp
|
|
index 589d3d52..5f7c12f8 100644
|
|
--- i/src/qmt_rgb2pct/main.cpp
|
|
+++ w/src/qmt_rgb2pct/main.cpp
|
|
@@ -47,7 +47,7 @@ static void prepareTranslator(QString translationPath, QString translationPrefix
|
|
static void loadTranslations() {
|
|
#if defined(Q_OS_LINUX) || defined(Q_OS_FREEBSD) || defined(__FreeBSD_kernel__) || defined(__GNU__) || \
|
|
defined(Q_OS_CYGWIN)
|
|
- QString resourceDir = QLibraryInfo::location(QLibraryInfo::TranslationsPath);
|
|
+ QLatin1String resourceDir = QLatin1String("@qttranslations@/translations");
|
|
QString translationPath = QCoreApplication::applicationDirPath();
|
|
translationPath.replace(QRegExp("bin$"), "share/" APP_STR "/translations");
|
|
prepareTranslator(resourceDir, "qt_");
|
|
@@ -58,7 +58,7 @@ static void loadTranslations() {
|
|
// os x
|
|
static QString relTranslationDir = "Resources/translations"; // app
|
|
QString translationPath = getApplicationDir(relTranslationDir).absolutePath();
|
|
- prepareTranslator(translationPath, "qt_");
|
|
+ prepareTranslator(QLatin1String("@qttranslations@/translations"), "qt_");
|
|
prepareTranslator(translationPath, APP_STR "_");
|
|
#endif
|
|
|