From af6b6d91a3e88d8908fe2ef070320a8f9a2e7a7d Mon Sep 17 00:00:00 2001 From: peabody124 Date: Tue, 21 Sep 2010 19:29:43 +0000 Subject: [PATCH] Ground: Suppressing some more random unused variable warnings git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1708 ebee16cc-31ac-478f-84a7-5cbb03baadba --- ground/src/libs/opmapcontrol/src/core/size.h | 2 +- .../internals/projections/lks94projection.cpp | 2 ++ .../projections/mercatorprojection.cpp | 2 ++ .../opmapcontrol/src/mapwidget/homeitem.cpp | 22 ++++++++++--------- .../src/mapwidget/mapgraphicitem.cpp | 4 +++- .../src/mapwidget/waypointitem.cpp | 2 ++ .../src/plugins/opmap/opmapgadgetwidget.cpp | 10 +++++++++ ground/src/plugins/scope/plotdata.cpp | 2 ++ .../plugins/scope/scopegadgetoptionspage.cpp | 3 +++ 9 files changed, 37 insertions(+), 12 deletions(-) diff --git a/ground/src/libs/opmapcontrol/src/core/size.h b/ground/src/libs/opmapcontrol/src/core/size.h index 8a075763c..da340b9a6 100644 --- a/ground/src/libs/opmapcontrol/src/core/size.h +++ b/ground/src/libs/opmapcontrol/src/core/size.h @@ -44,7 +44,7 @@ namespace core { Size operator+(const Size &sz1){return Size(sz1.width+width,sz1.height+height);} int GetHashCode(){return width^height;} - uint qHash(Size const& rect){return width^height;} + uint qHash(Size const& /*rect*/){return width^height;} QString ToString(){return "With="+QString::number(width)+" ,Height="+QString::number(height);} int Width()const {return width;} int Height()const {return height;} diff --git a/ground/src/libs/opmapcontrol/src/internals/projections/lks94projection.cpp b/ground/src/libs/opmapcontrol/src/internals/projections/lks94projection.cpp index 6a299d6fb..f476ba2f1 100644 --- a/ground/src/libs/opmapcontrol/src/internals/projections/lks94projection.cpp +++ b/ground/src/libs/opmapcontrol/src/internals/projections/lks94projection.cpp @@ -616,6 +616,8 @@ double LKS94Projection::GetTileMatrixResolution(int const& zoom) } double LKS94Projection::GetGroundResolution(int const& zoom, double const& latitude) { + Q_UNUSED(zoom); + Q_UNUSED(latitude); return GetTileMatrixResolution(zoom); } Size LKS94Projection::GetTileMatrixMinXY(int const& zoom) diff --git a/ground/src/libs/opmapcontrol/src/internals/projections/mercatorprojection.cpp b/ground/src/libs/opmapcontrol/src/internals/projections/mercatorprojection.cpp index 3d195aea6..30b94d2e4 100644 --- a/ground/src/libs/opmapcontrol/src/internals/projections/mercatorprojection.cpp +++ b/ground/src/libs/opmapcontrol/src/internals/projections/mercatorprojection.cpp @@ -86,11 +86,13 @@ double MercatorProjection::Flattening() const } Size MercatorProjection::GetTileMatrixMaxXY(const int &zoom) { + Q_UNUSED(zoom); int xy = (1 << zoom); return Size(xy - 1, xy - 1); } Size MercatorProjection::GetTileMatrixMinXY(const int &zoom) { + Q_UNUSED(zoom); return Size(0, 0); } } diff --git a/ground/src/libs/opmapcontrol/src/mapwidget/homeitem.cpp b/ground/src/libs/opmapcontrol/src/mapwidget/homeitem.cpp index 9f76c8c52..9d59448c3 100644 --- a/ground/src/libs/opmapcontrol/src/mapwidget/homeitem.cpp +++ b/ground/src/libs/opmapcontrol/src/mapwidget/homeitem.cpp @@ -40,16 +40,18 @@ namespace mapcontrol void HomeItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) { - painter->drawPixmap(-pic.width()/2,-pic.height()/2,pic); - if(showsafearea) - { - if(safe) - painter->setPen(Qt::green); - else - painter->setPen(Qt::red); - painter->drawEllipse(QPointF(0,0),localsafearea,localsafearea); - // painter->drawRect(QRectF(-localsafearea,-localsafearea,localsafearea*2,localsafearea*2)); - } + Q_UNUSED(option); + Q_UNUSED(widget); + painter->drawPixmap(-pic.width()/2,-pic.height()/2,pic); + if(showsafearea) + { + if(safe) + painter->setPen(Qt::green); + else + painter->setPen(Qt::red); + painter->drawEllipse(QPointF(0,0),localsafearea,localsafearea); + // painter->drawRect(QRectF(-localsafearea,-localsafearea,localsafearea*2,localsafearea*2)); + } } QRectF HomeItem::boundingRect()const diff --git a/ground/src/libs/opmapcontrol/src/mapwidget/mapgraphicitem.cpp b/ground/src/libs/opmapcontrol/src/mapwidget/mapgraphicitem.cpp index 5479da400..444789b74 100644 --- a/ground/src/libs/opmapcontrol/src/mapwidget/mapgraphicitem.cpp +++ b/ground/src/libs/opmapcontrol/src/mapwidget/mapgraphicitem.cpp @@ -51,7 +51,7 @@ namespace mapcontrol void MapGraphicItem::resize(const QRectF &rect) { - + Q_UNUSED(rect); { this->prepareGeometryChange(); maprect=boundingBox(scene()->sceneRect(),rotation); @@ -143,6 +143,8 @@ namespace mapcontrol } void MapGraphicItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) { + Q_UNUSED(option); + Q_UNUSED(widget); if(MapRenderTransform!=1) { diff --git a/ground/src/libs/opmapcontrol/src/mapwidget/waypointitem.cpp b/ground/src/libs/opmapcontrol/src/mapwidget/waypointitem.cpp index 3b278cc52..a4814de7c 100644 --- a/ground/src/libs/opmapcontrol/src/mapwidget/waypointitem.cpp +++ b/ground/src/libs/opmapcontrol/src/mapwidget/waypointitem.cpp @@ -66,6 +66,8 @@ namespace mapcontrol } void WayPointItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) { + Q_UNUSED(option); + Q_UNUSED(widget); painter->drawPixmap(-picture.width()/2,-picture.height(),picture); if(this->isSelected()) painter->drawRect(QRectF(-picture.width()/2,-picture.height(),picture.width()-1,picture.height()-1)); diff --git a/ground/src/plugins/opmap/opmapgadgetwidget.cpp b/ground/src/plugins/opmap/opmapgadgetwidget.cpp index 48c40f8c6..4e536c146 100644 --- a/ground/src/plugins/opmap/opmapgadgetwidget.cpp +++ b/ground/src/plugins/opmap/opmapgadgetwidget.cpp @@ -616,31 +616,41 @@ void OPMapGadgetWidget::OnMapZoomChanged() void OPMapGadgetWidget::OnMapTypeChanged(MapType::Types type) { + Q_UNUSED(type); // to do } void OPMapGadgetWidget::OnEmptyTileError(int zoom, core::Point pos) { + Q_UNUSED(zoom); + Q_UNUSED(pos); // to do } void OPMapGadgetWidget::WPNumberChanged(int const &oldnumber, int const &newnumber, WayPointItem *waypoint) { + Q_UNUSED(oldnumber); + Q_UNUSED(newnumber); + Q_UNUSED(waypoint); // to do } void OPMapGadgetWidget::WPValuesChanged(WayPointItem *waypoint) { + Q_UNUSED(waypoint); // to do } void OPMapGadgetWidget::WPInserted(int const &number, WayPointItem *waypoint) { + Q_UNUSED(number); + Q_UNUSED(waypoint); // to do } void OPMapGadgetWidget::WPDeleted(int const &number) { + Q_UNUSED(number); // to do } diff --git a/ground/src/plugins/scope/plotdata.cpp b/ground/src/plugins/scope/plotdata.cpp index 08508c468..f2d4bb5af 100644 --- a/ground/src/plugins/scope/plotdata.cpp +++ b/ground/src/plugins/scope/plotdata.cpp @@ -60,6 +60,7 @@ PlotData::PlotData(QString p_uavObject, QString p_uavField) double PlotData::valueAsDouble(UAVObject* obj, UAVObjectField* field) { + Q_UNUSED(obj); QVariant value; if(haveSubField){ @@ -166,5 +167,6 @@ void ChronoPlotData::removeStaleDataTimeout() bool UAVObjectPlotData::append(UAVObject* obj) { + Q_UNUSED(obj); return false; } diff --git a/ground/src/plugins/scope/scopegadgetoptionspage.cpp b/ground/src/plugins/scope/scopegadgetoptionspage.cpp index 29b4d5a74..abaf85c5e 100644 --- a/ground/src/plugins/scope/scopegadgetoptionspage.cpp +++ b/ground/src/plugins/scope/scopegadgetoptionspage.cpp @@ -45,6 +45,8 @@ ScopeGadgetOptionsPage::ScopeGadgetOptionsPage(ScopeGadgetConfiguration *config, //creates options page widget (uses the UI file) QWidget* ScopeGadgetOptionsPage::createPage(QWidget *parent) { + Q_UNUSED(parent); + options_page = new Ui::ScopeGadgetOptionsPage(); //main widget QWidget *optionsPageWidget = new QWidget; @@ -304,5 +306,6 @@ void ScopeGadgetOptionsPage::finish() */ void ScopeGadgetOptionsPage::on_lstCurves_currentRowChanged(int currentRow) { + Q_UNUSED(currentRow); setYAxisWidgetFromPlotCurve(); }