mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
Ensure we disconnect from signals on exit in SplitHeader
This commit is contained in:
parent
b88196c81c
commit
b78f357efc
|
@ -136,9 +136,9 @@ void SplitHeader::initializeChannelSignals()
|
|||
TwitchChannel *twitchChannel = dynamic_cast<TwitchChannel *>(channel.get());
|
||||
|
||||
if (twitchChannel) {
|
||||
twitchChannel->updateLiveInfo.connect([this]() {
|
||||
this->managedConnections.emplace_back(twitchChannel->updateLiveInfo.connect([this]() {
|
||||
this->updateChannelText(); //
|
||||
});
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -14,6 +14,9 @@
|
|||
#include <QPoint>
|
||||
#include <QWidget>
|
||||
#include <pajlada/settings/setting.hpp>
|
||||
#include <pajlada/signals/connection.hpp>
|
||||
|
||||
#include <vector>
|
||||
|
||||
namespace chatterino {
|
||||
namespace widgets {
|
||||
|
@ -64,6 +67,8 @@ private:
|
|||
QString tooltip;
|
||||
bool isLive;
|
||||
|
||||
std::vector<pajlada::Signals::ScopedConnection> managedConnections;
|
||||
|
||||
public slots:
|
||||
void addDropdownItems(RippleEffectButton *label);
|
||||
|
||||
|
|
Loading…
Reference in a new issue