remove usages of qOverload

This commit is contained in:
RickyRister 2025-01-15 02:39:20 -08:00
parent 4c9e5676ac
commit 663cd65fca
6 changed files with 7 additions and 18 deletions

View file

@ -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;

View file

@ -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);
}

View file

@ -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();

View file

@ -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();

View file

@ -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 {

View file

@ -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);
}