From fb66a455c4c7c1e196fc1001a52325a33e50b127 Mon Sep 17 00:00:00 2001 From: lat9nq <22451773+lat9nq@users.noreply.github.com> Date: Thu, 2 Sep 2021 21:40:55 -0400 Subject: yuzu qt: Remove global system instances from config, WaitTree, main --- src/yuzu/compatdb.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'src/yuzu/compatdb.cpp') diff --git a/src/yuzu/compatdb.cpp b/src/yuzu/compatdb.cpp index a470056ef..2442bb3c3 100644 --- a/src/yuzu/compatdb.cpp +++ b/src/yuzu/compatdb.cpp @@ -8,14 +8,13 @@ #include #include "common/logging/log.h" #include "common/telemetry.h" -#include "core/core.h" #include "core/telemetry_session.h" #include "ui_compatdb.h" #include "yuzu/compatdb.h" -CompatDB::CompatDB(QWidget* parent) +CompatDB::CompatDB(Core::TelemetrySession& telemetry_session_, QWidget* parent) : QWizard(parent, Qt::WindowTitleHint | Qt::WindowCloseButtonHint | Qt::WindowSystemMenuHint), - ui{std::make_unique()} { + ui{std::make_unique()}, telemetry_session{telemetry_session_} { ui->setupUi(this); connect(ui->radioButton_Perfect, &QRadioButton::clicked, this, &CompatDB::EnableNext); connect(ui->radioButton_Great, &QRadioButton::clicked, this, &CompatDB::EnableNext); @@ -53,16 +52,15 @@ void CompatDB::Submit() { case CompatDBPage::Final: back(); LOG_DEBUG(Frontend, "Compatibility Rating: {}", compatibility->checkedId()); - Core::System::GetInstance().TelemetrySession().AddField( - Common::Telemetry::FieldType::UserFeedback, "Compatibility", - compatibility->checkedId()); + telemetry_session.AddField(Common::Telemetry::FieldType::UserFeedback, "Compatibility", + compatibility->checkedId()); button(NextButton)->setEnabled(false); button(NextButton)->setText(tr("Submitting")); button(CancelButton)->setVisible(false); - testcase_watcher.setFuture(QtConcurrent::run( - [] { return Core::System::GetInstance().TelemetrySession().SubmitTestcase(); })); + testcase_watcher.setFuture( + QtConcurrent::run([this] { return telemetry_session.SubmitTestcase(); })); break; default: LOG_ERROR(Frontend, "Unexpected page: {}", currentId()); -- cgit v1.2.3