summaryrefslogtreecommitdiffstats
path: root/ui/qt/funnel_text_dialog.cpp
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-05 09:15:59 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-05 09:15:59 +0000
commit489b73a4c69e01167e693d7153f973105c613c30 (patch)
tree5d72d5ab3cf7dd8efa4e1733579d216d79c8ad66 /ui/qt/funnel_text_dialog.cpp
parentReleasing progress-linux version 4.2.5-2~progress7.99u1. (diff)
downloadwireshark-489b73a4c69e01167e693d7153f973105c613c30.tar.xz
wireshark-489b73a4c69e01167e693d7153f973105c613c30.zip
Merging upstream version 4.2.6.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--ui/qt/funnel_text_dialog.cpp18
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();