diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2014-07-24 01:18:10 -0500 |
---|---|---|
committer | Charles Kerr <charles.kerr@canonical.com> | 2014-07-24 01:18:10 -0500 |
commit | b9b3cfea551b5c7e12e6bb9904cffe2873b328c7 (patch) | |
tree | d5fbc49d6330039f2fd7db13054e360fd43f2ba6 /include/datetime | |
parent | 909ccbc93d9fa21075cf5001887e69159e621f5d (diff) | |
download | ayatana-indicator-datetime-b9b3cfea551b5c7e12e6bb9904cffe2873b328c7.tar.gz ayatana-indicator-datetime-b9b3cfea551b5c7e12e6bb9904cffe2873b328c7.tar.bz2 ayatana-indicator-datetime-b9b3cfea551b5c7e12e6bb9904cffe2873b328c7.zip |
when a Snap object is destructed, delete any active Popups that it owns. This cleaner shutdown doesn't have any effect in production, but is needed to shut down the bus cleanly in the tests.
Diffstat (limited to 'include/datetime')
-rw-r--r-- | include/datetime/snap.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/datetime/snap.h b/include/datetime/snap.h index 9b45b3f..1c90496 100644 --- a/include/datetime/snap.h +++ b/include/datetime/snap.h @@ -24,8 +24,9 @@ #include <datetime/clock.h> #include <datetime/settings.h> -#include <memory> #include <functional> +#include <memory> +#include <set> namespace unity { namespace indicator { @@ -49,6 +50,10 @@ public: private: const std::shared_ptr<Clock> m_clock; const std::shared_ptr<const Settings> m_settings; + + class Popup; + friend class Popup; + std::set<Popup*> m_pending; }; } // namespace datetime |