From 1bc8c34f8b57fa926c735076a19d79e8b1131ea5 Mon Sep 17 00:00:00 2001 From: spycrab Date: Wed, 27 Jun 2018 13:35:34 +0200 Subject: [PATCH] Qt/NetPlay: Make double clicking game entries confirm dialogs --- Source/Core/DolphinQt2/NetPlay/GameListDialog.cpp | 2 ++ Source/Core/DolphinQt2/NetPlay/NetPlaySetupDialog.cpp | 3 +++ 2 files changed, 5 insertions(+) diff --git a/Source/Core/DolphinQt2/NetPlay/GameListDialog.cpp b/Source/Core/DolphinQt2/NetPlay/GameListDialog.cpp index a85c55f697..e56c3e7eff 100644 --- a/Source/Core/DolphinQt2/NetPlay/GameListDialog.cpp +++ b/Source/Core/DolphinQt2/NetPlay/GameListDialog.cpp @@ -41,6 +41,8 @@ void GameListDialog::ConnectWidgets() m_button_box->setEnabled(row != -1); m_game_id = m_game_list->currentItem()->text(); }); + + connect(m_game_list, &QListWidget::itemDoubleClicked, this, &GameListDialog::accept); connect(m_button_box, &QDialogButtonBox::accepted, this, &GameListDialog::accept); } diff --git a/Source/Core/DolphinQt2/NetPlay/NetPlaySetupDialog.cpp b/Source/Core/DolphinQt2/NetPlay/NetPlaySetupDialog.cpp index a7328f536e..b921fa52af 100644 --- a/Source/Core/DolphinQt2/NetPlay/NetPlaySetupDialog.cpp +++ b/Source/Core/DolphinQt2/NetPlay/NetPlaySetupDialog.cpp @@ -164,6 +164,9 @@ void NetPlaySetupDialog::ConnectWidgets() [](int index) { Settings::GetQSettings().setValue(QStringLiteral("netplay/hostgame"), index); }); + + connect(m_host_games, &QListWidget::itemDoubleClicked, this, &NetPlaySetupDialog::accept); + connect(m_host_force_port_check, &QCheckBox::toggled, [this](int value) { m_host_force_port_box->setEnabled(value); }); #ifdef USE_UPNP