1092 } |
1092 } |
1093 } |
1093 } |
1094 NetPassword(nick); |
1094 NetPassword(nick); |
1095 } |
1095 } |
1096 |
1096 |
|
1097 void HWForm::NetNickNotRegistered(const QString & nick) |
|
1098 { |
|
1099 QMessageBox noRegMsg(this); |
|
1100 noRegMsg.setIcon(QMessageBox::Information); |
|
1101 noRegMsg.setWindowTitle(QMessageBox::tr("Hedgewars - Nick not registered")); |
|
1102 noRegMsg.setWindowModality(Qt::WindowModal); |
|
1103 noRegMsg.setText(tr("Your nickname is not registered.\nTo prevent someone else from using it,\nplease register it at www.hedgewars.org")); |
|
1104 |
|
1105 if (!config->passwordHash().isEmpty()) |
|
1106 { |
|
1107 config->clearPasswordHash(); |
|
1108 noRegMsg.setText(noRegMsg.text()+tr("\n\nYour password wasn't saved either.")); |
|
1109 } |
|
1110 if (!config->tempHash().isEmpty()) |
|
1111 { |
|
1112 config->clearTempHash(); |
|
1113 } |
|
1114 noRegMsg.exec(); |
|
1115 } |
|
1116 |
1097 void HWForm::NetNickTaken(const QString & nick) |
1117 void HWForm::NetNickTaken(const QString & nick) |
1098 { |
1118 { |
1099 bool ok = false; |
1119 bool ok = false; |
1100 QString newNick = QInputDialog::getText(this, tr("Nickname"), tr("Someone already uses your nickname %1 on the server.\nPlease pick another nickname:").arg(nick), QLineEdit::Normal, nick, &ok); |
1120 QString newNick = QInputDialog::getText(this, tr("Nickname"), tr("Someone already uses your nickname %1 on the server.\nPlease pick another nickname:").arg(nick), QLineEdit::Normal, nick, &ok); |
1101 |
1121 |
1205 connect(hwnet, SIGNAL(LeftRoom(const QString&)), this, SLOT(NetLeftRoom(const QString&)), Qt::QueuedConnection); |
1225 connect(hwnet, SIGNAL(LeftRoom(const QString&)), this, SLOT(NetLeftRoom(const QString&)), Qt::QueuedConnection); |
1206 connect(hwnet, SIGNAL(AddNetTeam(const HWTeam&)), this, SLOT(AddNetTeam(const HWTeam&)), Qt::QueuedConnection); |
1226 connect(hwnet, SIGNAL(AddNetTeam(const HWTeam&)), this, SLOT(AddNetTeam(const HWTeam&)), Qt::QueuedConnection); |
1207 connect(hwnet, SIGNAL(RemoveNetTeam(const HWTeam&)), this, SLOT(RemoveNetTeam(const HWTeam&)), Qt::QueuedConnection); |
1227 connect(hwnet, SIGNAL(RemoveNetTeam(const HWTeam&)), this, SLOT(RemoveNetTeam(const HWTeam&)), Qt::QueuedConnection); |
1208 connect(hwnet, SIGNAL(TeamAccepted(const QString&)), this, SLOT(NetTeamAccepted(const QString&)), Qt::QueuedConnection); |
1228 connect(hwnet, SIGNAL(TeamAccepted(const QString&)), this, SLOT(NetTeamAccepted(const QString&)), Qt::QueuedConnection); |
1209 connect(hwnet, SIGNAL(NickRegistered(const QString&)), this, SLOT(NetNickRegistered(const QString&)), Qt::QueuedConnection); |
1229 connect(hwnet, SIGNAL(NickRegistered(const QString&)), this, SLOT(NetNickRegistered(const QString&)), Qt::QueuedConnection); |
|
1230 connect(hwnet, SIGNAL(NickNotRegistered(const QString&)), this, SLOT(NetNickNotRegistered(const QString&)), Qt::QueuedConnection); |
1210 connect(hwnet, SIGNAL(NickTaken(const QString&)), this, SLOT(NetNickTaken(const QString&)), Qt::QueuedConnection); |
1231 connect(hwnet, SIGNAL(NickTaken(const QString&)), this, SLOT(NetNickTaken(const QString&)), Qt::QueuedConnection); |
1211 connect(hwnet, SIGNAL(AuthFailed()), this, SLOT(NetAuthFailed()), Qt::QueuedConnection); |
1232 connect(hwnet, SIGNAL(AuthFailed()), this, SLOT(NetAuthFailed()), Qt::QueuedConnection); |
1212 //connect(ui.pageNetGame->BtnBack, SIGNAL(clicked()), hwnet, SLOT(partRoom())); |
1233 //connect(ui.pageNetGame->BtnBack, SIGNAL(clicked()), hwnet, SLOT(partRoom())); |
1213 |
1234 |
1214 ui.pageRoomsList->chatWidget->setUsersModel(hwnet->lobbyPlayersModel()); |
1235 ui.pageRoomsList->chatWidget->setUsersModel(hwnet->lobbyPlayersModel()); |