mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
ownership (again)
This commit is contained in:
parent
3f6e68db95
commit
990a7f4734
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue
Block a user