Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Zolotarev <deathbaba@gmail.com>2011-03-25 04:21:43 +0300
committerAlex Zolotarev <alex@maps.me>2015-09-23 01:14:15 +0300
commit23a5982f82a0b8c0d54b04d5b724f4aa64f47ab0 (patch)
treedb5c473fed570bf74e9c87637e8ed456435549a8 /qt/update_dialog.cpp
parent845c029104284208c2cbbac93c174b2ea3caf3c0 (diff)
[qt] Fixed bug with not updated progress in Downloader
Diffstat (limited to 'qt/update_dialog.cpp')
-rw-r--r--qt/update_dialog.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/qt/update_dialog.cpp b/qt/update_dialog.cpp
index 2a4bbeb4bd..64afdc423c 100644
--- a/qt/update_dialog.cpp
+++ b/qt/update_dialog.cpp
@@ -85,6 +85,17 @@ namespace qt
setWindowTitle(tr("Geographical Regions"));
resize(600, 500);
+
+ // we want to receive all download progress and result events
+ m_storage.Subscribe(bind(&UpdateDialog::OnCountryChanged, this, _1),
+ bind(&UpdateDialog::OnCountryDownloadProgress, this, _1, _2),
+ bind(&UpdateDialog::OnUpdateRequest, this, _1, _2));
+ }
+
+ UpdateDialog::~UpdateDialog()
+ {
+ // tell download manager that we're gone...
+ m_storage.Unsubscribe();
}
/// when user clicks on any map row in the table
@@ -361,10 +372,6 @@ namespace qt
void UpdateDialog::ShowDialog()
{
- // we want to receive all download progress and result events
- m_storage.Subscribe(bind(&UpdateDialog::OnCountryChanged, this, _1),
- bind(&UpdateDialog::OnCountryDownloadProgress, this, _1, _2),
- bind(&UpdateDialog::OnUpdateRequest, this, _1, _2));
// if called for first time
if (!m_tree->topLevelItemCount())
FillTree();