Calling deleteLater() in CloseSplit

Instead of removing the TwitchChannel manually in CloseSplit, a request
to delete this widget will be sent to QT.
In the destructor the TwitchChannel will be removed as planned.
This commit is contained in:
Bur0k 2018-01-17 19:44:35 +01:00 committed by fourtf
parent 728b6e74a8
commit 97411c045c

View file

@ -317,8 +317,8 @@ void Split::doAddSplit()
void Split::doCloseSplit()
{
SplitContainer *page = static_cast<SplitContainer *>(this->parentWidget());
singletons::ChannelManager::getInstance().removeTwitchChannel(this->channel->name);
page->removeFromLayout(this);
deleteLater();
}
void Split::doChangeChannel()