Show
Ignore:
Timestamp:
06/13/08 03:40:47 (6 months ago)
Author:
flynd
Message:

Use new user group handling function so we need less code here in the plugin.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/qt4-gui/src/core/groupmenu.cpp

    r6200 r6279  
    175175    unsigned long ppid = userIndex.data(ContactListModel::PpidRole).toUInt(); 
    176176 
    177     // Update user object 
    178     ICQUser* u = gUserManager.FetchUser(id.toLatin1(), ppid, LOCK_W); 
    179     if (u == NULL) 
    180       continue; 
    181     u->SetInGroup(gtype, gid, true); 
    182     gUserManager.DropUser(u); 
    183  
    184     // Some special groups need special handling 
    185     if (groupId == ContactListModel::SystemGroupOffset + GROUP_VISIBLE_LIST) 
    186       gLicqDaemon->icqAddToVisibleList(id.toLatin1(), ppid); 
    187     if (groupId == ContactListModel::SystemGroupOffset + GROUP_INVISIBLE_LIST) 
    188       gLicqDaemon->icqAddToInvisibleList(id.toLatin1(), ppid); 
    189     if (groupId == ContactListModel::SystemGroupOffset + GROUP_IGNORE_LIST) 
    190       gLicqDaemon->icqAddToIgnoreList(id.toLatin1(), ppid); 
     177    gUserManager.SetUserInGroup(id.toLatin1(), ppid, gtype, gid, true, 
     178        gtype == GROUPS_SYSTEM); 
    191179 
    192180    // Daemon doesn't notify us when group memberships change so notify model from here