Added unregisterEventsHandler to destructor of TorControlDialog

This commit is contained in:
thunder2 2021-12-29 15:32:28 +01:00
parent efe2ec03ff
commit e096f2feb1
2 changed files with 6 additions and 0 deletions

View File

@ -51,6 +51,11 @@ TorControlDialog::TorControlDialog(QWidget *)
adjustSize(); adjustSize();
} }
TorControlDialog::~TorControlDialog()
{
rsEvents->unregisterEventsHandler(mEventHandlerId);
}
void TorControlDialog::handleEvent_main_thread(std::shared_ptr<const RsEvent> event) void TorControlDialog::handleEvent_main_thread(std::shared_ptr<const RsEvent> event)
{ {
if(event->mType != RsEventType::TOR_MANAGER) return; if(event->mType != RsEventType::TOR_MANAGER) return;

View File

@ -15,6 +15,7 @@ class TorControlDialog: public QWidget, public Ui::TorControlDialog
public: public:
TorControlDialog(QWidget *parent =NULL); TorControlDialog(QWidget *parent =NULL);
virtual ~TorControlDialog();
enum TorStatus { enum TorStatus {
TOR_STATUS_UNKNOWN = 0x00, TOR_STATUS_UNKNOWN = 0x00,