[Replay] Refactor: rename ReplayManager to ReplayWidget (#7059)
Some checks are pending
Build Desktop / Configure (push) Waiting to run
Build Desktop / Debian 13 (push) Blocked by required conditions
Build Desktop / Debian 12 (push) Blocked by required conditions
Build Desktop / Fedora 44 (push) Blocked by required conditions
Build Desktop / Fedora 43 (push) Blocked by required conditions
Build Desktop / Servatrice_Debian 12 (push) Blocked by required conditions
Build Desktop / Ubuntu 26.04 (push) Blocked by required conditions
Build Desktop / Ubuntu 24.04 (push) Blocked by required conditions
Build Desktop / Arch (push) Blocked by required conditions
Build Desktop / macOS 14 (push) Blocked by required conditions
Build Desktop / macOS 15 (push) Blocked by required conditions
Build Desktop / macOS 13 Intel (push) Blocked by required conditions
Build Desktop / macOS 15 Debug (push) Blocked by required conditions
Build Desktop / Windows 10 (push) Blocked by required conditions
Build Docker Image / amd64 & arm64 (push) Waiting to run

This commit is contained in:
RickyRister 2026-07-27 19:40:43 -07:00 committed by GitHub
parent 6260bd1ed1
commit be6a783c12
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 34 additions and 30 deletions

View file

@ -265,8 +265,8 @@ void TabGame::emitUserEvent()
TabGame::~TabGame()
{
if (replayManager) {
delete replayManager->replay;
if (replayWidget) {
delete replayWidget->replay;
}
for (auto &player : game->getPlayerManager()->getPlayers()) {
player->clear();
@ -1174,16 +1174,16 @@ void TabGame::createPlayAreaWidget(bool bReplay)
void TabGame::createReplayDock(GameReplay *replay)
{
replayManager = new ReplayManager(this, replay);
replayWidget = new ReplayWidget(this, replay);
replayDock = new QDockWidget(this);
replayDock->setObjectName("replayDock");
replayDock->setFeatures(QDockWidget::DockWidgetClosable | QDockWidget::DockWidgetFloatable |
QDockWidget::DockWidgetMovable);
replayDock->setWidget(replayManager);
replayDock->setWidget(replayWidget);
replayDock->setFloating(false);
connect(replayManager, &ReplayManager::eventReplayed, game->getGameEventHandler(),
connect(replayWidget, &ReplayWidget::eventReplayed, game->getGameEventHandler(),
[this](const auto &event, auto options) {
game->getGameEventHandler()->processGameEventContainer(event, nullptr, options);
});

View file

@ -13,7 +13,7 @@
#include "../game/player/player_logic.h"
#include "../game_graphics/log/message_log_widget.h"
#include "../interface/widgets/menus/tearoff_menu.h"
#include "../interface/widgets/replay/replay_manager.h"
#include "../interface/widgets/replay/replay_widget.h"
#include "tab.h"
#include <QCompleter>
@ -31,7 +31,7 @@ class AbstractClient;
class CardDatabase;
class GameView;
class GameScene;
class ReplayManager;
class ReplayWidget;
class CardInfoFrameWidget;
class QTimer;
class QSplitter;
@ -59,7 +59,7 @@ class TabGame : public Tab
private:
AbstractGame *game;
const UserListProxy *userListProxy;
ReplayManager *replayManager = nullptr;
ReplayWidget *replayWidget = nullptr;
QStringList gameTypes;
QCompleter *completer;
QStringList autocompleteUserList;