diff options
| author | Lioncash <mathew1800@gmail.com> | 2019-07-30 09:35:46 -0400 |
|---|---|---|
| committer | Léo Lam <leo@leolam.fr> | 2020-04-28 16:54:19 +0200 |
| commit | 19115c84dd50105bb3a64df7e5017946247dcd46 (patch) | |
| tree | a714dcc359090e8a4235d3993d5c77cffb300657 /Source/Core/DolphinQt/Config/ControllersWindow.cpp | |
| parent | 58de3c59ce543ffac006fa00f74a07b39393af69 (diff) | |
DolphinQt: Use qOverload where applicable
Provides the same behvaior, but in a much more concise manner.
Diffstat (limited to 'Source/Core/DolphinQt/Config/ControllersWindow.cpp')
| -rw-r--r-- | Source/Core/DolphinQt/Config/ControllersWindow.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/Source/Core/DolphinQt/Config/ControllersWindow.cpp b/Source/Core/DolphinQt/Config/ControllersWindow.cpp index 65ab32cbe6..2f3d03ed43 100644 --- a/Source/Core/DolphinQt/Config/ControllersWindow.cpp +++ b/Source/Core/DolphinQt/Config/ControllersWindow.cpp @@ -260,20 +260,16 @@ void ControllersWindow::ConnectWidgets() for (size_t i = 0; i < m_wiimote_groups.size(); i++) { - connect(m_wiimote_boxes[i], - static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, + connect(m_wiimote_boxes[i], qOverload<int>(&QComboBox::currentIndexChanged), this, &ControllersWindow::SaveSettings); - connect(m_wiimote_boxes[i], - static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, + connect(m_wiimote_boxes[i], qOverload<int>(&QComboBox::currentIndexChanged), this, &ControllersWindow::OnWiimoteModeChanged); connect(m_wiimote_buttons[i], &QPushButton::clicked, this, &ControllersWindow::OnWiimoteConfigure); - connect(m_gc_controller_boxes[i], - static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, + connect(m_gc_controller_boxes[i], qOverload<int>(&QComboBox::currentIndexChanged), this, &ControllersWindow::SaveSettings); - connect(m_gc_controller_boxes[i], - static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, + connect(m_gc_controller_boxes[i], qOverload<int>(&QComboBox::currentIndexChanged), this, &ControllersWindow::OnGCTypeChanged); connect(m_gc_buttons[i], &QPushButton::clicked, this, &ControllersWindow::OnGCPadConfigure); } |
