1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-12-01 07:01:16 +01:00

Fixed some clazy warnings

This commit is contained in:
Martin Tůma 2019-03-05 22:34:50 +01:00
parent efca589f01
commit 0e404e993e
11 changed files with 17 additions and 17 deletions

View File

@ -77,7 +77,7 @@ void CadenceGraph::clear()
{ {
_avg.clear(); _avg.clear();
GraphView::clear(); GraphTab::clear();
} }
void CadenceGraph::showTracks(bool show) void CadenceGraph::showTracks(bool show)

View File

@ -120,7 +120,7 @@ void ElevationGraph::clear()
_routeMin = NAN; _routeMin = NAN;
_routeMax = NAN; _routeMax = NAN;
GraphView::clear(); GraphTab::clear();
} }
void ElevationGraph::setYUnits(Units units) void ElevationGraph::setYUnits(Units units)

View File

@ -86,7 +86,7 @@ void GearRatioGraph::clear()
{ {
_map.clear(); _map.clear();
GraphView::clear(); GraphTab::clear();
} }
void GearRatioGraph::showTracks(bool show) void GearRatioGraph::showTracks(bool show)

View File

@ -77,7 +77,7 @@ void HeartRateGraph::clear()
{ {
_avg.clear(); _avg.clear();
GraphView::clear(); GraphTab::clear();
} }
void HeartRateGraph::showTracks(bool show) void HeartRateGraph::showTracks(bool show)

View File

@ -77,7 +77,7 @@ void PowerGraph::clear()
{ {
_avg.clear(); _avg.clear();
GraphView::clear(); GraphTab::clear();
} }
void PowerGraph::showTracks(bool show) void PowerGraph::showTracks(bool show)

View File

@ -90,7 +90,7 @@ void SpeedGraph::clear()
_avg.clear(); _avg.clear();
_mavg.clear(); _mavg.clear();
GraphView::clear(); GraphTab::clear();
} }
void SpeedGraph::setYUnits() void SpeedGraph::setYUnits()

View File

@ -80,7 +80,7 @@ void TemperatureGraph::clear()
{ {
_avg.clear(); _avg.clear();
GraphView::clear(); GraphTab::clear();
} }
void TemperatureGraph::setYUnits(Units units) void TemperatureGraph::setYUnits(Units units)

View File

@ -99,7 +99,7 @@ static Projection parseProjection(const QString &str, const GCS *gcs)
bool RMap::parseIMP(const QByteArray &data) bool RMap::parseIMP(const QByteArray &data)
{ {
QStringList lines = QString(data).split("\r\n"); QStringList lines = QString(data).split("\r\n");
QList<CalibrationPoint> calibrationPoints; QVector<CalibrationPoint> calibrationPoints;
const GCS *gcs = 0; const GCS *gcs = 0;
QString projection, datum; QString projection, datum;
QRegExp re("^P[0-9]+="); QRegExp re("^P[0-9]+=");

View File

@ -130,7 +130,7 @@ void TileLoader::loadTilesSync(QVector<Tile> &list)
for (int i = 0; i < tl.size(); i++) { for (int i = 0; i < tl.size(); i++) {
Tile *t = tl[i]; Tile *t = tl[i];
QString file = tileFile(*t); QString file = tileFile(*t);
if (QFileInfo(file).exists()) if (QFileInfo::exists(file))
imgs.append(TileImage(file, t)); imgs.append(TileImage(file, t));
} }
} }

View File

@ -264,12 +264,12 @@ bool WMS::getCapabilities(const QString &url, const QString &file,
if (d.get(dl, authorization)) if (d.get(dl, authorization))
wait.exec(); wait.exec();
if (QFileInfo(file).exists()) if (!QFileInfo::exists(file)) {
return true;
else {
_errorString = "Error downloading capabilities XML file"; _errorString = "Error downloading capabilities XML file";
return false; return false;
} }
return true;
} }
WMS::WMS(const QString &file, const WMS::Setup &setup) : _valid(false) WMS::WMS(const QString &file, const WMS::Setup &setup) : _valid(false)
@ -277,7 +277,7 @@ WMS::WMS(const QString &file, const WMS::Setup &setup) : _valid(false)
QString capaUrl = QString("%1%2service=WMS&request=GetCapabilities") QString capaUrl = QString("%1%2service=WMS&request=GetCapabilities")
.arg(setup.url(), setup.url().contains('?') ? "&" : "?"); .arg(setup.url(), setup.url().contains('?') ? "&" : "?");
if (!QFileInfo(file).exists()) if (!QFileInfo::exists(file))
if (!getCapabilities(capaUrl, file, setup.authorization())) if (!getCapabilities(capaUrl, file, setup.authorization()))
return; return;
if (!parseCapabilities(file, setup)) if (!parseCapabilities(file, setup))

View File

@ -305,12 +305,12 @@ bool WMTS::downloadCapabilities(const QString &url, const QString &file,
if (d.get(dl, authorization)) if (d.get(dl, authorization))
wait.exec(); wait.exec();
if (QFileInfo(file).exists()) if (!QFileInfo::exists(file)) {
return true;
else {
_errorString = "Error downloading capabilities XML file"; _errorString = "Error downloading capabilities XML file";
return false; return false;
} }
return true;
} }
WMTS::WMTS(const QString &file, const WMTS::Setup &setup) : _valid(false) WMTS::WMTS(const QString &file, const WMTS::Setup &setup) : _valid(false)
@ -319,7 +319,7 @@ WMTS::WMTS(const QString &file, const WMTS::Setup &setup) : _valid(false)
"%1%2service=WMTS&Version=1.0.0&request=GetCapabilities").arg(setup.url(), "%1%2service=WMTS&Version=1.0.0&request=GetCapabilities").arg(setup.url(),
setup.url().contains('?') ? "&" : "?")); setup.url().contains('?') ? "&" : "?"));
if (!url.isLocalFile() && !QFileInfo(file).exists()) if (!url.isLocalFile() && !QFileInfo::exists(file))
if (!downloadCapabilities(url.toString(), file, setup.authorization())) if (!downloadCapabilities(url.toString(), file, setup.authorization()))
return; return;