diff options
author | Joerg Mayer <jmayer@loplof.de> | 2016-10-17 07:32:00 +0200 |
---|---|---|
committer | Jörg Mayer <jmayer@loplof.de> | 2016-10-17 05:37:29 +0000 |
commit | 4ff7799be8ff1995261717ca18d5cf21bee7ab52 (patch) | |
tree | 4113b4c51fc3684a04ad9b85df86acf5e08e1f24 | |
parent | e552b319b5ffaa3652fa798cfd9db8771c20ba66 (diff) | |
download | wireshark-4ff7799be8ff1995261717ca18d5cf21bee7ab52.tar.gz |
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>
-rw-r--r-- | ui/qt/interface_tree_model.cpp | 11 | ||||
-rw-r--r-- | ui/qt/qcustomplot.h | 14 |
2 files changed, 11 insertions, 14 deletions
diff --git a/ui/qt/interface_tree_model.cpp b/ui/qt/interface_tree_model.cpp index 4eb20f9472..7682362f25 100644 --- a/ui/qt/interface_tree_model.cpp +++ b/ui/qt/interface_tree_model.cpp @@ -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(); } diff --git a/ui/qt/qcustomplot.h b/ui/qt/qcustomplot.h index 47b3cc2e93..1d718d0d3a 100644 --- a/ui/qt/qcustomplot.h +++ b/ui/qt/qcustomplot.h @@ -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: |