void Client::slotRosterRequestFinished() { JT_Roster *r = (JT_Roster *)sender(); // on success, let's take it if(r->success()) { //d->roster.flagAllForDelete(); // mod_groups patch importRoster(r->roster()); for(LiveRoster::Iterator it = d->roster.begin(); it != d->roster.end();) { LiveRosterItem &i = *it; if(i.flagForDelete()) { rosterItemRemoved(i); it = d->roster.remove(it); } else ++it; } } else { // don't report a disconnect. Client::error() will do that. if(r->statusCode() == Task::ErrDisc) return; } // report success / fail rosterRequestFinished(r->success(), r->statusCode(), r->statusString()); }
ContactListModel::ContactListModel(PsiContactList* contactList) : AbstractTreeModel(new ContactListItem(this, ContactListItem::Type::RootType)) , d(new Private(this)) { d->contactList = contactList; connect(contactList, SIGNAL(addedContact(PsiContact*)), d, SLOT(addContact(PsiContact*))); connect(contactList, SIGNAL(removedContact(PsiContact*)), d, SLOT(removeContact(PsiContact*))); connect(d->contactList, SIGNAL(destroying()), SLOT(destroyingContactList())); connect(d->contactList, SIGNAL(showOfflineChanged(bool)), SIGNAL(showOfflineChanged())); connect(d->contactList, SIGNAL(showHiddenChanged(bool)), SIGNAL(showHiddenChanged())); connect(d->contactList, SIGNAL(showSelfChanged(bool)), SIGNAL(showSelfChanged())); connect(d->contactList, SIGNAL(showAgentsChanged(bool)), SIGNAL(showTransportsChanged())); connect(d->contactList, SIGNAL(rosterRequestFinished()), SLOT(rosterRequestFinished())); connect(d->contactList, SIGNAL(contactSortStyleChanged(QString)), SIGNAL(contactSortStyleChanged())); }