checkAPIs.pl: Avoid false positive in header

This avoids the text index being identified as shadow variable

Bug:12956
Change-Id: I5565c5807e2c7d317d6849deeba9edd63c069397
Reviewed-on: https://code.wireshark.org/review/17953
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
This commit is contained in:
Roland Knall 2016-09-27 18:55:08 +02:00 committed by Graham Bloice
parent e302f5ef6b
commit f8b32e5b4e
2 changed files with 8 additions and 8 deletions

View File

@ -282,9 +282,9 @@ CaptureInterfacesDialog::~CaptureInterfacesDialog()
delete ui;
}
void CaptureInterfacesDialog::setTab(int index)
void CaptureInterfacesDialog::setTab(int idx)
{
ui->tabWidget->setCurrentIndex(index);
ui->tabWidget->setCurrentIndex(idx);
}
void CaptureInterfacesDialog::on_capturePromModeCheckBox_toggled(bool checked)
@ -1097,7 +1097,7 @@ InterfaceTreeDelegate::~InterfaceTreeDelegate()
}
QWidget* InterfaceTreeDelegate::createEditor(QWidget *parent, const QStyleOptionViewItem &, const QModelIndex &index) const
QWidget* InterfaceTreeDelegate::createEditor(QWidget *parent, const QStyleOptionViewItem &, const QModelIndex &idx) const
{
QWidget *w = NULL;
#ifdef SHOW_BUFFER_COLUMN
@ -1106,8 +1106,8 @@ QWidget* InterfaceTreeDelegate::createEditor(QWidget *parent, const QStyleOption
guint snap = WTAP_MAX_PACKET_SIZE;
GList *links = NULL;
if (index.column() > 1 && index.data().toString().compare(UTF8_EM_DASH)) {
QTreeWidgetItem *ti = tree_->topLevelItem(index.row());
if (idx.column() > 1 && idx.data().toString().compare(UTF8_EM_DASH)) {
QTreeWidgetItem *ti = tree_->topLevelItem(idx.row());
QString interface_name = ti->text(col_interface_);
interface_t *device = find_device_by_if_name(interface_name);
@ -1118,7 +1118,7 @@ QWidget* InterfaceTreeDelegate::createEditor(QWidget *parent, const QStyleOption
snap = device->snaplen;
links = device->links;
}
switch (index.column()) {
switch (idx.column()) {
case col_interface_:
case col_traffic_:
break;

View File

@ -51,7 +51,7 @@ public:
InterfaceTreeDelegate(QObject *parent = 0);
~InterfaceTreeDelegate();
QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const;
QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &idx) const;
void setTree(QTreeWidget* tree) { tree_ = tree; }
bool eventFilter(QObject *object, QEvent *event);
@ -72,7 +72,7 @@ public:
explicit CaptureInterfacesDialog(QWidget *parent = 0);
~CaptureInterfacesDialog();
void setTab(int index);
void setTab(int idx);
void updateInterfaces();
protected: