get UserListProxy from TabSupervisor instead of passing it in the constructor (#5490)

This commit is contained in:
RickyRister 2025-01-17 07:27:52 -08:00 committed by GitHub
parent 92a903b035
commit 2bc71095dd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 32 additions and 52 deletions

View file

@ -588,7 +588,7 @@ void TabSupervisor::gameJoined(const Event_GameJoined &event)
roomGameTypes.insert(event.game_types(i).game_type_id(),
QString::fromStdString(event.game_types(i).description()));
auto *tab = new TabGame(this, userListManager, QList<AbstractClient *>() << client, event, roomGameTypes);
auto *tab = new TabGame(this, QList<AbstractClient *>() << client, event, roomGameTypes);
connect(tab, &TabGame::gameClosing, this, &TabSupervisor::gameLeft);
connect(tab, &TabGame::openMessageDialog, this, &TabSupervisor::addMessageTab);
connect(tab, &TabGame::openDeckEditor, this, &TabSupervisor::addDeckEditorTab);
@ -599,7 +599,7 @@ void TabSupervisor::gameJoined(const Event_GameJoined &event)
void TabSupervisor::localGameJoined(const Event_GameJoined &event)
{
auto *tab = new TabGame(this, userListManager, localClients, event, QMap<int, QString>());
auto *tab = new TabGame(this, localClients, event, QMap<int, QString>());
connect(tab, &TabGame::gameClosing, this, &TabSupervisor::gameLeft);
connect(tab, &TabGame::openDeckEditor, this, &TabSupervisor::addDeckEditorTab);
myAddTab(tab);
@ -627,7 +627,7 @@ void TabSupervisor::gameLeft(TabGame *tab)
void TabSupervisor::addRoomTab(const ServerInfo_Room &info, bool setCurrent)
{
auto *tab = new TabRoom(this, client, userInfo, userListManager, info);
auto *tab = new TabRoom(this, client, userInfo, info);
connect(tab, &TabRoom::maximizeClient, this, &TabSupervisor::maximizeMainWindow);
connect(tab, &TabRoom::roomClosing, this, &TabSupervisor::roomLeft);
connect(tab, &TabRoom::openMessageDialog, this, &TabSupervisor::addMessageTab);