summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMorph <39850852+Morph1984@users.noreply.github.com>2022-02-01 20:48:52 +0100
committerGitHub <noreply@github.com>2022-02-01 20:48:52 +0100
commita28a10bc546c2e4bfa693b49fd40b7578e69decb (patch)
tree570fe3eac267c185de6cbbde7302799be82b3d6c /src
parentMerge pull request #7830 from lioncash/player-copy (diff)
parentconfigure_motion_touch: Use functor versions of invokeMethod (diff)
downloadyuzu-a28a10bc546c2e4bfa693b49fd40b7578e69decb.tar
yuzu-a28a10bc546c2e4bfa693b49fd40b7578e69decb.tar.gz
yuzu-a28a10bc546c2e4bfa693b49fd40b7578e69decb.tar.bz2
yuzu-a28a10bc546c2e4bfa693b49fd40b7578e69decb.tar.lz
yuzu-a28a10bc546c2e4bfa693b49fd40b7578e69decb.tar.xz
yuzu-a28a10bc546c2e4bfa693b49fd40b7578e69decb.tar.zst
yuzu-a28a10bc546c2e4bfa693b49fd40b7578e69decb.zip
Diffstat (limited to 'src')
-rw-r--r--src/yuzu/configuration/configure_motion_touch.cpp38
1 files changed, 20 insertions, 18 deletions
diff --git a/src/yuzu/configuration/configure_motion_touch.cpp b/src/yuzu/configuration/configure_motion_touch.cpp
index 8539a5c8b..4340de304 100644
--- a/src/yuzu/configuration/configure_motion_touch.cpp
+++ b/src/yuzu/configuration/configure_motion_touch.cpp
@@ -42,23 +42,25 @@ CalibrationConfigurationDialog::CalibrationConfigurationDialog(QWidget* parent,
job = std::make_unique<CalibrationConfigurationJob>(
host, port,
[this](CalibrationConfigurationJob::Status status) {
- QString text;
- switch (status) {
- case CalibrationConfigurationJob::Status::Ready:
- text = tr("Touch the top left corner <br>of your touchpad.");
- break;
- case CalibrationConfigurationJob::Status::Stage1Completed:
- text = tr("Now touch the bottom right corner <br>of your touchpad.");
- break;
- case CalibrationConfigurationJob::Status::Completed:
- text = tr("Configuration completed!");
- break;
- default:
- break;
- }
- QMetaObject::invokeMethod(this, "UpdateLabelText", Q_ARG(QString, text));
+ QMetaObject::invokeMethod(this, [status, this] {
+ QString text;
+ switch (status) {
+ case CalibrationConfigurationJob::Status::Ready:
+ text = tr("Touch the top left corner <br>of your touchpad.");
+ break;
+ case CalibrationConfigurationJob::Status::Stage1Completed:
+ text = tr("Now touch the bottom right corner <br>of your touchpad.");
+ break;
+ case CalibrationConfigurationJob::Status::Completed:
+ text = tr("Configuration completed!");
+ break;
+ default:
+ break;
+ }
+ UpdateLabelText(text);
+ });
if (status == CalibrationConfigurationJob::Status::Completed) {
- QMetaObject::invokeMethod(this, "UpdateButtonText", Q_ARG(QString, tr("OK")));
+ QMetaObject::invokeMethod(this, [this] { UpdateButtonText(tr("OK")); });
}
},
[this](u16 min_x_, u16 min_y_, u16 max_x_, u16 max_y_) {
@@ -215,11 +217,11 @@ void ConfigureMotionTouch::OnCemuhookUDPTest() {
ui->udp_server->text().toStdString(), static_cast<u16>(ui->udp_port->text().toInt()),
[this] {
LOG_INFO(Frontend, "UDP input test success");
- QMetaObject::invokeMethod(this, "ShowUDPTestResult", Q_ARG(bool, true));
+ QMetaObject::invokeMethod(this, [this] { ShowUDPTestResult(true); });
},
[this] {
LOG_ERROR(Frontend, "UDP input test failed");
- QMetaObject::invokeMethod(this, "ShowUDPTestResult", Q_ARG(bool, false));
+ QMetaObject::invokeMethod(this, [this] { ShowUDPTestResult(false); });
});
}