mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
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:
parent
f92daa456a
commit
065af62f59
7 changed files with 22 additions and 67 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue