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
diff options
context:
space:
mode:
authorAlex Zolotarev <deathbaba@gmail.com>2011-07-03 19:47:31 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 01:20:29 +0300
commitadde2107d1effebd18358b60bc190c7bd4e5d75b (patch)
treec32e80f0f03c999ed3738e3331ae45b00a037ee5 /qt/mainwindow.cpp
parent1f30f7f693ac1d66c3cfd66413f6bb78be256479 (diff)
Removed Platform::ReadPathForFile
Diffstat (limited to 'qt/mainwindow.cpp')
-rw-r--r--qt/mainwindow.cpp17
1 files changed, 11 insertions, 6 deletions
diff --git a/qt/mainwindow.cpp b/qt/mainwindow.cpp
index 72d240874f..e46355bf40 100644
--- a/qt/mainwindow.cpp
+++ b/qt/mainwindow.cpp
@@ -94,16 +94,21 @@ MainWindow::MainWindow()
if (bShow)
{
- QFile welcomeTextFile(GetPlatform().ReadPathForFile("welcome.html").c_str());
-
bool bShowUpdateDialog = true;
- if (welcomeTextFile.open(QIODevice::ReadOnly))
+ string text;
+ try
{
- QByteArray text = welcomeTextFile.readAll();
- welcomeTextFile.close();
+ ReaderPtr<Reader> reader = GetPlatform().GetReader("welcome.html");
+ reader.ReadAsString(text);
+ }
+ catch (...)
+ {}
- InfoDialog welcomeDlg(tr("Welcome to MapsWithMe!"), text, this, QStringList(tr("Download Maps")));
+ if (!text.empty())
+ {
+ InfoDialog welcomeDlg(tr("Welcome to MapsWithMe!"), text.c_str(),
+ this, QStringList(tr("Download Maps")));
if (welcomeDlg.exec() == QDialog::Rejected)
bShowUpdateDialog = false;
}