From ddebaaa62c465a43342a2cf9f6a3e25eb93d7d1a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Martin=20T=C5=AFma?=
Date: Sun, 7 Feb 2016 18:27:50 +0100
Subject: [PATCH] Fixed MSVC 2015 compile issues
---
src/gui.cpp | 12 ++++++------
src/map.cpp | 2 +-
src/nicenum.cpp | 2 +-
3 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/gui.cpp b/src/gui.cpp
index 7f70608b..3ce039a8 100644
--- a/src/gui.cpp
+++ b/src/gui.cpp
@@ -74,11 +74,11 @@ GUI::GUI()
void GUI::loadFiles()
{
// Maps
- _maps = MapList::load(QString("%1/"MAP_LIST_FILE).arg(QDir::homePath()));
+ _maps = MapList::load(QString("%1/" MAP_LIST_FILE).arg(QDir::homePath()));
_maps += MapList::load(":/maps.txt");
// POI files
- QDir dir(QString("%1/"POI_DIR).arg(QDir::homePath()));
+ QDir dir(QString("%1/" POI_DIR).arg(QDir::homePath()));
QFileInfoList list = dir.entryInfoList(QStringList(), QDir::Files);
for (int i = 0; i < list.size(); ++i) {
if (!_poi.loadFile(list.at(i).absoluteFilePath()))
@@ -342,12 +342,12 @@ void GUI::about()
QMessageBox msgBox(this);
msgBox.setWindowTitle(tr("About GPXSee"));
- msgBox.setText(QString("") + QString(APP_NAME" "APP_VERSION)
+ msgBox.setText(QString("") + QString(APP_NAME " " APP_VERSION)
+ QString("
") + tr("GPX viewer and analyzer") + QString("
"));
msgBox.setInformativeText(QString(""));
QIcon icon = msgBox.windowIcon();
@@ -386,7 +386,7 @@ void GUI::dataSources()
+ tr("Map (tiles) source URLs are read on program startup from the "
"following file:")
+ QString("
") + QDir::homePath()
- + QString("/"MAP_LIST_FILE"
")
+ + QString("/" MAP_LIST_FILE "
")
+ tr("The file format is one map entry per line, consisting of the map "
"name and tiles URL delimited by a TAB character. The tile X and Y "
"coordinates are replaced with $x and $y in the URL and the zoom "
@@ -398,7 +398,7 @@ void GUI::dataSources()
+ tr("To make GPXSee load a POI file automatically on startup, add "
"the file to the following directory:")
+ QString("
") + QDir::homePath()
- + QString("/"POI_DIR"
")
+ + QString("/" POI_DIR "")
);
msgBox.exec();
diff --git a/src/map.cpp b/src/map.cpp
index 7e0482c5..5ea50d14 100644
--- a/src/map.cpp
+++ b/src/map.cpp
@@ -30,7 +30,7 @@ void Map::loadTiles(QList &list)
for (int i = 0; i < list.size(); ++i) {
Tile &t = list[i];
- QString file = QString("%1/"TILES_DIR"/%2/%3-%4-%5")
+ QString file = QString("%1/" TILES_DIR "/%2/%3-%4-%5")
.arg(QDir::homePath()).arg(_name).arg(t.zoom()).arg(t.xy().rx())
.arg(t.xy().ry());
QFileInfo fi(file);
diff --git a/src/nicenum.cpp b/src/nicenum.cpp
index e4f1dabc..f81d30b3 100644
--- a/src/nicenum.cpp
+++ b/src/nicenum.cpp
@@ -7,7 +7,7 @@ double niceNum(double x, int round)
double f;
double nf;
- expv = floor(log10(x));
+ expv = (int)floor(log10(x));
f = x / pow(10.0, expv);
if (round) {