Move impl to cpp, fix lifetime issues.

Took 11 minutes

Took 2 minutes
This commit is contained in:
Lukas Brübach 2026-08-03 14:30:45 +02:00
parent 961a973772
commit a9077aa65b
27 changed files with 442 additions and 281 deletions

View file

@ -310,7 +310,6 @@ void GameSelector::customContextMenu(const QPoint &point)
connect(&getGameInfo, &QAction::triggered, this, [=, this]() {
const ServerInfo_Game &gameInfo = gameListModel->getGame(index.data(Qt::UserRole).toInt());
const QMap<int, QString> &gameTypes = gameListModel->getGameTypes().value(gameInfo.room_id());
qWarning() << "Game Id: " << gameInfo.game_id();
DlgCreateGame dlg(gameInfo, gameTypes, this);
dlg.exec();

View file

@ -280,6 +280,7 @@ void TabRoom::processListGamesEvent(const Event_ListGames &event)
for (int i = 0; i < gameListSize; ++i) {
gameSelector->processGameInfo(event.game_list(i));
}
emit gameListUpdated();
}
void TabRoom::processJoinRoomEvent(const Event_JoinRoom &event)

View file

@ -78,6 +78,7 @@ signals:
void openMessageDialog(const QString &userName, bool focus);
void maximizeClient();
void notIdle();
void gameListUpdated();
private slots:
void sendMessage();
void sayFinished(const Response &response);

View file

@ -587,6 +587,10 @@ void TabSupervisor::actTabServer(bool checked)
void TabSupervisor::openTabServer()
{
if (tabServer) {
return;
}
tabServer = new TabServer(this, client);
connect(tabServer, &TabServer::roomJoined, this, &TabSupervisor::addRoomTab);
myAddTab(tabServer, aTabServer);

View file

@ -187,6 +187,7 @@ public slots:
void maximizeMainWindow();
void actTabVisualDeckStorage(bool checked);
void actTabReplays(bool checked);
void openTabServer();
private slots:
void refreshShortcuts();
@ -199,7 +200,6 @@ private slots:
void openTabVisualDeckStorage();
void openTabHome();
void openTabServer();
void openTabAccount();
void openTabDeckStorage();
void openTabReplays();