From 68733ac6c1edb90b93d12906ba2b1d41c2a4bbf2 Mon Sep 17 00:00:00 2001 From: spycrab Date: Fri, 23 Mar 2018 12:10:53 +0100 Subject: Qt: Make QSettings use the user config directory --- Source/Core/DolphinQt2/NetPlay/NetPlaySetupDialog.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'Source/Core/DolphinQt2/NetPlay/NetPlaySetupDialog.cpp') diff --git a/Source/Core/DolphinQt2/NetPlay/NetPlaySetupDialog.cpp b/Source/Core/DolphinQt2/NetPlay/NetPlaySetupDialog.cpp index 89fe579d5f..f4cc46becb 100644 --- a/Source/Core/DolphinQt2/NetPlay/NetPlaySetupDialog.cpp +++ b/Source/Core/DolphinQt2/NetPlay/NetPlaySetupDialog.cpp @@ -17,7 +17,6 @@ #include #include #include -#include #include #include @@ -50,7 +49,7 @@ NetPlaySetupDialog::NetPlaySetupDialog(QWidget* parent) OnConnectionTypeChanged(m_connection_type->currentIndex()); - int selected_game = QSettings().value(QStringLiteral("netplay/hostgame"), 0).toInt(); + int selected_game = Settings::GetQSettings().value(QStringLiteral("netplay/hostgame"), 0).toInt(); if (selected_game >= m_host_games->count()) selected_game = 0; @@ -160,7 +159,9 @@ void NetPlaySetupDialog::ConnectWidgets() connect(m_host_port_box, static_cast(&QSpinBox::valueChanged), this, &NetPlaySetupDialog::SaveSettings); connect(m_host_games, static_cast(&QListWidget::currentRowChanged), - [](int index) { QSettings().setValue(QStringLiteral("netplay/hostgame"), index); }); + [](int index) { + Settings::GetQSettings().setValue(QStringLiteral("netplay/hostgame"), index); + }); connect(m_host_force_port_check, &QCheckBox::toggled, [this](int value) { m_host_force_port_box->setEnabled(value); }); #ifdef USE_UPNP -- cgit v1.2.3