Wireshark-bugs: [Wireshark-bugs] [Bug 10965] Can't change the default capture interface in Qt ve

Date: Thu, 09 Jul 2015 13:43:21 +0000

changed bug 10965


What Removed Added
CC   [email protected]

Comment # 6 on bug 10965 from
Here is what happening.

In CapturePreferencesFrame::updateWidgets() the method
ui->defaultInterfaceComboBox->addItem() is called in a for() loop to populate
the list of possible drop-down items in the QtComboBox.  The first call to
addItem(), (but not the others) triggers the 
CapturePreferencesFrame::on_defaultInterfaceComboBox_editTextChanged() method
which ends up initializing the default name to the first item added to
QtComboBox list.

One (tested) proposed solution is the attached patch
(ui-default-capture-device.patch) which saves and then uses the initial value
of stashed capture device name in setEditText().

An untested fix might be to simply move the existing code snippet:

>     if (pref_device_->stashed_val.string) {
>         ui->defaultInterfaceComboBox->setEditText(pref_device_->stashed_val.string);
>     } else {
>         ui->defaultInterfaceComboBox->clearEditText();
>     }

towards the top of updateWidgets() immediately after the call to
ui->defaultInterfaceComboBox->clear().

NOTE: I am unable to push the attached patch to gerrit nor test the proposed
simplification until tomorrow.


You are receiving this mail because:
  • You are watching all bug changes.