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("
") + tr("GPXSee is distributed under the terms of the GNU General Public " "License version 3. For more info about GPXSee visit the project " - "homepage at ") + QString(""APP_HOMEPAGE + "homepage at ") + QString("" APP_HOMEPAGE ".
")); 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) {