Silence warnings in DiveProfileItem

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Tomaz Canabrava 2016-03-08 02:22:58 -03:00 committed by Dirk Hohndel
parent dc6299185b
commit 16320bb580

View file

@ -56,6 +56,9 @@ void AbstractProfilePolygonItem::setModel(DivePlotDataModel *model)
void AbstractProfilePolygonItem::modelDataRemoved(const QModelIndex &parent, int from, int to) void AbstractProfilePolygonItem::modelDataRemoved(const QModelIndex &parent, int from, int to)
{ {
Q_UNUSED(from);
Q_UNUSED(parent);
Q_UNUSED(to);
setPolygon(QPolygonF()); setPolygon(QPolygonF());
qDeleteAll(texts); qDeleteAll(texts);
texts.clear(); texts.clear();
@ -94,8 +97,8 @@ bool AbstractProfilePolygonItem::shouldCalculateStuff(const QModelIndex &topLeft
void AbstractProfilePolygonItem::modelDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight) void AbstractProfilePolygonItem::modelDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight)
{ {
// We don't have enougth data to calculate things, quit. Q_UNUSED(topLeft);
Q_UNUSED(bottomRight);
// Calculate the polygon. This is the polygon that will be painted on screen // Calculate the polygon. This is the polygon that will be painted on screen
// on the ::paint method. Here we calculate the correct position of the points // on the ::paint method. Here we calculate the correct position of the points
// regarting our cartesian plane ( made by the hAxis and vAxis ), the QPolygonF // regarting our cartesian plane ( made by the hAxis and vAxis ), the QPolygonF
@ -340,6 +343,8 @@ void DiveHeartrateItem::createTextItem(int sec, int hr)
void DiveHeartrateItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) void DiveHeartrateItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
{ {
Q_UNUSED(option);
Q_UNUSED(widget);
if (polygon().isEmpty()) if (polygon().isEmpty())
return; return;
painter->save(); painter->save();
@ -386,6 +391,9 @@ void DivePercentageItem::modelDataChanged(const QModelIndex &topLeft, const QMod
void DivePercentageItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) void DivePercentageItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
{ {
Q_UNUSED(option);
Q_UNUSED(widget);
if (polygon().isEmpty()) if (polygon().isEmpty())
return; return;
painter->save(); painter->save();
@ -431,6 +439,9 @@ void DiveAmbPressureItem::modelDataChanged(const QModelIndex &topLeft, const QMo
void DiveAmbPressureItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) void DiveAmbPressureItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
{ {
Q_UNUSED(option);
Q_UNUSED(widget);
if (polygon().isEmpty()) if (polygon().isEmpty())
return; return;
painter->save(); painter->save();
@ -476,6 +487,9 @@ void DiveGFLineItem::modelDataChanged(const QModelIndex &topLeft, const QModelIn
void DiveGFLineItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) void DiveGFLineItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
{ {
Q_UNUSED(option);
Q_UNUSED(widget);
if (polygon().isEmpty()) if (polygon().isEmpty())
return; return;
painter->save(); painter->save();
@ -557,6 +571,9 @@ void DiveTemperatureItem::createTextItem(int sec, int mkelvin)
void DiveTemperatureItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) void DiveTemperatureItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
{ {
Q_UNUSED(option);
Q_UNUSED(widget);
if (polygon().isEmpty()) if (polygon().isEmpty())
return; return;
painter->save(); painter->save();
@ -601,6 +618,9 @@ void DiveMeanDepthItem::modelDataChanged(const QModelIndex &topLeft, const QMode
void DiveMeanDepthItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) void DiveMeanDepthItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
{ {
Q_UNUSED(option);
Q_UNUSED(widget);
if (polygon().isEmpty()) if (polygon().isEmpty())
return; return;
painter->save(); painter->save();
@ -767,6 +787,9 @@ void DiveGasPressureItem::plotGasValue(int mbar, int sec, struct gasmix gasmix,
void DiveGasPressureItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) void DiveGasPressureItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
{ {
Q_UNUSED(option);
Q_UNUSED(widget);
if (polygon().isEmpty()) if (polygon().isEmpty())
return; return;
QPen pen; QPen pen;
@ -940,6 +963,9 @@ void PartialPressureGasItem::modelDataChanged(const QModelIndex &topLeft, const
void PartialPressureGasItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) void PartialPressureGasItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
{ {
Q_UNUSED(option);
Q_UNUSED(widget);
const qreal pWidth = 0.0; const qreal pWidth = 0.0;
painter->save(); painter->save();
painter->setPen(QPen(normalColor, pWidth)); painter->setPen(QPen(normalColor, pWidth));