Some get rid of the remaining trivial Q_UNUSED cases.

Fix the placement of Q_UNUSED inside #ifdef

Change-Id: I015ff87fcb300a701bf8ccb42bd85e3068a08138
Reviewed-on: https://code.wireshark.org/review/18228
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
This commit is contained in:
Joerg Mayer 2016-10-17 07:32:00 +02:00 committed by Jörg Mayer
parent e552b319b5
commit 4ff7799be8
2 changed files with 11 additions and 14 deletions

View File

@ -88,10 +88,8 @@ QString InterfaceTreeModel::interfaceError()
return errorText;
}
int InterfaceTreeModel::rowCount(const QModelIndex & parent) const
int InterfaceTreeModel::rowCount(const QModelIndex & ) const
{
Q_UNUSED(parent);
#ifdef HAVE_LIBPCAP
return (global_capture_opts.all_ifaces ? global_capture_opts.all_ifaces->len : 0);
#else
@ -100,10 +98,8 @@ int InterfaceTreeModel::rowCount(const QModelIndex & parent) const
#endif
}
int InterfaceTreeModel::columnCount(const QModelIndex & parent) const
int InterfaceTreeModel::columnCount(const QModelIndex & ) const
{
Q_UNUSED(parent);
/* IFTREE_COL_MAX is not being displayed, it is the definition for the maximum numbers of columns */
return ((int) IFTREE_COL_MAX);
}
@ -187,9 +183,10 @@ QVariant InterfaceTreeModel::data(const QModelIndex &index, int role) const
{
return toolTipForInterface(row);
}
#endif
#else
Q_UNUSED(index);
Q_UNUSED(role);
#endif
return QVariant();
}

View File

@ -698,15 +698,15 @@ protected:
// introduced virtual methods:
virtual int calculateAutoMargin(QCP::MarginSide side);
// events:
virtual void mousePressEvent(QMouseEvent *event) {Q_UNUSED(event)}
virtual void mouseMoveEvent(QMouseEvent *event) {Q_UNUSED(event)}
virtual void mouseReleaseEvent(QMouseEvent *event) {Q_UNUSED(event)}
virtual void mouseDoubleClickEvent(QMouseEvent *event) {Q_UNUSED(event)}
virtual void wheelEvent(QWheelEvent *event) {Q_UNUSED(event)}
virtual void mousePressEvent(QMouseEvent * ) { }
virtual void mouseMoveEvent(QMouseEvent * ) { }
virtual void mouseReleaseEvent(QMouseEvent * ) { }
virtual void mouseDoubleClickEvent(QMouseEvent * ) { }
virtual void wheelEvent(QWheelEvent * ) { }
// reimplemented virtual methods:
virtual void applyDefaultAntialiasingHint(QCPPainter *painter) const { Q_UNUSED(painter) }
virtual void draw(QCPPainter *painter) { Q_UNUSED(painter) }
virtual void applyDefaultAntialiasingHint(QCPPainter * ) const { }
virtual void draw(QCPPainter * ) { }
virtual void parentPlotInitialized(QCustomPlot *parentPlot);
private: