void RoomSelector::joinRoom(int id, bool setCurrent) { Command_JoinRoom cmd; cmd.set_room_id(id); PendingCommand *pend = client->prepareSessionCommand(cmd); pend->setExtraData(setCurrent); connect(pend, SIGNAL(finished(Response, CommandContainer, QVariant)), this, SLOT(joinFinished(Response, CommandContainer, QVariant))); client->sendCommand(pend); }
void TabServer::joinRoom(int id, bool setCurrent) { TabRoom *room = tabSupervisor->getRoomTabs().value(id); if(!room) { Command_JoinRoom cmd; cmd.set_room_id(id); PendingCommand *pend = client->prepareSessionCommand(cmd); pend->setExtraData(setCurrent); connect(pend, SIGNAL(finished(Response, CommandContainer, QVariant)), this, SLOT(joinRoomFinished(Response, CommandContainer, QVariant))); client->sendCommand(pend); return; } if(setCurrent) tabSupervisor->setCurrentWidget((QWidget*)room); }