From bb7ea39d283156817cc742d36aaf87b16ec3a4bf Mon Sep 17 00:00:00 2001 From: srcejon Date: Tue, 27 Feb 2024 16:28:23 +0000 Subject: [PATCH] Fix gcc warnings. --- plugins/feature/map/mapgui.cpp | 10 ++++++++-- plugins/feature/map/maptileserver.h | 5 ----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/plugins/feature/map/mapgui.cpp b/plugins/feature/map/mapgui.cpp index cfdd1f438..e192af0b5 100644 --- a/plugins/feature/map/mapgui.cpp +++ b/plugins/feature/map/mapgui.cpp @@ -207,8 +207,8 @@ MapGUI::MapGUI(PluginAPI* pluginAPI, FeatureUISet *featureUISet, Feature *featur m_legend(nullptr), m_nasaWidget(nullptr), m_legendWidget(nullptr), - m_descriptionWidget(nullptr), - m_overviewWidget(nullptr) + m_overviewWidget(nullptr), + m_descriptionWidget(nullptr) { m_feature = feature; setAttribute(Qt::WA_DeleteOnClose, true); @@ -1437,6 +1437,8 @@ void MapGUI::nasaGlobalImageryMetaDataUpdated(const NASAGlobalImagery::MetaData& void MapGUI::nasaGlobalImageryLegendAvailable(const QString& url, const QByteArray& data) { + (void) url; + if (m_legendWidget) { m_legendWidget->load(data); @@ -1450,6 +1452,8 @@ void MapGUI::nasaGlobalImageryLegendAvailable(const QString& url, const QByteArr void MapGUI::nasaGlobalImageryHTMLAvailable(const QString& url, const QByteArray& data) { + (void) url; + if (m_descriptionWidget) { m_descriptionWidget->setHtml(data); } @@ -1657,6 +1661,8 @@ bool MapGUI::eventFilter(QObject *obj, QEvent *event) void MapGUI::orientationChanged(Qt::ScreenOrientation orientation) { + (void) orientation; + // Need a delay before geometry() reflects new orientation // https://bugreports.qt.io/browse/QTBUG-109127 QTimer::singleShot(200, [this]() { diff --git a/plugins/feature/map/maptileserver.h b/plugins/feature/map/maptileserver.h index 802a2c65e..736f0bd89 100644 --- a/plugins/feature/map/maptileserver.h +++ b/plugins/feature/map/maptileserver.h @@ -358,11 +358,6 @@ private slots: { qDebug() << "MapTileServer::downloadFinished: Failed to load image: " << url; } - else - { - bool cached = reply->attribute(QNetworkRequest::SourceIsFromCacheAttribute).toBool(); - //qDebug() << "Downloaded " << url << "as" << image.size() << "cached:" << cached; - } } else {