From 4ff7799be8ff1995261717ca18d5cf21bee7ab52 Mon Sep 17 00:00:00 2001 From: Joerg Mayer Date: Mon, 17 Oct 2016 07:32:00 +0200 Subject: Some get rid of the remaining trivial Q_UNUSED cases. Fix the placement of Q_UNUSED inside #ifdef MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I015ff87fcb300a701bf8ccb42bd85e3068a08138 Reviewed-on: https://code.wireshark.org/review/18228 Reviewed-by: Jörg Mayer --- ui/qt/interface_tree_model.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'ui/qt/interface_tree_model.cpp') 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(); } -- cgit v1.2.1