Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/qt
diff options
context:
space:
mode:
authorYuri Gorshenin <y@maps.me>2017-09-05 16:40:18 +0300
committermpimenov <mpimenov@users.noreply.github.com>2017-09-05 16:45:55 +0300
commit62e3177639416107240544835f3a10c4365e15cd (patch)
tree43b6dfaf544a8a9df5b3014b02f2ed38e809423c /qt
parentfc351bfed9bd6e4494878f730c8971ccbb49cd06 (diff)
[search] ErrorsMade ranking feature.
Diffstat (limited to 'qt')
-rw-r--r--qt/main.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/qt/main.cpp b/qt/main.cpp
index e53f4e208c..9e089b1025 100644
--- a/qt/main.cpp
+++ b/qt/main.cpp
@@ -25,8 +25,10 @@
#include <QtWidgets/QApplication>
#include <QFileDialog>
+DEFINE_string(data_path, "", "Path to data directory");
DEFINE_string(log_abort_level, my::ToString(my::GetDefaultLogAbortLevel()),
"Log messages severity that causes termination.");
+DEFINE_string(resources_path, "", "Path to resources directory");
namespace
{
@@ -94,6 +96,12 @@ int main(int argc, char * argv[])
google::SetUsageMessage("Desktop application.");
google::ParseCommandLineFlags(&argc, &argv, true);
+ Platform & platform = GetPlatform();
+ if (!FLAGS_resources_path.empty())
+ platform.SetResourceDir(FLAGS_resources_path);
+ if (!FLAGS_data_path.empty())
+ platform.SetWritableDirForTests(FLAGS_data_path);
+
my::LogLevel level;
CHECK(my::FromString(FLAGS_log_abort_level, level), ());
my::g_LogAbortLevel = level;
@@ -115,7 +123,7 @@ int main(int argc, char * argv[])
alohalytics::Stats::Instance().SetDebugMode(true);
#endif
- GetPlatform().SetupMeasurementSystem();
+ platform.SetupMeasurementSystem();
// display EULA if needed
char const * settingsEULA = "EulaAccepted";
@@ -127,7 +135,7 @@ int main(int argc, char * argv[])
string buffer;
{
- ReaderPtr<Reader> reader = GetPlatform().GetReader("eula.html");
+ ReaderPtr<Reader> reader = platform.GetReader("eula.html");
reader.ReadAsString(buffer);
}
qt::InfoDialog eulaDialog(qAppName() + QString(" End User Licensing Agreement"), buffer.c_str(), NULL, buttons);
@@ -146,7 +154,7 @@ int main(int argc, char * argv[])
qt::MainWindow::SetDefaultSurfaceFormat(apiOpenGLES3);
#ifdef BUILD_DESIGNER
- if (argc >= 2 && GetPlatform().IsFileExistsByFullPath(argv[1]))
+ if (argc >= 2 && platform.IsFileExistsByFullPath(argv[1]))
mapcssFilePath = argv[1];
if (0 == mapcssFilePath.length())
{