mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-18 08:22:15 -07:00
remove usages of qOverload
This commit is contained in:
parent
4c9e5676ac
commit
663cd65fca
6 changed files with 7 additions and 18 deletions
|
|
@ -39,10 +39,7 @@ TabAccount::TabAccount(TabSupervisor *_tabSupervisor, AbstractClient *_client, c
|
|||
connect(client, &AbstractClient::removeFromListEventReceived, this, &TabAccount::processRemoveFromListEvent);
|
||||
|
||||
PendingCommand *pend = client->prepareSessionCommand(Command_ListUsers());
|
||||
connect(pend,
|
||||
static_cast<void (PendingCommand::*)(const Response &, const CommandContainer &, const QVariant &)>(
|
||||
&PendingCommand::finished),
|
||||
this, &TabAccount::processListUsersResponse);
|
||||
connect(pend, &PendingCommand::finished, this, &TabAccount::processListUsersResponse);
|
||||
client->sendCommand(pend);
|
||||
|
||||
QVBoxLayout *vbox = new QVBoxLayout;
|
||||
|
|
|
|||
|
|
@ -170,9 +170,7 @@ void TabAdmin::actGrantReplayAccess()
|
|||
cmd.set_moderator_name(client->getUserName().toStdString());
|
||||
|
||||
auto *pend = client->prepareModeratorCommand(cmd);
|
||||
connect(pend,
|
||||
QOverload<const Response &, const CommandContainer &, const QVariant &>::of(&PendingCommand::finished),
|
||||
this, &TabAdmin::grantReplayAccessProcessResponse);
|
||||
connect(pend, &PendingCommand::finished, this, &TabAdmin::grantReplayAccessProcessResponse);
|
||||
client->sendCommand(pend);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -274,8 +274,7 @@ void GameSelector::actJoin()
|
|||
}
|
||||
|
||||
PendingCommand *pend = r->prepareRoomCommand(cmd);
|
||||
connect(pend, qOverload<const Response &, const CommandContainer &, const QVariant &>(&PendingCommand::finished),
|
||||
this, &GameSelector::checkResponse);
|
||||
connect(pend, &PendingCommand::finished, this, &GameSelector::checkResponse);
|
||||
r->sendRoomCommand(pend);
|
||||
|
||||
disableButtons();
|
||||
|
|
|
|||
|
|
@ -77,9 +77,7 @@ void ZoneViewZone::initializeCards(const QList<const ServerInfo_Card *> &cardLis
|
|||
cmd.set_is_reversed(isReversed);
|
||||
|
||||
PendingCommand *pend = player->prepareGameCommand(cmd);
|
||||
connect(pend,
|
||||
qOverload<const Response &, const CommandContainer &, const QVariant &>(&PendingCommand::finished),
|
||||
this, &ZoneViewZone::zoneDumpReceived);
|
||||
connect(pend, &PendingCommand::finished, this, &ZoneViewZone::zoneDumpReceived);
|
||||
player->sendGameCommand(pend);
|
||||
} else {
|
||||
const CardList &c = origZone->getCards();
|
||||
|
|
|
|||
|
|
@ -250,10 +250,8 @@ void UserInfoBox::actPassword()
|
|||
cmd.set_user_name(client->getUserName().toStdString());
|
||||
|
||||
PendingCommand *pend = client->prepareSessionCommand(cmd);
|
||||
connect(pend,
|
||||
// we need qoverload here in order to select the right version of this function
|
||||
QOverload<const Response &, const CommandContainer &, const QVariant &>::of(&PendingCommand::finished),
|
||||
this, [=, this](const Response &response, const CommandContainer &, const QVariant &) {
|
||||
connect(pend, &PendingCommand::finished, this,
|
||||
[=, this](const Response &response, const CommandContainer &, const QVariant &) {
|
||||
if (response.response_code() == Response::RespOk) {
|
||||
changePassword(oldPassword, newPassword);
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -51,8 +51,7 @@ void UserListManager::setOwnUserInfo(const ServerInfo_User &userInfo)
|
|||
void UserListManager::populateInitialOnlineUsers()
|
||||
{
|
||||
PendingCommand *pend = client->prepareSessionCommand(Command_ListUsers());
|
||||
connect(pend, qOverload<const Response &, const CommandContainer &, const QVariant &>(&PendingCommand::finished),
|
||||
this, &UserListManager::processListUsersResponse);
|
||||
connect(pend, &PendingCommand::finished, this, &UserListManager::processListUsersResponse);
|
||||
client->sendCommand(pend);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue