source/MainGUI.cpp
/**
 * Slot which is emiited when the friendlist gets updated.
 *
 * @param friends The list of friends.
 */
Slot which is emiited when the friendlist gets updated.
@param friends The list of friends.
Slot which is emiited when the friendlist gets updated . @param friends The list of friends .
void MainGUI::updateFriendlist(QList<Friend*> friends)
{
    for (int i = 0; i < widget.friendList->count(); ++i)
    {
        delete VariantUtil<Friend>::toPointer(widget.friendList->item(i)->data(ROLE_FRIEND));
    }
    widget.friendList->clear();
    foreach(Friend* f, friends)
    {
        addFriend(f);
    }
}
void MainGUI :: updateFriendlist ( QList < Friend * > friends ) { for ( int i = 0 ; i < widget . friendList -> count ( ) ; ++ i ) { delete VariantUtil < Friend > :: toPointer ( widget . friendList -> item ( i ) -> data ( ROLE_FRIEND ) ) ; } widget . friendList -> clear ( ) ; foreach ( Friend * f , friends ) { addFriend ( f ) ; } }
Slot which is emiited when the friendlist gets updated.
Slot which is emiited when the friendlist gets updated .