mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
added proper unregister calls in destructors of classes that register a event handler
This commit is contained in:
parent
e6d16f6f39
commit
0cdce37af4
@ -1117,6 +1117,8 @@ void TransfersDialog::handleEvent(std::shared_ptr<const RsEvent> event)
|
||||
|
||||
TransfersDialog::~TransfersDialog()
|
||||
{
|
||||
rsEvents->unregisterEventsHandler(mEventHandlerId);
|
||||
|
||||
// save settings
|
||||
processSettings(false);
|
||||
}
|
||||
|
@ -1377,6 +1377,9 @@ void IdDialog::circle_selected()
|
||||
|
||||
IdDialog::~IdDialog()
|
||||
{
|
||||
rsEvents->unregisterEventsHandler(mEventHandlerId_identity);
|
||||
rsEvents->unregisterEventsHandler(mEventHandlerId_circles);
|
||||
|
||||
// save settings
|
||||
processSettings(false);
|
||||
|
||||
|
@ -83,6 +83,7 @@ void PostedDialog::handleEvent_main_thread(std::shared_ptr<const RsEvent> event)
|
||||
|
||||
PostedDialog::~PostedDialog()
|
||||
{
|
||||
rsEvents->unregisterEventsHandler(mEventHandlerId);
|
||||
}
|
||||
|
||||
UserNotify *PostedDialog::createUserNotify(QObject *parent)
|
||||
|
@ -266,6 +266,7 @@ void NewFriendList::handleEvent(std::shared_ptr<const RsEvent> e)
|
||||
|
||||
NewFriendList::~NewFriendList()
|
||||
{
|
||||
rsEvents->unregisterEventsHandler(mEventHandlerId);
|
||||
delete ui;
|
||||
}
|
||||
|
||||
|
@ -88,6 +88,7 @@ void GxsChannelDialog::handleEvent_main_thread(std::shared_ptr<const RsEvent> ev
|
||||
|
||||
GxsChannelDialog::~GxsChannelDialog()
|
||||
{
|
||||
rsEvents->unregisterEventsHandler(mEventHandlerId);
|
||||
}
|
||||
|
||||
QString GxsChannelDialog::getHelpString() const
|
||||
|
@ -158,6 +158,7 @@ void GxsChannelPostsWidget::handleEvent_main_thread(std::shared_ptr<const RsEven
|
||||
|
||||
GxsChannelPostsWidget::~GxsChannelPostsWidget()
|
||||
{
|
||||
rsEvents->unregisterEventsHandler(mEventHandlerId);
|
||||
// save settings
|
||||
processSettings(false);
|
||||
|
||||
|
@ -490,6 +490,7 @@ void GxsForumThreadWidget::blank()
|
||||
|
||||
GxsForumThreadWidget::~GxsForumThreadWidget()
|
||||
{
|
||||
rsEvents->unregisterEventsHandler(mEventHandlerId);
|
||||
// save settings
|
||||
processSettings(false);
|
||||
|
||||
|
@ -83,6 +83,7 @@ void GxsForumsDialog::handleEvent_main_thread(std::shared_ptr<const RsEvent> eve
|
||||
|
||||
GxsForumsDialog::~GxsForumsDialog()
|
||||
{
|
||||
rsEvents->unregisterEventsHandler(mEventHandlerId);
|
||||
}
|
||||
|
||||
QString GxsForumsDialog::getHelpString() const
|
||||
|
@ -87,6 +87,7 @@ void HashingStatus::handleEvent(std::shared_ptr<const RsEvent> event)
|
||||
|
||||
HashingStatus::~HashingStatus()
|
||||
{
|
||||
rsEvents->unregisterEventsHandler(mEventHandlerId);
|
||||
delete(movie);
|
||||
}
|
||||
|
||||
|
@ -45,6 +45,11 @@ RsGxsUpdateBroadcast::RsGxsUpdateBroadcast(RsGxsIfaceHelper *ifaceImpl) :
|
||||
}, mEventHandlerId );
|
||||
}
|
||||
|
||||
RsGxsUpdateBroadcast::~RsGxsUpdateBroadcast()
|
||||
{
|
||||
rsEvents->unregisterEventsHandler(mEventHandlerId);
|
||||
}
|
||||
|
||||
void RsGxsUpdateBroadcast::cleanup()
|
||||
{
|
||||
QMap<RsGxsIfaceHelper*, RsGxsUpdateBroadcast*>::iterator it;
|
||||
|
@ -40,6 +40,9 @@ public:
|
||||
|
||||
static RsGxsUpdateBroadcast *get(RsGxsIfaceHelper* ifaceImpl);
|
||||
|
||||
protected:
|
||||
virtual ~RsGxsUpdateBroadcast();
|
||||
|
||||
signals:
|
||||
void changed();
|
||||
void msgsChanged(const std::map<RsGxsGroupId, std::set<RsGxsMessageId> >& msgIds, const std::map<RsGxsGroupId, std::set<RsGxsMessageId> >& msgIdsMeta);
|
||||
|
Loading…
Reference in New Issue
Block a user