From 5ff2a4e37a153ddcc78029421308ab143cfe5dce Mon Sep 17 00:00:00 2001 From: TheNain38 Date: Sun, 8 Nov 2015 14:17:34 +0100 Subject: [PATCH] Fix groupwidget not unregistered from Translator --- src/widget/groupwidget.cpp | 5 +++++ src/widget/groupwidget.h | 1 + 2 files changed, 6 insertions(+) diff --git a/src/widget/groupwidget.cpp b/src/widget/groupwidget.cpp index a13ea8816..cd113e416 100644 --- a/src/widget/groupwidget.cpp +++ b/src/widget/groupwidget.cpp @@ -60,6 +60,11 @@ GroupWidget::GroupWidget(int GroupId, QString Name) Translator::registerHandler(std::bind(&GroupWidget::retranslateUi, this), this); } +GroupWidget::~GroupWidget() +{ + Translator::unregister(this); +} + void GroupWidget::contextMenuEvent(QContextMenuEvent* event) { if (!active) diff --git a/src/widget/groupwidget.h b/src/widget/groupwidget.h index 71e535c58..e2434360b 100644 --- a/src/widget/groupwidget.h +++ b/src/widget/groupwidget.h @@ -27,6 +27,7 @@ class GroupWidget final : public GenericChatroomWidget Q_OBJECT public: GroupWidget(int GroupId, QString Name); + ~GroupWidget(); virtual void setAsInactiveChatroom() final override; virtual void setAsActiveChatroom() final override; virtual void updateStatusLight() final override;