From df8451dbded2cc2ed98ed0d39729f0f59929cc82 Mon Sep 17 00:00:00 2001 From: Jon Beniston Date: Fri, 4 Feb 2022 22:42:05 +0000 Subject: [PATCH] Fix linux warnings --- plugins/feature/ais/aisgui.cpp | 4 +--- plugins/feature/ais/aisgui.h | 2 +- plugins/feature/map/cesiuminterface.cpp | 7 ++++--- plugins/feature/map/czml.cpp | 4 +++- plugins/feature/map/czml.h | 2 +- plugins/feature/map/mapmodel.cpp | 2 ++ 6 files changed, 12 insertions(+), 9 deletions(-) diff --git a/plugins/feature/ais/aisgui.cpp b/plugins/feature/ais/aisgui.cpp index b70216438..62ab14042 100644 --- a/plugins/feature/ais/aisgui.cpp +++ b/plugins/feature/ais/aisgui.cpp @@ -444,6 +444,7 @@ void AISGUI::sendToMap(const QString &name, const QString &label, swgMapItem->setImage(new QString(QString("qrc:///ais/map/%1").arg(image))); } swgMapItem->setModel(new QString(model)); + swgMapItem->setModelAltitudeOffset(modelOffset); swgMapItem->setLabel(new QString(label)); swgMapItem->setLabelAltitudeOffset(labelOffset); swgMapItem->setFixedPosition(false); @@ -974,9 +975,6 @@ void AISGUI::vessels_customContextMenuRequested(QPoint pos) // Find on Map if (!latitudeV.isNull()) { - float latitude = latitudeV.toFloat(); - float longitude = longitudeV.toFloat(); - tableContextMenu->addSeparator(); QAction* findMapFeatureAction = new QAction(QString("Find MMSI %1 on map").arg(mmsi), tableContextMenu); diff --git a/plugins/feature/ais/aisgui.h b/plugins/feature/ais/aisgui.h index 797700e7f..ff87ca5e3 100644 --- a/plugins/feature/ais/aisgui.h +++ b/plugins/feature/ais/aisgui.h @@ -92,7 +92,7 @@ private: void leaveEvent(QEvent*); void enterEvent(QEvent*); - void AISGUI::sendToMap(const QString &name, const QString &label, + void sendToMap(const QString &name, const QString &label, const QString &image, const QString &text, const QString &model, float modelOffset, float labelOffset, float latitude, float longitude, QDateTime positionDateTime, diff --git a/plugins/feature/map/cesiuminterface.cpp b/plugins/feature/map/cesiuminterface.cpp index b9a81b8e3..92701769f 100644 --- a/plugins/feature/map/cesiuminterface.cpp +++ b/plugins/feature/map/cesiuminterface.cpp @@ -20,8 +20,8 @@ #include "cesiuminterface.h" CesiumInterface::CesiumInterface(const MapSettings *settings, QObject *parent) : - m_czml(settings), - MapWebSocketServer(parent) + MapWebSocketServer(parent), + m_czml(settings) { } @@ -202,7 +202,8 @@ void CesiumInterface::removeAllCZMLEntities() void CesiumInterface::initCZML() { - czml(m_czml.init()); + QJsonObject obj = m_czml.init(); + czml(obj); } // Send and process CZML diff --git a/plugins/feature/map/czml.cpp b/plugins/feature/map/czml.cpp index 2ce94adaa..e4138e798 100644 --- a/plugins/feature/map/czml.cpp +++ b/plugins/feature/map/czml.cpp @@ -23,7 +23,7 @@ #include "util/units.h" -CZML::CZML(const MapSettings *settings, QObject *parent) : +CZML::CZML(const MapSettings *settings) : m_settings(settings) { } @@ -194,6 +194,8 @@ QQuaternion CZML::orientation(double longitude, double latitude, double altitude QJsonObject CZML::update(MapItem *mapItem, bool isTarget, bool isSelected) { + (void) isTarget; + // Don't currently use CLIP_TO_GROUND in Cesium due to Jitter bug // https://github.com/CesiumGS/cesium/issues/4049 // Instead we implement our own clipping code in map3d.html diff --git a/plugins/feature/map/czml.h b/plugins/feature/map/czml.h index f989b0191..6a3f5cd38 100644 --- a/plugins/feature/map/czml.h +++ b/plugins/feature/map/czml.h @@ -38,7 +38,7 @@ private: QHash m_hasMoved; public: - CZML(const MapSettings *settings, QObject *parent = nullptr); + CZML(const MapSettings *settings); QJsonObject init(); QJsonObject update(MapItem *mapItem, bool isTarget, bool isSelected); diff --git a/plugins/feature/map/mapmodel.cpp b/plugins/feature/map/mapmodel.cpp index d793bee86..2f79a54e3 100644 --- a/plugins/feature/map/mapmodel.cpp +++ b/plugins/feature/map/mapmodel.cpp @@ -264,6 +264,8 @@ void MapModel::update(const PipeEndPoint *sourcePipe, SWGSDRangel::SWGMapItem *s // Slot called on dataChanged signal, to update 3D map void MapModel::update3DMap(const QModelIndex &topLeft, const QModelIndex &bottomRight, const QVector &roles) { + (void) roles; + CesiumInterface *cesium = m_gui->cesium(); if (cesium) {