From 4e236e66c9f7add5dbe7106f5445b410d0f9c148 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stig=20Bj=C3=B8rlykke?= Date: Sat, 29 Aug 2015 22:59:00 +0200 Subject: Qt/Lua: Call atclose when TextWindow closes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The close callback was never called because the destructor was never called. Change-Id: I9f6204858bc5d5e48d0aedc90b0e242ab70e161c Reviewed-on: https://code.wireshark.org/review/10321 Reviewed-by: Stig Bjørlykke --- ui/qt/funnel_text_dialog.cpp | 8 ++++++++ ui/qt/funnel_text_dialog.h | 2 ++ 2 files changed, 10 insertions(+) (limited to 'ui/qt') diff --git a/ui/qt/funnel_text_dialog.cpp b/ui/qt/funnel_text_dialog.cpp index 07477facc3..0cf9a311bc 100644 --- a/ui/qt/funnel_text_dialog.cpp +++ b/ui/qt/funnel_text_dialog.cpp @@ -55,10 +55,18 @@ FunnelTextDialog::FunnelTextDialog() : FunnelTextDialog::~FunnelTextDialog() { delete ui; +} + +void FunnelTextDialog::reject() +{ + QDialog::reject(); if (close_cb_) { close_cb_(close_cb_data_); } + + disconnect(); + deleteLater(); } struct _funnel_text_window_t *FunnelTextDialog::textWindowNew(const QString title) diff --git a/ui/qt/funnel_text_dialog.h b/ui/qt/funnel_text_dialog.h index 0ee9be5edf..4e74142d08 100644 --- a/ui/qt/funnel_text_dialog.h +++ b/ui/qt/funnel_text_dialog.h @@ -45,6 +45,8 @@ public: explicit FunnelTextDialog(); ~FunnelTextDialog(); + void reject(); + // Funnel ops static struct _funnel_text_window_t *textWindowNew(const QString title); void setText(const QString text); -- cgit v1.2.3