fixed user list bug in threaded client, fixed buddy list crash in server

This commit is contained in:
Max-Wilhelm Bruker 2012-03-26 00:54:44 +02:00
parent fd5be3d525
commit d251078feb
5 changed files with 13 additions and 11 deletions

View file

@ -62,8 +62,9 @@ void AbstractClient::processProtocolItem(const ServerMessage &item)
PendingCommand *pend = pendingCommands.value(cmdId, 0);
if (!pend)
return;
pendingCommands.remove(cmdId);
locker.unlock();
pend->processResponse(response);
pend->deleteLater();
break;

View file

@ -614,7 +614,7 @@ void Player::retranslateUi()
aPeek->setText(tr("&Peek at card face"));
aClone->setText(tr("&Clone"));
aClone->setShortcut(tr("Ctrl+H"));
aAttach->setText(tr("&Attach to card..."));
aAttach->setText(tr("Attac&h to card..."));
aAttach->setShortcut(tr("Ctrl+A"));
aUnattach->setText(tr("Unattac&h"));
aDrawArrow->setText(tr("&Draw arrow..."));

View file

@ -107,6 +107,7 @@ void TabUserLists::processUserLeftEvent(const Event_UserLeft &event)
void TabUserLists::buddyListReceived(const QList<ServerInfo_User> &_buddyList)
{
qDebug() << "BUDDY LIST" << _buddyList.size();
for (int i = 0; i < _buddyList.size(); ++i)
buddyList->processUserInfo(_buddyList[i], false);
buddyList->sortItems();

View file

@ -348,7 +348,7 @@ MainWindow::MainWindow(QWidget *parent)
connect(client, SIGNAL(serverTimeout()), this, SLOT(serverTimeout()));
connect(client, SIGNAL(statusChanged(ClientStatus)), this, SLOT(statusChanged(ClientStatus)));
connect(client, SIGNAL(protocolVersionMismatch(int, int)), this, SLOT(protocolVersionMismatch(int, int)));
connect(client, SIGNAL(userInfoChanged(const ServerInfo_User &)), this, SLOT(userInfoReceived(const ServerInfo_User &)));
connect(client, SIGNAL(userInfoChanged(const ServerInfo_User &)), this, SLOT(userInfoReceived(const ServerInfo_User &)), Qt::BlockingQueuedConnection);
clientThread = new QThread(this);
client->moveToThread(clientThread);