diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-08-05 09:15:52 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-08-05 09:15:52 +0000 |
commit | 864dec30a3971aa043dd47f99168c889a5107102 (patch) | |
tree | dd322ea42bd05d24614f2f22afc75bc49cbb0b34 /ui/qt/funnel_text_dialog.cpp | |
parent | Adding upstream version 4.2.5. (diff) | |
download | wireshark-upstream/4.2.6.tar.xz wireshark-upstream/4.2.6.zip |
Adding upstream version 4.2.6.upstream/4.2.6
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'ui/qt/funnel_text_dialog.cpp')
-rw-r--r-- | ui/qt/funnel_text_dialog.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/ui/qt/funnel_text_dialog.cpp b/ui/qt/funnel_text_dialog.cpp index 84bbb941..ad18cf76 100644 --- a/ui/qt/funnel_text_dialog.cpp +++ b/ui/qt/funnel_text_dialog.cpp @@ -57,17 +57,17 @@ void FunnelTextDialog::reject() close_cb_(close_cb_data_); } - QHash<QObject *, funnel_bt_t*>::iterator i; - for (i = text_button_to_funnel_button_.begin(); i != text_button_to_funnel_button_.end(); ++i) { - funnel_bt_t *funnel_button = i.value(); - if (funnel_button->free_data_fcn) { - funnel_button->free_data_fcn(funnel_button->data); - } - if (funnel_button->free_fcn) { - funnel_button->free_fcn(funnel_button); + for (const auto& button : ui->buttonBox->buttons()) { + funnel_bt_t *funnel_button = text_button_to_funnel_button_.take(qobject_cast<QObject*>(button)); + if (funnel_button != nullptr) { + if (funnel_button->free_data_fcn) { + funnel_button->free_data_fcn(funnel_button->data); + } + if (funnel_button->free_fcn) { + funnel_button->free_fcn(funnel_button); + } } } - text_button_to_funnel_button_.clear(); disconnect(); deleteLater(); |