mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-24 11:45:53 +01:00
Fixed MSVC 2015 compile issues
This commit is contained in:
parent
7723392c01
commit
ddebaaa62c
12
src/gui.cpp
12
src/gui.cpp
@ -74,11 +74,11 @@ GUI::GUI()
|
|||||||
void GUI::loadFiles()
|
void GUI::loadFiles()
|
||||||
{
|
{
|
||||||
// Maps
|
// 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");
|
_maps += MapList::load(":/maps.txt");
|
||||||
|
|
||||||
// POI files
|
// 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);
|
QFileInfoList list = dir.entryInfoList(QStringList(), QDir::Files);
|
||||||
for (int i = 0; i < list.size(); ++i) {
|
for (int i = 0; i < list.size(); ++i) {
|
||||||
if (!_poi.loadFile(list.at(i).absoluteFilePath()))
|
if (!_poi.loadFile(list.at(i).absoluteFilePath()))
|
||||||
@ -342,12 +342,12 @@ void GUI::about()
|
|||||||
QMessageBox msgBox(this);
|
QMessageBox msgBox(this);
|
||||||
|
|
||||||
msgBox.setWindowTitle(tr("About GPXSee"));
|
msgBox.setWindowTitle(tr("About GPXSee"));
|
||||||
msgBox.setText(QString("<h3>") + QString(APP_NAME" "APP_VERSION)
|
msgBox.setText(QString("<h3>") + QString(APP_NAME " " APP_VERSION)
|
||||||
+ QString("</h3><p>") + tr("GPX viewer and analyzer") + QString("<p/>"));
|
+ QString("</h3><p>") + tr("GPX viewer and analyzer") + QString("<p/>"));
|
||||||
msgBox.setInformativeText(QString("<table width=\"300\"><tr><td>")
|
msgBox.setInformativeText(QString("<table width=\"300\"><tr><td>")
|
||||||
+ tr("GPXSee is distributed under the terms of the GNU General Public "
|
+ tr("GPXSee is distributed under the terms of the GNU General Public "
|
||||||
"License version 3. For more info about GPXSee visit the project "
|
"License version 3. For more info about GPXSee visit the project "
|
||||||
"homepage at ") + QString("<a href=\""APP_HOMEPAGE"\">"APP_HOMEPAGE
|
"homepage at ") + QString("<a href=\"" APP_HOMEPAGE "\">" APP_HOMEPAGE
|
||||||
"</a>.</td></tr></table>"));
|
"</a>.</td></tr></table>"));
|
||||||
|
|
||||||
QIcon icon = msgBox.windowIcon();
|
QIcon icon = msgBox.windowIcon();
|
||||||
@ -386,7 +386,7 @@ void GUI::dataSources()
|
|||||||
+ tr("Map (tiles) source URLs are read on program startup from the "
|
+ tr("Map (tiles) source URLs are read on program startup from the "
|
||||||
"following file:")
|
"following file:")
|
||||||
+ QString("</p><p><code>") + QDir::homePath()
|
+ QString("</p><p><code>") + QDir::homePath()
|
||||||
+ QString("/"MAP_LIST_FILE"</code></p><p>")
|
+ QString("/" MAP_LIST_FILE "</code></p><p>")
|
||||||
+ tr("The file format is one map entry per line, consisting of the map "
|
+ 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 "
|
"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 "
|
"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 "
|
+ tr("To make GPXSee load a POI file automatically on startup, add "
|
||||||
"the file to the following directory:")
|
"the file to the following directory:")
|
||||||
+ QString("</p><p><code>") + QDir::homePath()
|
+ QString("</p><p><code>") + QDir::homePath()
|
||||||
+ QString("/"POI_DIR"</code></p>")
|
+ QString("/" POI_DIR "</code></p>")
|
||||||
);
|
);
|
||||||
|
|
||||||
msgBox.exec();
|
msgBox.exec();
|
||||||
|
@ -30,7 +30,7 @@ void Map::loadTiles(QList<Tile> &list)
|
|||||||
|
|
||||||
for (int i = 0; i < list.size(); ++i) {
|
for (int i = 0; i < list.size(); ++i) {
|
||||||
Tile &t = list[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(QDir::homePath()).arg(_name).arg(t.zoom()).arg(t.xy().rx())
|
||||||
.arg(t.xy().ry());
|
.arg(t.xy().ry());
|
||||||
QFileInfo fi(file);
|
QFileInfo fi(file);
|
||||||
|
@ -7,7 +7,7 @@ double niceNum(double x, int round)
|
|||||||
double f;
|
double f;
|
||||||
double nf;
|
double nf;
|
||||||
|
|
||||||
expv = floor(log10(x));
|
expv = (int)floor(log10(x));
|
||||||
f = x / pow(10.0, expv);
|
f = x / pow(10.0, expv);
|
||||||
|
|
||||||
if (round) {
|
if (round) {
|
||||||
|
Loading…
Reference in New Issue
Block a user