From 214c4a50b638373e9aeb9939d3b65419296c76f1 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Tue, 25 Oct 2016 17:54:51 +0300 Subject: [PATCH] Fixed path to translations and standard measurements on Mac OS X. --HG-- branch : develop --- src/libs/vmisc/vabstractapplication.cpp | 6 +++++- src/libs/vmisc/vcommonsettings.cpp | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/libs/vmisc/vabstractapplication.cpp b/src/libs/vmisc/vabstractapplication.cpp index 7338fd4eb..d6513d8ca 100644 --- a/src/libs/vmisc/vabstractapplication.cpp +++ b/src/libs/vmisc/vabstractapplication.cpp @@ -150,7 +150,11 @@ QString VAbstractApplication::translationsPath(const QString &locale) const } else { - QDir dir(QApplication::applicationDirPath() + trPath); + QDir appDir = QDir(qApp->applicationDirPath()); + appDir.cdUp(); + appDir.cdUp(); + appDir.cdUp(); + QDir dir(appDir.absolutePath() + trPath); if (dir.exists()) { return dir.absolutePath(); diff --git a/src/libs/vmisc/vcommonsettings.cpp b/src/libs/vmisc/vcommonsettings.cpp index 10f888ba1..af84473bb 100644 --- a/src/libs/vmisc/vcommonsettings.cpp +++ b/src/libs/vmisc/vcommonsettings.cpp @@ -95,7 +95,11 @@ QString VCommonSettings::StandardTablesPath() const } else { - QDir dir(QApplication::applicationDirPath() + stPath); + QDir appDir = QDir(qApp->applicationDirPath()); + appDir.cdUp(); + appDir.cdUp(); + appDir.cdUp(); + QDir dir(appDir.absolutePath() + stPath); if (dir.exists()) { return dir.absolutePath();