--- a/QTfrontend/ui/page/pageroomslist.cpp Mon Oct 14 00:33:10 2013 -0400
+++ b/QTfrontend/ui/page/pageroomslist.cpp Mon Oct 14 23:57:31 2013 +0400
@@ -531,17 +531,17 @@
void PageRoomsList::onCreateClick()
{
- RoomNamePrompt prompt(parentWidget()->parentWidget(), m_gameSettings->value("frontend/lastroomname", QString()).toString());
- connect(&prompt, SIGNAL(roomNameChosen(const QString &)), this, SLOT(onRoomNameChosen(const QString &)));
- prompt.exec();
+ RoomNamePrompt prompt(this, m_gameSettings->value("frontend/lastroomname", QString()).toString());
+ if(prompt.exec())
+ onRoomNameChosen(prompt.getRoomName(), prompt.getPassword());
}
-void PageRoomsList::onRoomNameChosen(const QString & roomName)
+void PageRoomsList::onRoomNameChosen(const QString & roomName, const QString & password)
{
if (!roomName.trimmed().isEmpty())
{
m_gameSettings->setValue("frontend/lastroomname", roomName);
- emit askForCreateRoom(roomName);
+ emit askForCreateRoom(roomName, password);
}
else
{