diff options
author | rachytski <siarhei.rachytski@gmail.com> | 2012-05-15 20:01:49 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 01:38:28 +0300 |
commit | 9ba77a08daa4ab7383b28c3ed03fc86a5fae313b (patch) | |
tree | 4cc703f3bd2b2d3c9a45e316052c59ab2e527065 /qt | |
parent | 1bd9a4be35c8c953419068912abe7838c4abc5e0 (diff) |
fixed compilation for desktop.
Diffstat (limited to 'qt')
-rw-r--r-- | qt/update_dialog.cpp | 10 | ||||
-rw-r--r-- | qt/update_dialog.hpp | 1 |
2 files changed, 7 insertions, 4 deletions
diff --git a/qt/update_dialog.cpp b/qt/update_dialog.cpp index b5057178be..cf9c06ed39 100644 --- a/qt/update_dialog.cpp +++ b/qt/update_dialog.cpp @@ -57,7 +57,9 @@ namespace qt //////////////////////////////////////////////////////////////////////////////// UpdateDialog::UpdateDialog(QWidget * parent, Storage & storage) - : QDialog(parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint), m_storage(storage) + : QDialog(parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint), + m_storage(storage), + m_observerSlotId(0) { setWindowModality(Qt::WindowModal); @@ -85,14 +87,14 @@ namespace qt 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)); + m_observerSlotId = m_storage.Subscribe(bind(&UpdateDialog::OnCountryChanged, this, _1), + bind(&UpdateDialog::OnCountryDownloadProgress, this, _1, _2)); } UpdateDialog::~UpdateDialog() { // tell download manager that we're gone... - m_storage.Unsubscribe(); + m_storage.Unsubscribe(m_observerSlotId); } /// when user clicks on any map row in the table diff --git a/qt/update_dialog.hpp b/qt/update_dialog.hpp index ae44adbcf7..12a061b1f1 100644 --- a/qt/update_dialog.hpp +++ b/qt/update_dialog.hpp @@ -39,5 +39,6 @@ namespace qt private: QTreeWidget * m_tree; storage::Storage & m_storage; + int m_observerSlotId; }; } // namespace qt |