diff options
author | Ilya Grechuhin <i.grechuhin@mapswithme.com> | 2015-07-16 13:49:24 +0300 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 02:56:31 +0300 |
commit | 3c5bb1746c29c54a40a16efaba9c6c2eb5500c74 (patch) | |
tree | ae57f3dfb910e049888931b38d14e5158dc69071 /qt/main.cpp | |
parent | 51e035216bc40b91819c9aaa16eab2205715ec5d (diff) |
[omim] Extracted measurement system setup to platform.
Diffstat (limited to 'qt/main.cpp')
-rw-r--r-- | qt/main.cpp | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/qt/main.cpp b/qt/main.cpp index 0948022ec0..acfb89f402 100644 --- a/qt/main.cpp +++ b/qt/main.cpp @@ -1,20 +1,20 @@ -#include "qt/mainwindow.hpp" + #include "qt/info_dialog.hpp" +#include "qt/mainwindow.hpp" -#include "platform/settings.hpp" #include "platform/platform.hpp" +#include "platform/settings.hpp" + +#include "coding/file_reader.hpp" #include "base/logging.hpp" #include "base/macros.hpp" #include "base/object_tracker.hpp" -#include "coding/file_reader.hpp" - #include "std/cstdio.hpp" #include "3party/Alohalytics/src/alohalytics.h" -#include <QtCore/QLocale> #include <QtCore/QDir> #if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) @@ -71,19 +71,7 @@ int main(int argc, char * argv[]) alohalytics::Stats::Instance().SetDebugMode(true); #endif - // checking default measurement system. - Settings::Units u; - - if (!Settings::Get("Units", u)) - { - // set default measurement from system locale - if (QLocale::system().measurementSystem() == QLocale::MetricSystem) - u = Settings::Metric; - else - u = Settings::Foot; - } - - Settings::Set("Units", u); + GetPlatform().SetupMeasurementSystem(); // display EULA if needed char const * settingsEULA = "EulaAccepted"; |