Qt: Fix interface auto slot

The signal attached "currentIndexChanged" takes only int as argument,
the correct signal is "currentTextChanged". This also fixes a crash
whenever you changed the visible/nonvisible setting for an interface
This commit is contained in:
Roland Knall 2022-08-05 10:35:55 +02:00 committed by A Wireshark GitLab Utility
parent 74e0b506be
commit d24d27ebc1
2 changed files with 3 additions and 3 deletions

View File

@ -971,14 +971,14 @@ void InterfaceToolbar::interfaceListChanged()
if (!keep_selected)
{
// Select the first interface
on_interfacesComboBox_currentIndexChanged(ui->interfacesComboBox->currentText());
on_interfacesComboBox_currentTextChanged(ui->interfacesComboBox->currentText());
}
updateWidgets();
#endif
}
void InterfaceToolbar::on_interfacesComboBox_currentIndexChanged(const QString &ifname)
void InterfaceToolbar::on_interfacesComboBox_currentTextChanged(const QString &ifname)
{
foreach (int num, control_widget_.keys())
{

View File

@ -71,7 +71,7 @@ private slots:
void closeLog();
void on_interfacesComboBox_currentIndexChanged(const QString &ifname);
void on_interfacesComboBox_currentTextChanged(const QString &ifname);
private:
void initializeControls(const iface_toolbar *toolbar);