diff options
author | Joerg Mayer <jmayer@loplof.de> | 2017-09-16 18:35:01 +0400 |
---|---|---|
committer | Jörg Mayer <jmayer@loplof.de> | 2017-09-16 15:06:12 +0000 |
commit | b93ef37da21699336273e846651dd4e7c499f4dc (patch) | |
tree | 9536bddadc155815a877bc4851f631c8ce4ce911 /ui | |
parent | be995cc12075e3ecbc3aeb2356835df8c75a220b (diff) |
_U_ is wrong in c++, as is Q_UNUSED (in most cases).
The correct way is to not name the variable.
interface_tree_cache_model.cpp is one of the exceptions: Use Q_UNUSED in a conditional compile, instead of unconditionally.
Change-Id: If561e632a3a60d2424f454202f233e9a63926e78
Reviewed-on: https://code.wireshark.org/review/23570
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
Diffstat (limited to 'ui')
-rw-r--r-- | ui/qt/models/interface_tree_cache_model.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/ui/qt/models/interface_tree_cache_model.cpp b/ui/qt/models/interface_tree_cache_model.cpp index fea9020066..193bb1d5ba 100644 --- a/ui/qt/models/interface_tree_cache_model.cpp +++ b/ui/qt/models/interface_tree_cache_model.cpp @@ -345,9 +345,9 @@ const interface_t * InterfaceTreeCacheModel::lookup(const QModelIndex &index) co * other method.*/ bool InterfaceTreeCacheModel::isAllowedToBeEdited(const QModelIndex &index) const { - Q_UNUSED(index) - -#ifdef HAVE_LIBPCAP +#ifndef HAVE_LIBPCAP + Q_UNUSED index; +#else const interface_t * device = lookup(index); if ( device == 0 ) return false; @@ -373,9 +373,9 @@ bool InterfaceTreeCacheModel::isAllowedToBeEdited(const QModelIndex &index) cons // Whether this field is available for modification and display. bool InterfaceTreeCacheModel::isAvailableField(const QModelIndex &index) const { - Q_UNUSED(index) - -#ifdef HAVE_LIBPCAP +#ifndef HAVE_LIBPCAP + Q_UNUSED index; +#else const interface_t * device = lookup(index); if ( device == 0 ) |