summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinQt/NetPlay/NetPlayDialog.cpp
diff options
context:
space:
mode:
authorLéo Lam <leo@leolam.fr>2020-04-28 16:59:43 +0200
committerGitHub <noreply@github.com>2020-04-28 16:59:43 +0200
commit82012c4cd6778c3ebb1bc48c50a76e07667f359c (patch)
treea714dcc359090e8a4235d3993d5c77cffb300657 /Source/Core/DolphinQt/NetPlay/NetPlayDialog.cpp
parent58de3c59ce543ffac006fa00f74a07b39393af69 (diff)
parent19115c84dd50105bb3a64df7e5017946247dcd46 (diff)
Merge pull request #8272 from lioncash/overload
DolphinQt: Use qOverload where applicable
Diffstat (limited to 'Source/Core/DolphinQt/NetPlay/NetPlayDialog.cpp')
-rw-r--r--Source/Core/DolphinQt/NetPlay/NetPlayDialog.cpp27
1 files changed, 13 insertions, 14 deletions
diff --git a/Source/Core/DolphinQt/NetPlay/NetPlayDialog.cpp b/Source/Core/DolphinQt/NetPlay/NetPlayDialog.cpp
index 230823b8b6..caa0037d81 100644
--- a/Source/Core/DolphinQt/NetPlay/NetPlayDialog.cpp
+++ b/Source/Core/DolphinQt/NetPlay/NetPlayDialog.cpp
@@ -255,7 +255,7 @@ void NetPlayDialog::CreatePlayersLayout()
void NetPlayDialog::ConnectWidgets()
{
// Players
- connect(m_room_box, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this,
+ connect(m_room_box, qOverload<int>(&QComboBox::currentIndexChanged), this,
&NetPlayDialog::UpdateGUI);
connect(m_hostcode_action_button, &QPushButton::clicked, [this] {
if (m_is_copy_button_retry && m_room_box->currentIndex() == 0)
@@ -286,18 +286,17 @@ void NetPlayDialog::ConnectWidgets()
[this] { m_chat_send_button->setEnabled(!m_chat_type_edit->text().isEmpty()); });
// Other
- connect(m_buffer_size_box, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged),
- [this](int value) {
- if (value == m_buffer_size)
- return;
-
- auto client = Settings::Instance().GetNetPlayClient();
- auto server = Settings::Instance().GetNetPlayServer();
- if (server && !m_host_input_authority)
- server->AdjustPadBufferSize(value);
- else
- client->AdjustPadBufferSize(value);
- });
+ connect(m_buffer_size_box, qOverload<int>(&QSpinBox::valueChanged), [this](int value) {
+ if (value == m_buffer_size)
+ return;
+
+ auto client = Settings::Instance().GetNetPlayClient();
+ auto server = Settings::Instance().GetNetPlayServer();
+ if (server && !m_host_input_authority)
+ server->AdjustPadBufferSize(value);
+ else
+ client->AdjustPadBufferSize(value);
+ });
const auto hia_function = [this](bool enable) {
if (m_host_input_authority != enable)
@@ -345,7 +344,7 @@ void NetPlayDialog::ConnectWidgets()
// SaveSettings() - Save Hosting-Dialog Settings
- connect(m_buffer_size_box, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this,
+ connect(m_buffer_size_box, qOverload<int>(&QSpinBox::valueChanged), this,
&NetPlayDialog::SaveSettings);
connect(m_save_sd_action, &QAction::toggled, this, &NetPlayDialog::SaveSettings);
connect(m_load_wii_action, &QAction::toggled, this, &NetPlayDialog::SaveSettings);