1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

ownership (again)

This commit is contained in:
krepa098 2015-02-09 17:48:54 +01:00
parent 3f6e68db95
commit 990a7f4734

View File

@ -101,13 +101,15 @@ ChatLog::ChatLog(QWidget* parent)
ChatLog::~ChatLog()
{
// Drop ownership of items of type ChatLineContentType
// as they are owned by ChatLine
for(QGraphicsItem* item : items())
{
if(item->type() == ChatLineContent::ChatLineContentType)
scene->removeItem(item);
}
// Remove chatlines from scene
for(ChatLine::Ptr l : lines)
l->removeFromScene();
if(busyNotification)
busyNotification->removeFromScene();
if(typingNotification)
typingNotification->removeFromScene();
}
void ChatLog::clearSelection()