diff options
author | Gerald Combs <gerald@wireshark.org> | 2016-07-19 09:26:24 -0700 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2016-07-19 20:17:18 +0000 |
commit | 83174a207994c5d30c24e7907fffdc3644a52557 (patch) | |
tree | 2899efe753446e072a9e03994860d03b9f19b8e9 /ui | |
parent | 11387e205f04cbd8dda30d037ec6627fd6caf2c0 (diff) |
Qt: Fix Windows taskbar progress behavior.
Connect the valueChanged signal each time we show the taskbar progress
indicator and disconnect it each time we hide. Fixes stuck behavior seen
here when reloading a capture.
Change-Id: I11c6205675823e041cda7816237e54fa8a8afb7a
Reviewed-on: https://code.wireshark.org/review/16544
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'ui')
-rw-r--r-- | ui/qt/progress_frame.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ui/qt/progress_frame.cpp b/ui/qt/progress_frame.cpp index b8e07c11fe..52b8cb63f1 100644 --- a/ui/qt/progress_frame.cpp +++ b/ui/qt/progress_frame.cpp @@ -265,6 +265,7 @@ void ProgressFrame::hide() QFrame::hide(); #ifdef QWINTASKBARPROGRESS_H if (taskbar_progress_) { + disconnect(this, SIGNAL(valueChanged(int)), taskbar_progress_, SLOT(setValue(int))); taskbar_progress_->reset(); taskbar_progress_->hide(); } @@ -310,12 +311,12 @@ void ProgressFrame::show(bool animate, bool terminate_is_stop, gboolean *stop_fl if (taskbar_button) { taskbar_button->setWindow(window()->windowHandle()); taskbar_progress_ = taskbar_button->progress(); - connect(this, SIGNAL(valueChanged(int)), taskbar_progress_, SLOT(setValue(int))); } } if (taskbar_progress_) { taskbar_progress_->show(); - taskbar_progress_->resume(); + taskbar_progress_->reset(); + connect(this, SIGNAL(valueChanged(int)), taskbar_progress_, SLOT(setValue(int))); } #endif } |