equal
deleted
inserted
replaced
538 { |
538 { |
539 HWNetServersModel * model = static_cast<HWNetServersModel *>(tvServersList->model()); |
539 HWNetServersModel * model = static_cast<HWNetServersModel *>(tvServersList->model()); |
540 QModelIndex mi = tvServersList->currentIndex(); |
540 QModelIndex mi = tvServersList->currentIndex(); |
541 if(!mi.isValid()) |
541 if(!mi.isValid()) |
542 { |
542 { |
543 QMessageBox::information(this, tr("Error"), tr("Please, select server from the list above")); |
543 QMessageBox::information(this, tr("Error"), tr("Please select server from the list above")); |
544 return; |
544 return; |
545 } |
545 } |
546 QString host = model->index(mi.row(), 1).data().toString(); |
546 QString host = model->index(mi.row(), 1).data().toString(); |
547 quint16 port = model->index(mi.row(), 2).data().toUInt(); |
547 quint16 port = model->index(mi.row(), 2).data().toUInt(); |
548 |
548 |
915 if (roomName->text().size()) |
915 if (roomName->text().size()) |
916 emit askForCreateRoom(roomName->text()); |
916 emit askForCreateRoom(roomName->text()); |
917 else |
917 else |
918 QMessageBox::critical(this, |
918 QMessageBox::critical(this, |
919 tr("Error"), |
919 tr("Error"), |
920 tr("Please, enter room name"), |
920 tr("Please enter room name"), |
921 tr("OK")); |
921 tr("OK")); |
922 } |
922 } |
923 |
923 |
924 void PageRoomsList::onJoinClick() |
924 void PageRoomsList::onJoinClick() |
925 { |
925 { |
926 QTableWidgetItem * curritem = roomsList->item(roomsList->currentRow(), 0); |
926 QTableWidgetItem * curritem = roomsList->item(roomsList->currentRow(), 0); |
927 if (!curritem) |
927 if (!curritem) |
928 { |
928 { |
929 QMessageBox::critical(this, |
929 QMessageBox::critical(this, |
930 tr("Error"), |
930 tr("Error"), |
931 tr("Please, select room from the list"), |
931 tr("Please select room from the list"), |
932 tr("OK")); |
932 tr("OK")); |
933 return ; |
933 return ; |
934 } |
934 } |
935 emit askForJoinRoom(curritem->data(Qt::DisplayRole).toString()); |
935 emit askForJoinRoom(curritem->data(Qt::DisplayRole).toString()); |
936 } |
936 } |