summaryrefslogtreecommitdiffhomepage
path: root/gui/main.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2017-10-08 13:39:23 +0200
committerStanislaw Halik <sthalik@misaki.pl>2017-10-08 13:42:40 +0200
commit863b8cad6d95ed2492ac929066f843664a49998d (patch)
tree527a20e268234ac81b86d6e88506c3b847f5dc25 /gui/main.cpp
parentced9bbd4c1b7d3a3968dbf8b1731bc49ff9f9164 (diff)
add complete(?) portable config support
Diffstat (limited to 'gui/main.cpp')
-rw-r--r--gui/main.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/gui/main.cpp b/gui/main.cpp
index d929c543..3739232f 100644
--- a/gui/main.cpp
+++ b/gui/main.cpp
@@ -167,9 +167,11 @@ main(int argc, char** argv)
// QLocale::setDefault(QLocale("ru_RU")); // force i18n for testing
- if (!QSettings(OPENTRACK_ORG).value("disable-translation", false).toBool())
+ if (group::with_global_settings_object([&](QSettings& s) {
+ return !s.value("disable-translation", false).toBool();
+ }))
{
- (void) t.load(QLocale(), "", "", QCoreApplication::applicationDirPath() + "/" OPENTRACK_I18N_PATH, ".qm");
+ (void) t.load(QLocale(), "", "", OPENTRACK_BASE_PATH + "/" OPENTRACK_I18N_PATH, ".qm");
(void) QCoreApplication::installTranslator(&t);
}