diff options
Diffstat (limited to 'Source/Core/DolphinQt/NetPlay/NetPlaySetupDialog.cpp')
| -rw-r--r-- | Source/Core/DolphinQt/NetPlay/NetPlaySetupDialog.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/Source/Core/DolphinQt/NetPlay/NetPlaySetupDialog.cpp b/Source/Core/DolphinQt/NetPlay/NetPlaySetupDialog.cpp index adcfa3faf3..521ec48745 100644 --- a/Source/Core/DolphinQt/NetPlay/NetPlaySetupDialog.cpp +++ b/Source/Core/DolphinQt/NetPlay/NetPlaySetupDialog.cpp @@ -21,7 +21,6 @@ #include "Core/Config/NetplaySettings.h" #include "Core/NetPlayProto.h" -#include "DolphinQt/GameList/GameListModel.h" #include "DolphinQt/QtUtils/ModalMessageBox.h" #include "DolphinQt/QtUtils/UTF8CodePointCountValidator.h" #include "DolphinQt/Settings.h" @@ -29,8 +28,8 @@ #include "UICommon/GameFile.h" #include "UICommon/NetPlayIndex.h" -NetPlaySetupDialog::NetPlaySetupDialog(QWidget* parent) - : QDialog(parent), m_game_list_model(Settings::Instance().GetGameListModel()) +NetPlaySetupDialog::NetPlaySetupDialog(const GameListModel& game_list_model, QWidget* parent) + : QDialog(parent), m_game_list_model(game_list_model) { setWindowTitle(tr("NetPlay Setup")); setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint); @@ -359,12 +358,12 @@ void NetPlaySetupDialog::PopulateGameList() QSignalBlocker blocker(m_host_games); m_host_games->clear(); - for (int i = 0; i < m_game_list_model->rowCount(QModelIndex()); i++) + for (int i = 0; i < m_game_list_model.rowCount(QModelIndex()); i++) { - std::shared_ptr<const UICommon::GameFile> game = m_game_list_model->GetGameFile(i); + std::shared_ptr<const UICommon::GameFile> game = m_game_list_model.GetGameFile(i); auto* item = - new QListWidgetItem(QString::fromStdString(m_game_list_model->GetNetPlayName(*game))); + new QListWidgetItem(QString::fromStdString(m_game_list_model.GetNetPlayName(*game))); item->setData(Qt::UserRole, QVariant::fromValue(std::move(game))); m_host_games->addItem(item); } |
