From 1ed92128185eaa72910e77a9196413e2b59d0b50 Mon Sep 17 00:00:00 2001 From: Imanol-Mikel Barba Sabariego Date: Tue, 7 Jan 2014 05:10:50 +0000 Subject: [PATCH] git-svn-id: svn://imanolbarba.net/PAD@53 c2ee353e-ed0d-4329-bf56-03aec153487f --- QChatClient/chatroom.cpp | 3 +++ 1 file changed, 3 insertions(+), 0 deletions(-) diff --git a/QChatClient/chatroom.cpp b/QChatClient/chatroom.cpp index 99f7a70..66e54e5 100644 --- a/QChatClient/chatroom.cpp +++ b/QChatClient/chatroom.cpp @@ -233,6 +233,7 @@ void Chatroom::relayMsg(string msg) void Chatroom::newChat(QString peerNick) { + cout << "add chat" << endl; freeChats(false); ChatWindow* newchat = new ChatWindow(peerNick,this); activeChats.insert(std::pair(peerNick.toStdString(),newchat)); @@ -242,6 +243,7 @@ void Chatroom::newChat(QString peerNick) void Chatroom::removeChat(QString &nickname) { + cout << "move to inactive" << endl; chatMutex.lock(); ChatWindow* chat = (ChatWindow*) activeChats.find(nickname.toStdString())->second; inactiveChats.insert(std::pair(nickname.toStdString(),chat)); @@ -397,6 +399,7 @@ void Chatroom::freeChats(bool active) { for(it = inactiveChats.begin(); it != inactiveChats.end(); it++) { + cout << "delete from inactive" << endl; ChatWindow* chat = (ChatWindow*) it->second; delete chat; } -- libgit2 0.22.2