mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-02-17 21:34:10 -05: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()
|
TransfersDialog::~TransfersDialog()
|
||||||
{
|
{
|
||||||
|
rsEvents->unregisterEventsHandler(mEventHandlerId);
|
||||||
|
|
||||||
// save settings
|
// save settings
|
||||||
processSettings(false);
|
processSettings(false);
|
||||||
}
|
}
|
||||||
|
@ -1377,6 +1377,9 @@ void IdDialog::circle_selected()
|
|||||||
|
|
||||||
IdDialog::~IdDialog()
|
IdDialog::~IdDialog()
|
||||||
{
|
{
|
||||||
|
rsEvents->unregisterEventsHandler(mEventHandlerId_identity);
|
||||||
|
rsEvents->unregisterEventsHandler(mEventHandlerId_circles);
|
||||||
|
|
||||||
// save settings
|
// save settings
|
||||||
processSettings(false);
|
processSettings(false);
|
||||||
|
|
||||||
|
@ -83,6 +83,7 @@ void PostedDialog::handleEvent_main_thread(std::shared_ptr<const RsEvent> event)
|
|||||||
|
|
||||||
PostedDialog::~PostedDialog()
|
PostedDialog::~PostedDialog()
|
||||||
{
|
{
|
||||||
|
rsEvents->unregisterEventsHandler(mEventHandlerId);
|
||||||
}
|
}
|
||||||
|
|
||||||
UserNotify *PostedDialog::createUserNotify(QObject *parent)
|
UserNotify *PostedDialog::createUserNotify(QObject *parent)
|
||||||
|
@ -266,6 +266,7 @@ void NewFriendList::handleEvent(std::shared_ptr<const RsEvent> e)
|
|||||||
|
|
||||||
NewFriendList::~NewFriendList()
|
NewFriendList::~NewFriendList()
|
||||||
{
|
{
|
||||||
|
rsEvents->unregisterEventsHandler(mEventHandlerId);
|
||||||
delete ui;
|
delete ui;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -88,6 +88,7 @@ void GxsChannelDialog::handleEvent_main_thread(std::shared_ptr<const RsEvent> ev
|
|||||||
|
|
||||||
GxsChannelDialog::~GxsChannelDialog()
|
GxsChannelDialog::~GxsChannelDialog()
|
||||||
{
|
{
|
||||||
|
rsEvents->unregisterEventsHandler(mEventHandlerId);
|
||||||
}
|
}
|
||||||
|
|
||||||
QString GxsChannelDialog::getHelpString() const
|
QString GxsChannelDialog::getHelpString() const
|
||||||
|
@ -158,6 +158,7 @@ void GxsChannelPostsWidget::handleEvent_main_thread(std::shared_ptr<const RsEven
|
|||||||
|
|
||||||
GxsChannelPostsWidget::~GxsChannelPostsWidget()
|
GxsChannelPostsWidget::~GxsChannelPostsWidget()
|
||||||
{
|
{
|
||||||
|
rsEvents->unregisterEventsHandler(mEventHandlerId);
|
||||||
// save settings
|
// save settings
|
||||||
processSettings(false);
|
processSettings(false);
|
||||||
|
|
||||||
|
@ -490,6 +490,7 @@ void GxsForumThreadWidget::blank()
|
|||||||
|
|
||||||
GxsForumThreadWidget::~GxsForumThreadWidget()
|
GxsForumThreadWidget::~GxsForumThreadWidget()
|
||||||
{
|
{
|
||||||
|
rsEvents->unregisterEventsHandler(mEventHandlerId);
|
||||||
// save settings
|
// save settings
|
||||||
processSettings(false);
|
processSettings(false);
|
||||||
|
|
||||||
|
@ -83,6 +83,7 @@ void GxsForumsDialog::handleEvent_main_thread(std::shared_ptr<const RsEvent> eve
|
|||||||
|
|
||||||
GxsForumsDialog::~GxsForumsDialog()
|
GxsForumsDialog::~GxsForumsDialog()
|
||||||
{
|
{
|
||||||
|
rsEvents->unregisterEventsHandler(mEventHandlerId);
|
||||||
}
|
}
|
||||||
|
|
||||||
QString GxsForumsDialog::getHelpString() const
|
QString GxsForumsDialog::getHelpString() const
|
||||||
|
@ -87,6 +87,7 @@ void HashingStatus::handleEvent(std::shared_ptr<const RsEvent> event)
|
|||||||
|
|
||||||
HashingStatus::~HashingStatus()
|
HashingStatus::~HashingStatus()
|
||||||
{
|
{
|
||||||
|
rsEvents->unregisterEventsHandler(mEventHandlerId);
|
||||||
delete(movie);
|
delete(movie);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,6 +45,11 @@ RsGxsUpdateBroadcast::RsGxsUpdateBroadcast(RsGxsIfaceHelper *ifaceImpl) :
|
|||||||
}, mEventHandlerId );
|
}, mEventHandlerId );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RsGxsUpdateBroadcast::~RsGxsUpdateBroadcast()
|
||||||
|
{
|
||||||
|
rsEvents->unregisterEventsHandler(mEventHandlerId);
|
||||||
|
}
|
||||||
|
|
||||||
void RsGxsUpdateBroadcast::cleanup()
|
void RsGxsUpdateBroadcast::cleanup()
|
||||||
{
|
{
|
||||||
QMap<RsGxsIfaceHelper*, RsGxsUpdateBroadcast*>::iterator it;
|
QMap<RsGxsIfaceHelper*, RsGxsUpdateBroadcast*>::iterator it;
|
||||||
|
@ -40,6 +40,9 @@ public:
|
|||||||
|
|
||||||
static RsGxsUpdateBroadcast *get(RsGxsIfaceHelper* ifaceImpl);
|
static RsGxsUpdateBroadcast *get(RsGxsIfaceHelper* ifaceImpl);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
virtual ~RsGxsUpdateBroadcast();
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void changed();
|
void changed();
|
||||||
void msgsChanged(const std::map<RsGxsGroupId, std::set<RsGxsMessageId> >& msgIds, const std::map<RsGxsGroupId, std::set<RsGxsMessageId> >& msgIdsMeta);
|
void msgsChanged(const std::map<RsGxsGroupId, std::set<RsGxsMessageId> >& msgIds, const std::map<RsGxsGroupId, std::set<RsGxsMessageId> >& msgIdsMeta);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user