summaryrefslogtreecommitdiff
path: root/ui/qt/interface_tree_model.cpp
diff options
context:
space:
mode:
authorJoerg Mayer <jmayer@loplof.de>2016-10-17 07:32:00 +0200
committerJörg Mayer <jmayer@loplof.de>2016-10-17 05:37:29 +0000
commit4ff7799be8ff1995261717ca18d5cf21bee7ab52 (patch)
tree4113b4c51fc3684a04ad9b85df86acf5e08e1f24 /ui/qt/interface_tree_model.cpp
parente552b319b5ffaa3652fa798cfd9db8771c20ba66 (diff)
downloadwireshark-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>
Diffstat (limited to 'ui/qt/interface_tree_model.cpp')
-rw-r--r--ui/qt/interface_tree_model.cpp11
1 files changed, 4 insertions, 7 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();
}