summaryrefslogtreecommitdiffstats
path: root/profile-widget
diff options
context:
space:
mode:
authorGravatar jan Iversen <jani@libreoffice.org>2018-05-21 18:20:29 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-05-21 12:48:04 -0700
commit065af62f59c2244cf0c80e54218692c95dd7c0cd (patch)
tree6daf067763e839d78f40b565a180d2c57242e3c5 /profile-widget
parentf92daa456ad343254a8fbde01660ae8160678fc4 (diff)
downloadsubsurface-065af62f59c2244cf0c80e54218692c95dd7c0cd.tar.gz
profile-widget: Change Q_UNUSED to no parameter name
C++ permits use of parameters without name, which signals unused Signed-off-by: Jan Iversen <jani@apache.org>
Diffstat (limited to 'profile-widget')
-rw-r--r--profile-widget/divecartesianaxis.cpp9
-rw-r--r--profile-widget/diveeventitem.cpp4
-rw-r--r--profile-widget/divepixmapitem.cpp6
-rw-r--r--profile-widget/diveprofileitem.cpp55
-rw-r--r--profile-widget/divetooltipitem.cpp3
-rw-r--r--profile-widget/profilewidget2.cpp8
-rw-r--r--profile-widget/tankitem.cpp4
7 files changed, 22 insertions, 67 deletions
diff --git a/profile-widget/divecartesianaxis.cpp b/profile-widget/divecartesianaxis.cpp
index e10e5112c..062ed78fc 100644
--- a/profile-widget/divecartesianaxis.cpp
+++ b/profile-widget/divecartesianaxis.cpp
@@ -99,9 +99,8 @@ void DiveCartesianAxis::setOrientation(Orientation o)
changed = true;
}
-QColor DiveCartesianAxis::colorForValue(double value)
+QColor DiveCartesianAxis::colorForValue(double)
{
- Q_UNUSED(value)
return QColor(Qt::black);
}
@@ -355,9 +354,8 @@ QString DepthAxis::textForValue(double value)
return get_depth_string(lrint(value), false, false);
}
-QColor DepthAxis::colorForValue(double value)
+QColor DepthAxis::colorForValue(double)
{
- Q_UNUSED(value);
return QColor(Qt::red);
}
@@ -384,9 +382,8 @@ TimeAxis::TimeAxis(ProfileWidget2 *widget) : DiveCartesianAxis(widget)
{
}
-QColor TimeAxis::colorForValue(double value)
+QColor TimeAxis::colorForValue(double)
{
- Q_UNUSED(value);
return QColor(Qt::blue);
}
diff --git a/profile-widget/diveeventitem.cpp b/profile-widget/diveeventitem.cpp
index b734f5b5e..ebb91b463 100644
--- a/profile-widget/diveeventitem.cpp
+++ b/profile-widget/diveeventitem.cpp
@@ -216,11 +216,9 @@ void DiveEventItem::setupToolTipString(struct gasmix *lastgasmix)
setToolTip(name);
}
-void DiveEventItem::eventVisibilityChanged(const QString &eventName, bool visible)
+void DiveEventItem::eventVisibilityChanged(const QString&, bool)
{
//WARN: lookslike we should implement this.
- Q_UNUSED(eventName);
- Q_UNUSED(visible);
}
bool DiveEventItem::shouldBeHidden()
diff --git a/profile-widget/divepixmapitem.cpp b/profile-widget/divepixmapitem.cpp
index 27fea611b..58d6f2776 100644
--- a/profile-widget/divepixmapitem.cpp
+++ b/profile-widget/divepixmapitem.cpp
@@ -82,9 +82,8 @@ void DivePictureItem::setPixmap(const QPixmap &pix)
boundingRect().height() - button->boundingRect().height() * 0.2);
}
-void DivePictureItem::hoverEnterEvent(QGraphicsSceneHoverEvent *event)
+void DivePictureItem::hoverEnterEvent(QGraphicsSceneHoverEvent*)
{
- Q_UNUSED(event);
Animations::scaleTo(this, 1.0);
setZValue(5);
@@ -98,9 +97,8 @@ void DivePictureItem::setFileUrl(const QString &s)
fileUrl = s;
}
-void DivePictureItem::hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
+void DivePictureItem::hoverLeaveEvent(QGraphicsSceneHoverEvent*)
{
- Q_UNUSED(event);
Animations::scaleTo(this, 0.2);
setZValue(0);
Animations::hide(button);
diff --git a/profile-widget/diveprofileitem.cpp b/profile-widget/diveprofileitem.cpp
index 90f78f9e1..9f648c2f0 100644
--- a/profile-widget/diveprofileitem.cpp
+++ b/profile-widget/diveprofileitem.cpp
@@ -52,11 +52,8 @@ void AbstractProfilePolygonItem::setModel(DivePlotDataModel *model)
modelDataChanged();
}
-void AbstractProfilePolygonItem::modelDataRemoved(const QModelIndex &parent, int from, int to)
+void AbstractProfilePolygonItem::modelDataRemoved(const QModelIndex&, int, int)
{
- Q_UNUSED(from);
- Q_UNUSED(parent);
- Q_UNUSED(to);
setPolygon(QPolygonF());
qDeleteAll(texts);
texts.clear();
@@ -93,10 +90,8 @@ bool AbstractProfilePolygonItem::shouldCalculateStuff(const QModelIndex &topLeft
return true;
}
-void AbstractProfilePolygonItem::modelDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight)
+void AbstractProfilePolygonItem::modelDataChanged(const QModelIndex&, const QModelIndex&)
{
- Q_UNUSED(topLeft);
- Q_UNUSED(bottomRight);
// 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
// regarting our cartesian plane ( made by the hAxis and vAxis ), the QPolygonF
@@ -121,15 +116,13 @@ DiveProfileItem::DiveProfileItem() : show_reported_ceiling(0), reported_ceiling_
connect(SettingsObjectWrapper::instance()->techDetails, &TechnicalDetailsSettings::redceilingChanged, this, &DiveProfileItem::settingsToggled);
}
-void DiveProfileItem::settingsToggled(bool toggled)
+void DiveProfileItem::settingsToggled(bool)
{
- Q_UNUSED(toggled);
settingsChanged();
}
void DiveProfileItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
{
- Q_UNUSED(widget);
if (polygon().isEmpty())
return;
@@ -342,10 +335,8 @@ void DiveHeartrateItem::createTextItem(int sec, int hr)
texts.append(text);
}
-void DiveHeartrateItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
+void DiveHeartrateItem::paint(QPainter *painter, const QStyleOptionGraphicsItem*, QWidget*)
{
- Q_UNUSED(option);
- Q_UNUSED(widget);
if (polygon().isEmpty())
return;
painter->save();
@@ -406,11 +397,8 @@ QColor DivePercentageItem::ColorScale(double value, int inert)
}
-void DivePercentageItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
+void DivePercentageItem::paint(QPainter *painter, const QStyleOptionGraphicsItem*, QWidget*)
{
- Q_UNUSED(option);
- Q_UNUSED(widget);
-
if (polygon().isEmpty())
return;
painter->save();
@@ -468,11 +456,8 @@ void DiveAmbPressureItem::modelDataChanged(const QModelIndex &topLeft, const QMo
texts.last()->setAlignment(Qt::AlignLeft | Qt::AlignBottom);
}
-void DiveAmbPressureItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
+void DiveAmbPressureItem::paint(QPainter *painter, const QStyleOptionGraphicsItem*, QWidget*)
{
- Q_UNUSED(option);
- Q_UNUSED(widget);
-
if (polygon().isEmpty())
return;
painter->save();
@@ -516,11 +501,8 @@ void DiveGFLineItem::modelDataChanged(const QModelIndex &topLeft, const QModelIn
texts.last()->setAlignment(Qt::AlignLeft | Qt::AlignBottom);
}
-void DiveGFLineItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
+void DiveGFLineItem::paint(QPainter *painter, const QStyleOptionGraphicsItem*, QWidget*)
{
- Q_UNUSED(option);
- Q_UNUSED(widget);
-
if (polygon().isEmpty())
return;
painter->save();
@@ -599,11 +581,8 @@ void DiveTemperatureItem::createTextItem(int sec, int mkelvin)
texts.append(text);
}
-void DiveTemperatureItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
+void DiveTemperatureItem::paint(QPainter *painter, const QStyleOptionGraphicsItem*, QWidget*)
{
- Q_UNUSED(option);
- Q_UNUSED(widget);
-
if (polygon().isEmpty())
return;
painter->save();
@@ -647,11 +626,8 @@ 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*, QWidget*)
{
- Q_UNUSED(option);
- Q_UNUSED(widget);
-
if (polygon().isEmpty())
return;
painter->save();
@@ -813,11 +789,8 @@ void DiveGasPressureItem::plotGasValue(int mbar, int sec, struct gasmix gasmix,
texts.push_back(text);
}
-void DiveGasPressureItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
+void DiveGasPressureItem::paint(QPainter *painter, const QStyleOptionGraphicsItem*, QWidget*)
{
- Q_UNUSED(option);
- Q_UNUSED(widget);
-
if (polygon().isEmpty())
return;
QPen pen;
@@ -892,9 +865,8 @@ DiveCalculatedTissue::DiveCalculatedTissue(ProfileWidget2 *widget) : DiveCalcula
connect(SettingsObjectWrapper::instance()->techDetails, &TechnicalDetailsSettings::calcceilingChanged, this, &DiveCalculatedTissue::setVisible);
}
-void DiveCalculatedTissue::setVisible(bool visible)
+void DiveCalculatedTissue::setVisible(bool)
{
- Q_UNUSED(visible);
settingsChanged();
}
@@ -1012,11 +984,8 @@ void PartialPressureGasItem::modelDataChanged(const QModelIndex &topLeft, const
*/
}
-void PartialPressureGasItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
+void PartialPressureGasItem::paint(QPainter *painter, const QStyleOptionGraphicsItem*, QWidget*)
{
- Q_UNUSED(option);
- Q_UNUSED(widget);
-
const qreal pWidth = 0.0;
painter->save();
painter->setPen(QPen(normalColor, pWidth));
diff --git a/profile-widget/divetooltipitem.cpp b/profile-widget/divetooltipitem.cpp
index f286ef9a6..09719c0ec 100644
--- a/profile-widget/divetooltipitem.cpp
+++ b/profile-widget/divetooltipitem.cpp
@@ -194,9 +194,8 @@ void ToolTipItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
}
}
-void ToolTipItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
+void ToolTipItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget*)
{
- Q_UNUSED(widget);
painter->save();
painter->setClipRect(option->rect);
painter->setPen(pen());
diff --git a/profile-widget/profilewidget2.cpp b/profile-widget/profilewidget2.cpp
index e8291e8e9..ad15b9162 100644
--- a/profile-widget/profilewidget2.cpp
+++ b/profile-widget/profilewidget2.cpp
@@ -815,9 +815,8 @@ void ProfileWidget2::dateTimeChanged()
emit dateTimeChangedItems();
}
-void ProfileWidget2::actionRequestedReplot(bool triggered)
+void ProfileWidget2::actionRequestedReplot(bool)
{
- Q_UNUSED(triggered);
settingsChanged();
}
@@ -1765,11 +1764,8 @@ void ProfileWidget2::disconnectTemporaryConnections()
}
#ifndef SUBSURFACE_MOBILE
-void ProfileWidget2::pointInserted(const QModelIndex &parent, int start, int end)
+void ProfileWidget2::pointInserted(const QModelIndex&, int, int)
{
- Q_UNUSED(parent)
- Q_UNUSED(start)
- Q_UNUSED(end)
DiveHandler *item = new DiveHandler();
scene()->addItem(item);
handles << item;
diff --git a/profile-widget/tankitem.cpp b/profile-widget/tankitem.cpp
index 2a8449827..22e5d3d21 100644
--- a/profile-widget/tankitem.cpp
+++ b/profile-widget/tankitem.cpp
@@ -82,10 +82,8 @@ void TankItem::createBar(qreal x, qreal w, struct gasmix *gas)
label->setZValue(101);
}
-void TankItem::modelDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight)
+void TankItem::modelDataChanged(const QModelIndex&, const QModelIndex&)
{
- Q_UNUSED(topLeft);
- Q_UNUSED(bottomRight);
// We don't have enougth data to calculate things, quit.
if (!dataModel || !pInfoEntry || !pInfoNr)
return;