fix segfault that happens when account tab is closed (#5474)

This commit is contained in:
RickyRister 2025-01-14 22:10:03 -08:00 committed by GitHub
parent d09b9eb533
commit 23bd18a04c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
19 changed files with 332 additions and 121 deletions

View file

@ -5,6 +5,7 @@
#include <QObject>
class UserlistProxy;
class AbstractClient;
class ChatView;
class CommandContainer;
@ -22,6 +23,7 @@ class UserContextMenu : public QObject
private:
AbstractClient *client;
TabSupervisor *tabSupervisor;
const UserlistProxy *userListProxy;
TabGame *game;
QAction *aUserName;
@ -52,7 +54,10 @@ private slots:
void gamesOfUserReceived(const Response &resp, const CommandContainer &commandContainer);
public:
UserContextMenu(TabSupervisor *_tabSupervisor, QWidget *_parent, TabGame *_game = 0);
UserContextMenu(TabSupervisor *_tabSupervisor,
const UserlistProxy *_userListProxy,
QWidget *_parent,
TabGame *_game = 0);
void retranslateUi();
void showContextMenu(const QPoint &pos,
const QString &userName,