From 0e404e993e4a041d563c85581ec3a472d7a011b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Tue, 5 Mar 2019 22:34:50 +0100 Subject: [PATCH] Fixed some clazy warnings --- src/GUI/cadencegraph.cpp | 2 +- src/GUI/elevationgraph.cpp | 2 +- src/GUI/gearratiograph.cpp | 2 +- src/GUI/heartrategraph.cpp | 2 +- src/GUI/powergraph.cpp | 2 +- src/GUI/speedgraph.cpp | 2 +- src/GUI/temperaturegraph.cpp | 2 +- src/map/rmap.cpp | 2 +- src/map/tileloader.cpp | 2 +- src/map/wms.cpp | 8 ++++---- src/map/wmts.cpp | 8 ++++---- 11 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/GUI/cadencegraph.cpp b/src/GUI/cadencegraph.cpp index d5e5a915..d64e07d1 100644 --- a/src/GUI/cadencegraph.cpp +++ b/src/GUI/cadencegraph.cpp @@ -77,7 +77,7 @@ void CadenceGraph::clear() { _avg.clear(); - GraphView::clear(); + GraphTab::clear(); } void CadenceGraph::showTracks(bool show) diff --git a/src/GUI/elevationgraph.cpp b/src/GUI/elevationgraph.cpp index daa70fa5..6d460366 100644 --- a/src/GUI/elevationgraph.cpp +++ b/src/GUI/elevationgraph.cpp @@ -120,7 +120,7 @@ void ElevationGraph::clear() _routeMin = NAN; _routeMax = NAN; - GraphView::clear(); + GraphTab::clear(); } void ElevationGraph::setYUnits(Units units) diff --git a/src/GUI/gearratiograph.cpp b/src/GUI/gearratiograph.cpp index 27e5faa3..6d07ff8c 100644 --- a/src/GUI/gearratiograph.cpp +++ b/src/GUI/gearratiograph.cpp @@ -86,7 +86,7 @@ void GearRatioGraph::clear() { _map.clear(); - GraphView::clear(); + GraphTab::clear(); } void GearRatioGraph::showTracks(bool show) diff --git a/src/GUI/heartrategraph.cpp b/src/GUI/heartrategraph.cpp index f3d41394..da8ec847 100644 --- a/src/GUI/heartrategraph.cpp +++ b/src/GUI/heartrategraph.cpp @@ -77,7 +77,7 @@ void HeartRateGraph::clear() { _avg.clear(); - GraphView::clear(); + GraphTab::clear(); } void HeartRateGraph::showTracks(bool show) diff --git a/src/GUI/powergraph.cpp b/src/GUI/powergraph.cpp index 0f0f54a2..9af559e0 100644 --- a/src/GUI/powergraph.cpp +++ b/src/GUI/powergraph.cpp @@ -77,7 +77,7 @@ void PowerGraph::clear() { _avg.clear(); - GraphView::clear(); + GraphTab::clear(); } void PowerGraph::showTracks(bool show) diff --git a/src/GUI/speedgraph.cpp b/src/GUI/speedgraph.cpp index f2587eff..db4ea222 100644 --- a/src/GUI/speedgraph.cpp +++ b/src/GUI/speedgraph.cpp @@ -90,7 +90,7 @@ void SpeedGraph::clear() _avg.clear(); _mavg.clear(); - GraphView::clear(); + GraphTab::clear(); } void SpeedGraph::setYUnits() diff --git a/src/GUI/temperaturegraph.cpp b/src/GUI/temperaturegraph.cpp index 6604e805..eaa624e7 100644 --- a/src/GUI/temperaturegraph.cpp +++ b/src/GUI/temperaturegraph.cpp @@ -80,7 +80,7 @@ void TemperatureGraph::clear() { _avg.clear(); - GraphView::clear(); + GraphTab::clear(); } void TemperatureGraph::setYUnits(Units units) diff --git a/src/map/rmap.cpp b/src/map/rmap.cpp index afafc70e..7cca6369 100644 --- a/src/map/rmap.cpp +++ b/src/map/rmap.cpp @@ -99,7 +99,7 @@ static Projection parseProjection(const QString &str, const GCS *gcs) bool RMap::parseIMP(const QByteArray &data) { QStringList lines = QString(data).split("\r\n"); - QList calibrationPoints; + QVector calibrationPoints; const GCS *gcs = 0; QString projection, datum; QRegExp re("^P[0-9]+="); diff --git a/src/map/tileloader.cpp b/src/map/tileloader.cpp index ec727080..0abaa8be 100644 --- a/src/map/tileloader.cpp +++ b/src/map/tileloader.cpp @@ -130,7 +130,7 @@ void TileLoader::loadTilesSync(QVector &list) for (int i = 0; i < tl.size(); i++) { Tile *t = tl[i]; QString file = tileFile(*t); - if (QFileInfo(file).exists()) + if (QFileInfo::exists(file)) imgs.append(TileImage(file, t)); } } diff --git a/src/map/wms.cpp b/src/map/wms.cpp index b52cc71e..03443600 100644 --- a/src/map/wms.cpp +++ b/src/map/wms.cpp @@ -264,12 +264,12 @@ bool WMS::getCapabilities(const QString &url, const QString &file, if (d.get(dl, authorization)) wait.exec(); - if (QFileInfo(file).exists()) - return true; - else { + if (!QFileInfo::exists(file)) { _errorString = "Error downloading capabilities XML file"; return false; } + + return true; } 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") .arg(setup.url(), setup.url().contains('?') ? "&" : "?"); - if (!QFileInfo(file).exists()) + if (!QFileInfo::exists(file)) if (!getCapabilities(capaUrl, file, setup.authorization())) return; if (!parseCapabilities(file, setup)) diff --git a/src/map/wmts.cpp b/src/map/wmts.cpp index 90d3cb6c..b01cd293 100644 --- a/src/map/wmts.cpp +++ b/src/map/wmts.cpp @@ -305,12 +305,12 @@ bool WMTS::downloadCapabilities(const QString &url, const QString &file, if (d.get(dl, authorization)) wait.exec(); - if (QFileInfo(file).exists()) - return true; - else { + if (!QFileInfo::exists(file)) { _errorString = "Error downloading capabilities XML file"; return false; } + + return true; } 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(), setup.url().contains('?') ? "&" : "?")); - if (!url.isLocalFile() && !QFileInfo(file).exists()) + if (!url.isLocalFile() && !QFileInfo::exists(file)) if (!downloadCapabilities(url.toString(), file, setup.authorization())) return;