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>
This commit is contained in:
jan Iversen 2018-05-21 18:20:29 +02:00 committed by Dirk Hohndel
parent f92daa456a
commit 065af62f59
7 changed files with 22 additions and 67 deletions

View file

@ -99,9 +99,8 @@ void DiveCartesianAxis::setOrientation(Orientation o)
changed = true; changed = true;
} }
QColor DiveCartesianAxis::colorForValue(double value) QColor DiveCartesianAxis::colorForValue(double)
{ {
Q_UNUSED(value)
return QColor(Qt::black); return QColor(Qt::black);
} }
@ -355,9 +354,8 @@ QString DepthAxis::textForValue(double value)
return get_depth_string(lrint(value), false, false); return get_depth_string(lrint(value), false, false);
} }
QColor DepthAxis::colorForValue(double value) QColor DepthAxis::colorForValue(double)
{ {
Q_UNUSED(value);
return QColor(Qt::red); 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); return QColor(Qt::blue);
} }

View file

@ -216,11 +216,9 @@ void DiveEventItem::setupToolTipString(struct gasmix *lastgasmix)
setToolTip(name); setToolTip(name);
} }
void DiveEventItem::eventVisibilityChanged(const QString &eventName, bool visible) void DiveEventItem::eventVisibilityChanged(const QString&, bool)
{ {
//WARN: lookslike we should implement this. //WARN: lookslike we should implement this.
Q_UNUSED(eventName);
Q_UNUSED(visible);
} }
bool DiveEventItem::shouldBeHidden() bool DiveEventItem::shouldBeHidden()

View file

@ -82,9 +82,8 @@ void DivePictureItem::setPixmap(const QPixmap &pix)
boundingRect().height() - button->boundingRect().height() * 0.2); boundingRect().height() - button->boundingRect().height() * 0.2);
} }
void DivePictureItem::hoverEnterEvent(QGraphicsSceneHoverEvent *event) void DivePictureItem::hoverEnterEvent(QGraphicsSceneHoverEvent*)
{ {
Q_UNUSED(event);
Animations::scaleTo(this, 1.0); Animations::scaleTo(this, 1.0);
setZValue(5); setZValue(5);
@ -98,9 +97,8 @@ void DivePictureItem::setFileUrl(const QString &s)
fileUrl = s; fileUrl = s;
} }
void DivePictureItem::hoverLeaveEvent(QGraphicsSceneHoverEvent *event) void DivePictureItem::hoverLeaveEvent(QGraphicsSceneHoverEvent*)
{ {
Q_UNUSED(event);
Animations::scaleTo(this, 0.2); Animations::scaleTo(this, 0.2);
setZValue(0); setZValue(0);
Animations::hide(button); Animations::hide(button);

View file

@ -52,11 +52,8 @@ void AbstractProfilePolygonItem::setModel(DivePlotDataModel *model)
modelDataChanged(); 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()); setPolygon(QPolygonF());
qDeleteAll(texts); qDeleteAll(texts);
texts.clear(); texts.clear();
@ -93,10 +90,8 @@ bool AbstractProfilePolygonItem::shouldCalculateStuff(const QModelIndex &topLeft
return true; 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 // 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
@ -121,15 +116,13 @@ DiveProfileItem::DiveProfileItem() : show_reported_ceiling(0), reported_ceiling_
connect(SettingsObjectWrapper::instance()->techDetails, &TechnicalDetailsSettings::redceilingChanged, this, &DiveProfileItem::settingsToggled); connect(SettingsObjectWrapper::instance()->techDetails, &TechnicalDetailsSettings::redceilingChanged, this, &DiveProfileItem::settingsToggled);
} }
void DiveProfileItem::settingsToggled(bool toggled) void DiveProfileItem::settingsToggled(bool)
{ {
Q_UNUSED(toggled);
settingsChanged(); settingsChanged();
} }
void DiveProfileItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) void DiveProfileItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
{ {
Q_UNUSED(widget);
if (polygon().isEmpty()) if (polygon().isEmpty())
return; return;
@ -342,10 +335,8 @@ void DiveHeartrateItem::createTextItem(int sec, int hr)
texts.append(text); 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()) if (polygon().isEmpty())
return; return;
painter->save(); 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()) if (polygon().isEmpty())
return; return;
painter->save(); painter->save();
@ -468,11 +456,8 @@ void DiveAmbPressureItem::modelDataChanged(const QModelIndex &topLeft, const QMo
texts.last()->setAlignment(Qt::AlignLeft | Qt::AlignBottom); 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()) if (polygon().isEmpty())
return; return;
painter->save(); painter->save();
@ -516,11 +501,8 @@ void DiveGFLineItem::modelDataChanged(const QModelIndex &topLeft, const QModelIn
texts.last()->setAlignment(Qt::AlignLeft | Qt::AlignBottom); 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()) if (polygon().isEmpty())
return; return;
painter->save(); painter->save();
@ -599,11 +581,8 @@ void DiveTemperatureItem::createTextItem(int sec, int mkelvin)
texts.append(text); 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()) if (polygon().isEmpty())
return; return;
painter->save(); 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()) if (polygon().isEmpty())
return; return;
painter->save(); painter->save();
@ -813,11 +789,8 @@ void DiveGasPressureItem::plotGasValue(int mbar, int sec, struct gasmix gasmix,
texts.push_back(text); 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()) if (polygon().isEmpty())
return; return;
QPen pen; QPen pen;
@ -892,9 +865,8 @@ DiveCalculatedTissue::DiveCalculatedTissue(ProfileWidget2 *widget) : DiveCalcula
connect(SettingsObjectWrapper::instance()->techDetails, &TechnicalDetailsSettings::calcceilingChanged, this, &DiveCalculatedTissue::setVisible); connect(SettingsObjectWrapper::instance()->techDetails, &TechnicalDetailsSettings::calcceilingChanged, this, &DiveCalculatedTissue::setVisible);
} }
void DiveCalculatedTissue::setVisible(bool visible) void DiveCalculatedTissue::setVisible(bool)
{ {
Q_UNUSED(visible);
settingsChanged(); 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; const qreal pWidth = 0.0;
painter->save(); painter->save();
painter->setPen(QPen(normalColor, pWidth)); painter->setPen(QPen(normalColor, pWidth));

View file

@ -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->save();
painter->setClipRect(option->rect); painter->setClipRect(option->rect);
painter->setPen(pen()); painter->setPen(pen());

View file

@ -815,9 +815,8 @@ void ProfileWidget2::dateTimeChanged()
emit dateTimeChangedItems(); emit dateTimeChangedItems();
} }
void ProfileWidget2::actionRequestedReplot(bool triggered) void ProfileWidget2::actionRequestedReplot(bool)
{ {
Q_UNUSED(triggered);
settingsChanged(); settingsChanged();
} }
@ -1765,11 +1764,8 @@ void ProfileWidget2::disconnectTemporaryConnections()
} }
#ifndef SUBSURFACE_MOBILE #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(); DiveHandler *item = new DiveHandler();
scene()->addItem(item); scene()->addItem(item);
handles << item; handles << item;

View file

@ -82,10 +82,8 @@ void TankItem::createBar(qreal x, qreal w, struct gasmix *gas)
label->setZValue(101); 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. // We don't have enougth data to calculate things, quit.
if (!dataModel || !pInfoEntry || !pInfoNr) if (!dataModel || !pInfoEntry || !pInfoNr)
return; return;