fix
This commit is contained in:
parent
50de655261
commit
87933ba82d
4 changed files with 5 additions and 2 deletions
|
@ -149,7 +149,7 @@ void PlayerListWidget::showContextMenu(const QPoint &pos, const QModelIndex &ind
|
|||
menu->addSeparator();
|
||||
menu->addAction(aDetails);
|
||||
menu->addAction(aChat);
|
||||
if (userLevel & ServerInfo_User::IsRegistered) {
|
||||
if ((userLevel & ServerInfo_User::IsRegistered) && (tabSupervisor->getUserLevel() & ServerInfo_User::IsRegistered)) {
|
||||
menu->addSeparator();
|
||||
if (tabSupervisor->getUserListsTab()->getBuddyList()->userInList(userName))
|
||||
menu->addAction(aRemoveFromBuddyList);
|
||||
|
|
|
@ -57,6 +57,7 @@ void TabSupervisor::start(AbstractClient *_client, ServerInfo_User *userInfo)
|
|||
{
|
||||
client = _client;
|
||||
userName = userInfo->getName();
|
||||
userLevel = userInfo->getUserLevel();
|
||||
|
||||
connect(client, SIGNAL(roomEventReceived(RoomEvent *)), this, SLOT(processRoomEvent(RoomEvent *)));
|
||||
connect(client, SIGNAL(gameEventContainerReceived(GameEventContainer *)), this, SLOT(processGameEventContainer(GameEventContainer *)));
|
||||
|
|
|
@ -25,6 +25,7 @@ class TabSupervisor : public QTabWidget {
|
|||
Q_OBJECT
|
||||
private:
|
||||
QString userName;
|
||||
int userLevel;
|
||||
QIcon *tabChangedIcon;
|
||||
AbstractClient *client;
|
||||
QList<AbstractClient *> localClients;
|
||||
|
@ -46,6 +47,7 @@ public:
|
|||
int getGameCount() const { return gameTabs.size(); }
|
||||
TabUserLists *getUserListsTab() const { return tabUserLists; }
|
||||
bool getAdminLocked() const;
|
||||
int getUserLevel() const { return userLevel; }
|
||||
signals:
|
||||
void setMenu(QMenu *menu);
|
||||
void localGameEnded();
|
||||
|
|
|
@ -183,7 +183,7 @@ void UserList::showContextMenu(const QPoint &pos, const QModelIndex &index)
|
|||
menu->addSeparator();
|
||||
menu->addAction(aDetails);
|
||||
menu->addAction(aChat);
|
||||
if (userLevel & ServerInfo_User::IsRegistered) {
|
||||
if ((userLevel & ServerInfo_User::IsRegistered) && (tabSupervisor->getUserLevel() & ServerInfo_User::IsRegistered)) {
|
||||
menu->addSeparator();
|
||||
if (tabSupervisor->getUserListsTab()->getBuddyList()->userInList(userName))
|
||||
menu->addAction(aRemoveFromBuddyList);
|
||||
|
|
Loading…
Reference in a new issue