turns out new slot/signal syntax can ignore extra params

This commit is contained in:
RickyRister 2025-01-15 02:52:39 -08:00
parent 663cd65fca
commit c50338e73e
7 changed files with 16 additions and 21 deletions

View file

@ -191,7 +191,7 @@ void TabAdmin::actForceActivateUser()
client->sendCommand(pend);
}
void TabAdmin::grantReplayAccessProcessResponse(const Response &response, const CommandContainer &, const QVariant &)
void TabAdmin::grantReplayAccessProcessResponse(const Response &response)
{
auto *event = new Event_ReplayAdded();
@ -209,7 +209,7 @@ void TabAdmin::grantReplayAccessProcessResponse(const Response &response, const
}
}
void TabAdmin::activateUserProcessResponse(const Response &response, const CommandContainer &, const QVariant &)
void TabAdmin::activateUserProcessResponse(const Response &response)
{
switch (response.response_code()) {
case Response::RespActivationAccepted:

View file

@ -47,8 +47,8 @@ private slots:
void actReloadConfig();
void actGrantReplayAccess();
void actForceActivateUser();
void grantReplayAccessProcessResponse(const Response &resp, const CommandContainer &, const QVariant &);
void activateUserProcessResponse(const Response &response, const CommandContainer &, const QVariant &);
void grantReplayAccessProcessResponse(const Response &response);
void activateUserProcessResponse(const Response &response);
void actUnlock();
void actLock();

View file

@ -194,9 +194,7 @@ void GameSelector::actCreate()
updateTitle();
}
void GameSelector::checkResponse(const Response &response,
const CommandContainer & /* commandContainer */,
const QVariant & /* extraData */)
void GameSelector::checkResponse(const Response &response)
{
// NB: We re-enable buttons for the currently selected game, which may not
// be the same game as the one for which we are processing a response.

View file

@ -29,7 +29,7 @@ private slots:
void actCreate();
void actJoin();
void actSelectedGameChanged(const QModelIndex &current, const QModelIndex &previous);
void checkResponse(const Response &response, const CommandContainer &, const QVariant &);
void checkResponse(const Response &response);
void ignoreListReceived(const QList<ServerInfo_User> &_ignoreList);
void processAddToListEvent(const Event_AddToList &event);

View file

@ -91,9 +91,7 @@ void ZoneViewZone::initializeCards(const QList<const ServerInfo_Card *> &cardLis
}
}
void ZoneViewZone::zoneDumpReceived(const Response &r,
const CommandContainer & /* commandContainer */,
const QVariant & /* extraData */)
void ZoneViewZone::zoneDumpReceived(const Response &r)
{
const Response_DumpZone &resp = r.GetExtension(Response_DumpZone::ext);
const int respCardListSize = resp.zone_info().card_list_size();

View file

@ -95,7 +95,7 @@ public slots:
void setSortBy(CardList::SortOption _sortBy);
void setPileView(int _pileView);
private slots:
void zoneDumpReceived(const Response &r, const CommandContainer &, const QVariant &);
void zoneDumpReceived(const Response &r);
signals:
void beingDeleted();
void optimumRectChanged();

View file

@ -250,15 +250,14 @@ void UserInfoBox::actPassword()
cmd.set_user_name(client->getUserName().toStdString());
PendingCommand *pend = client->prepareSessionCommand(cmd);
connect(pend, &PendingCommand::finished, this,
[=, this](const Response &response, const CommandContainer &, const QVariant &) {
if (response.response_code() == Response::RespOk) {
changePassword(oldPassword, newPassword);
} else {
QMessageBox::critical(this, tr("Error"),
tr("An error occurred while trying to update your user information."));
}
});
connect(pend, &PendingCommand::finished, this, [=, this](const Response &response) {
if (response.response_code() == Response::RespOk) {
changePassword(oldPassword, newPassword);
} else {
QMessageBox::critical(this, tr("Error"),
tr("An error occurred while trying to update your user information."));
}
});
client->sendCommand(pend);
} else {
changePassword(oldPassword, newPassword);