Qt/patches: move game list loop to patch manager

This deduplicates some code
This commit is contained in:
Megamouse 2025-03-03 09:02:09 +01:00
parent 1920aee415
commit d034f6a77f
12 changed files with 99 additions and 94 deletions

View file

@ -3070,18 +3070,7 @@ void main_window::CreateConnects()
connect(ui->actionManage_Game_Patches, &QAction::triggered, this, [this]
{
std::unordered_map<std::string, std::set<std::string>> games;
if (m_game_list_frame)
{
for (const game_info& game : m_game_list_frame->GetGameInfo())
{
if (game)
{
games[game->info.serial].insert(game_list::GetGameVersion(game));
}
}
}
patch_manager_dialog patch_manager(m_gui_settings, games, "", "", this);
patch_manager_dialog patch_manager(m_gui_settings, m_game_list_frame ? m_game_list_frame->GetGameInfo() : std::vector<game_info>{}, "", "", this);
patch_manager.exec();
});