From aa100e0726dcade27a59f7962c465cfb7e61e284 Mon Sep 17 00:00:00 2001 From: Gerald Combs Date: Fri, 28 Aug 2015 12:57:57 -0700 Subject: Don't show a progress frame if our file was closed. Change-Id: Ie363f6764f4e8b2b5c476b85f7ddb0233a127f6e Reviewed-on: https://code.wireshark.org/review/10290 Petri-Dish: Gerald Combs Tested-by: Petri Dish Buildbot Reviewed-by: Gerald Combs --- ui/qt/progress_frame.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'ui/qt/progress_frame.cpp') diff --git a/ui/qt/progress_frame.cpp b/ui/qt/progress_frame.cpp index fd24ff3313..8c9576ae0a 100644 --- a/ui/qt/progress_frame.cpp +++ b/ui/qt/progress_frame.cpp @@ -211,6 +211,18 @@ void ProgressFrame::addToButtonBox(QDialogButtonBox *button_box, QObject *main_w main_progress_frame, SIGNAL(stopLoading())); } +void ProgressFrame::captureFileClosing() +{ + // Hide any paired ProgressFrames and disconnect from them. + emit setHidden(); + disconnect(SIGNAL(showRequested(bool,bool,gboolean*))); + disconnect(SIGNAL(maximumValueChanged(int))); + disconnect(SIGNAL(valueChanged(int))); + + connect(this, SIGNAL(showRequested(bool,bool,gboolean*)), + this, SLOT(show(bool,bool,gboolean*))); +} + void ProgressFrame::setValue(int value) { ui->progressBar->setValue(value); -- cgit v1.2.3