Updated response block to look better
This commit is contained in:
parent
3e94c9d283
commit
702f949196
1 changed files with 6 additions and 7 deletions
|
@ -138,13 +138,12 @@ void RoomSelector::joinClicked()
|
||||||
|
|
||||||
void RoomSelector::joinFinished(const Response &r, const CommandContainer & /*commandContainer*/, const QVariant &extraData)
|
void RoomSelector::joinFinished(const Response &r, const CommandContainer & /*commandContainer*/, const QVariant &extraData)
|
||||||
{
|
{
|
||||||
if (r.response_code() != Response::RespOk) {
|
switch (r.response_code()) {
|
||||||
switch (r.response_code()) {
|
case Response::RespOk: break;
|
||||||
case Response::RespUserLevelTooLow: QMessageBox::critical(this, tr("Error"), tr("You do not have the proper permission to join this room.")); return;
|
case Response::RespUserLevelTooLow: QMessageBox::critical(this, tr("Error"), tr("You do not have the proper permission to join this room.")); return;
|
||||||
default:
|
default:
|
||||||
QMessageBox::critical(this, tr("Error"), tr("Failed to join the room due to an unknown error."));
|
QMessageBox::critical(this, tr("Error"), tr("Failed to join the room due to an unknown error."));
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const Response_JoinRoom &resp = r.GetExtension(Response_JoinRoom::ext);
|
const Response_JoinRoom &resp = r.GetExtension(Response_JoinRoom::ext);
|
||||||
|
|
Loading…
Reference in a new issue