Show
Ignore:
Timestamp:
06/14/08 23:21:57 (5 months ago)
Author:
flynd
Message:

dataChanged signal cannot be sent between beginInsertRow and endInsertRow. Revised signalling when adding and removing users in groups to fix this. This fixes the empty rows sometimes seen first in groups after users have been added.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/qt4-gui/src/contactlist/contactlist.h

    r6283 r6309  
    376376 
    377377  /** 
     378   * A group is about to add a user 
     379   * Will send beginInsertRow signal for the user 
     380   * 
     381   * @param group The group that's adding the user 
     382   * @param row The row the new user will have in the group 
     383   */ 
     384  void groupBeginInsert(ContactGroup* group, int row); 
     385 
     386  /** 
     387   * A group has finished adding a user 
     388   * Will send endInsertRow signal 
     389   */ 
     390  void groupEndInsert(); 
     391 
     392  /** 
     393   * A group is about to remove a user 
     394   * Will send beginRemoveRow signal for the user 
     395   * 
     396   * @param group The group that's removing the user 
     397   * @param row The row of the user about to be removed 
     398   */ 
     399  void groupBeginRemove(ContactGroup* group, int row); 
     400 
     401  /** 
     402   * A group has finished removing a user 
     403   * Will send endRemoveRow signal 
     404   */ 
     405  void groupEndRemove(); 
     406 
     407  /** 
    378408   * Update the user membership in all groups 
    379409   * This is triggered by the user data object when its group membership (may) have changed 
     
    408438   * @param user The user to update 
    409439   * @param group The group to check 
    410    * @param groupRow The row index of the group 
    411440   * @param shouldBeMember True to add the user if missing or false to remove if member 
    412441   */ 
    413   void updateUserGroup(ContactUserData* user, ContactGroup* group, int groupRow, bool shouldBeMember); 
     442  void updateUserGroup(ContactUserData* user, ContactGroup* group, bool shouldBeMember); 
     443 
     444  /** 
     445   * Get model row for a group 
     446   * 
     447   * @param group A group object 
     448   * @return Row in model or -1 if not found 
     449   */ 
     450  int groupRow(ContactGroup* group) const; 
    414451 
    415452  QList<ContactGroup*> myUserGroups;