summaryrefslogtreecommitdiff
path: root/ui/qt/capture_interfaces_dialog.cpp
diff options
context:
space:
mode:
authorGerald Combs <gerald@zing.org>2016-06-05 11:58:19 -0700
committerGerald Combs <gerald@wireshark.org>2016-06-07 15:39:35 +0000
commit23d1fed59f20e813088252bac268df142fa96e80 (patch)
tree8cf37a628c7aadf4727d148e26f7875649451343 /ui/qt/capture_interfaces_dialog.cpp
parent767a59e54e6df17f7d8e2c6806ce16062d17e6d7 (diff)
downloadwireshark-23d1fed59f20e813088252bac268df142fa96e80.tar.gz
Qt: Fix "applicable" capture interface behavior.
In the Capture Interfaces dialog, make sure we have exactly one of a "not applicable" dash or a checkbox. Otherwise if your interface falsely reports that it supports monitor mode you might end up with both. Change-Id: I9b256f1ef0e8ff32626e7f2b526130f3c110d142 Reviewed-on: https://code.wireshark.org/review/15761 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'ui/qt/capture_interfaces_dialog.cpp')
-rw-r--r--ui/qt/capture_interfaces_dialog.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/ui/qt/capture_interfaces_dialog.cpp b/ui/qt/capture_interfaces_dialog.cpp
index 11b18b09d0..390e176528 100644
--- a/ui/qt/capture_interfaces_dialog.cpp
+++ b/ui/qt/capture_interfaces_dialog.cpp
@@ -131,7 +131,6 @@ public:
#ifdef HAVE_EXTCAP
if (device->if_info.type == IF_EXTCAP) {
/* extcap interfaces does not have this settings */
- setData(col_pmode_, Qt::CheckStateRole, QVariant());
setApplicable(col_pmode_, false);
setApplicable(col_snaplen_, false);
@@ -169,6 +168,7 @@ public:
if (applicable) {
setText(column, QString());
} else {
+ setData(column, Qt::CheckStateRole, QVariant());
palette.setCurrentColorGroup(QPalette::Disabled);
setText(column, UTF8_EM_DASH);
}
@@ -300,7 +300,6 @@ void CaptureInterfacesDialog::on_capturePromModeCheckBox_toggled(bool checked)
QString device_name = ti->data(col_interface_, Qt::UserRole).toString();
device = getDeviceByName(device_name);
if (!device) continue;
-// QString device_name = ui->interfaceTree->topLevelItem(row)->text(col_interface_);
device->pmode = checked;
ti->updateInterfaceColumns(device);
}