added option to ignore unregistered users in chat; switched UserList data storage to QMap to speed up lookups; issue #28 fixed

This commit is contained in:
Max-Wilhelm Bruker 2012-03-31 15:06:47 +02:00
parent ff632911f2
commit cdda3f15a0
10 changed files with 191 additions and 43 deletions

View file

@ -183,11 +183,11 @@ void PlayerListWidget::showContextMenu(const QPoint &pos, const QModelIndex &ind
menu->addAction(aChat);
if ((userLevel & ServerInfo_User::IsRegistered) && (tabSupervisor->getUserLevel() & ServerInfo_User::IsRegistered)) {
menu->addSeparator();
if (tabSupervisor->getUserListsTab()->getBuddyList()->userInList(userName))
if (tabSupervisor->getUserListsTab()->getBuddyList()->getUsers().contains(userName))
menu->addAction(aRemoveFromBuddyList);
else
menu->addAction(aAddToBuddyList);
if (tabSupervisor->getUserListsTab()->getIgnoreList()->userInList(userName))
if (tabSupervisor->getUserListsTab()->getIgnoreList()->getUsers().contains(userName))
menu->addAction(aRemoveFromIgnoreList);
else
menu->addAction(aAddToIgnoreList);