equal
deleted
inserted
replaced
529 } |
529 } |
530 */ |
530 */ |
531 |
531 |
532 void PageRoomsList::onCreateClick() |
532 void PageRoomsList::onCreateClick() |
533 { |
533 { |
534 RoomNamePrompt prompt(parentWidget()->parentWidget(), m_gameSettings->value("frontend/lastroomname", QString()).toString()); |
534 RoomNamePrompt prompt(this, m_gameSettings->value("frontend/lastroomname", QString()).toString()); |
535 connect(&prompt, SIGNAL(roomNameChosen(const QString &)), this, SLOT(onRoomNameChosen(const QString &))); |
535 if(prompt.exec()) |
536 prompt.exec(); |
536 onRoomNameChosen(prompt.getRoomName(), prompt.getPassword()); |
537 } |
537 } |
538 |
538 |
539 void PageRoomsList::onRoomNameChosen(const QString & roomName) |
539 void PageRoomsList::onRoomNameChosen(const QString & roomName, const QString & password) |
540 { |
540 { |
541 if (!roomName.trimmed().isEmpty()) |
541 if (!roomName.trimmed().isEmpty()) |
542 { |
542 { |
543 m_gameSettings->setValue("frontend/lastroomname", roomName); |
543 m_gameSettings->setValue("frontend/lastroomname", roomName); |
544 emit askForCreateRoom(roomName); |
544 emit askForCreateRoom(roomName, password); |
545 } |
545 } |
546 else |
546 else |
547 { |
547 { |
548 onCreateClick(); |
548 onCreateClick(); |
549 } |
549 } |