From b171ddccd284c0d57bd928641215bdcd2a57762e Mon Sep 17 00:00:00 2001 From: Jon Beniston Date: Fri, 30 Oct 2026 17:30:53 +0000 Subject: [PATCH] Fix warnings. --- plugins/feature/aircraft/aircraftgui.cpp | 4 ++-- plugins/feature/aircraft/aircrafttracker.cpp | 3 --- plugins/feature/map/map.cpp | 1 + plugins/feature/map/mapgui.cpp | 6 +++--- plugins/feature/map/mapitem.h | 4 ++-- plugins/feature/map/mapmodel.cpp | 6 +++--- plugins/feature/map/msfsassetconverter/converter.cpp | 2 +- 7 files changed, 12 insertions(+), 14 deletions(-) diff --git a/plugins/feature/aircraft/aircraftgui.cpp b/plugins/feature/aircraft/aircraftgui.cpp index 88c9a95a1..85ebe0f3c 100644 --- a/plugins/feature/aircraft/aircraftgui.cpp +++ b/plugins/feature/aircraft/aircraftgui.cpp @@ -1434,7 +1434,7 @@ void AircraftGUI::trackerDocumentsAdded(const QList& documents) row.m_receivedMs = e.m_received.isValid() ? e.m_received.toMSecsSinceEpoch() : 0; row.m_mapName = e.m_mapName; row.m_text = e.m_text; - row.m_cells = { e.m_flight, e.m_reg, e.m_kind, e.m_title }; + row.m_cells = QStringList{ e.m_flight, e.m_reg, e.m_kind, e.m_title }; // Logons go to their own tab. There are far more of them than of everything else // together - 6610 against 700 in a week here - so left in with the flight plans // and clearances they buried them. @@ -1505,7 +1505,7 @@ void AircraftGUI::trackerAtcMessages(const QList& messages) // The link it arrived on, not e.m_protocol: every ATC message is CPDLC by // definition - addAtcMessage() returns early for anything else - so that column // held the same word in every row - row.m_cells = { e.m_link, QString(QChar(e.m_uplink ? 0x2191 : 0x2193)), e.m_from, e.m_to, e.m_message }; + row.m_cells = QStringList{ e.m_link, QString(QChar(e.m_uplink ? 0x2191 : 0x2193)), e.m_from, e.m_to, e.m_message }; rows.append(row); } m_atcModel->append(rows); diff --git a/plugins/feature/aircraft/aircrafttracker.cpp b/plugins/feature/aircraft/aircrafttracker.cpp index e33a1a5c5..8246cc161 100644 --- a/plugins/feature/aircraft/aircrafttracker.cpp +++ b/plugins/feature/aircraft/aircrafttracker.cpp @@ -774,8 +774,6 @@ void AircraftTracker::processReport(AircraftReport& report) } } - // Whether THIS report supplied the position we are now holding - see updateStatistics() - bool positionAccepted = false; // How far away the position THIS report carried is, whether or not it was adopted bool reportRangeValid = false; float reportRangeKm = 0.0f; @@ -872,7 +870,6 @@ void AircraftTracker::processReport(AircraftReport& report) if (current && !superseded && plausible) { - positionAccepted = true; item->m_positionRankTimes[rank] = report.m_received; item->m_positionRank = rank; item->m_positionValid = true; diff --git a/plugins/feature/map/map.cpp b/plugins/feature/map/map.cpp index ddd392d19..0b3432e09 100644 --- a/plugins/feature/map/map.cpp +++ b/plugins/feature/map/map.cpp @@ -27,6 +27,7 @@ #include "SWGFeatureReport.h" #include "SWGFeatureActions.h" #include "SWGDeviceState.h" +#include "SWGMapItem.h" #include "feature/featureset.h" #include "settings/serializable.h" diff --git a/plugins/feature/map/mapgui.cpp b/plugins/feature/map/mapgui.cpp index bc3231f63..246d01b2e 100644 --- a/plugins/feature/map/mapgui.cpp +++ b/plugins/feature/map/mapgui.cpp @@ -285,14 +285,14 @@ MapGUI::MapGUI(PluginAPI* pluginAPI, FeatureUISet *featureUISet, Feature *featur m_beaconDialog(this), m_ibpBeaconDialog(this), m_radioTimeDialog(this), + m_viewCoordinator(this), + m_restoreMapPosition(false), m_cesium(nullptr), m_legend(nullptr), m_nasaWidget(nullptr), m_legendWidget(nullptr), m_overviewWidget(nullptr), - m_descriptionWidget(nullptr), - m_restoreMapPosition(false), - m_viewCoordinator(this) + m_descriptionWidget(nullptr) { m_feature = feature; setAttribute(Qt::WA_DeleteOnClose, true); diff --git a/plugins/feature/map/mapitem.h b/plugins/feature/map/mapitem.h index 658855b41..1cba223b8 100644 --- a/plugins/feature/map/mapitem.h +++ b/plugins/feature/map/mapitem.h @@ -107,8 +107,8 @@ public: public: ObjectMapItem(const QObject *sourcePipe, const QString &group, MapSettings::MapItemSettings *itemSettings, SWGSDRangel::SWGMapItem *mapItem) : MapItem(sourcePipe, group, itemSettings, mapItem), - m_aircraftState(nullptr), - m_trackColorModel(nullptr) + m_trackColorModel(nullptr), + m_aircraftState(nullptr) { update(mapItem); } diff --git a/plugins/feature/map/mapmodel.cpp b/plugins/feature/map/mapmodel.cpp index a59163c3f..48dad47a6 100644 --- a/plugins/feature/map/mapmodel.cpp +++ b/plugins/feature/map/mapmodel.cpp @@ -749,13 +749,13 @@ void TrackColorModel::clear() ObjectMapModel::ObjectMapModel(MapGUI *gui) : MapModel(gui), m_target(-1), + m_frontZOrder(0.0), + m_backZOrder(0.0), m_displayNames(false), m_displaySelectedGroundTracks(false), m_displayAllGroundTracks(false), m_bottomLeftLongitude(0.0), - m_bottomRightLongitude(0.0), - m_frontZOrder(0.0), - m_backZOrder(0.0) + m_bottomRightLongitude(0.0) { //connect(this, &ObjectMapModel::dataChanged, this, &ObjectMapModel::update3DMap); } diff --git a/plugins/feature/map/msfsassetconverter/converter.cpp b/plugins/feature/map/msfsassetconverter/converter.cpp index 421818c0d..2a7526ee7 100644 --- a/plugins/feature/map/msfsassetconverter/converter.cpp +++ b/plugins/feature/map/msfsassetconverter/converter.cpp @@ -105,7 +105,7 @@ bool reusableKtx2(const QString &fileName) const quint32 faceCount = littleEndianValue(prefix, 36); const quint32 levelCount = littleEndianValue(prefix, 40); if (width == 0 || height == 0 || faceCount != 1 || levelCount == 0 || - levelCount > 32 || prefix.size() < 80 + levelCount * 24) { + levelCount > 32 || prefix.size() < 80 + static_cast(levelCount) * 24) { return false; }