void HistoryMessagesTab::setTalkables(const QVector<Talkable> &talkables) { auto chatsBuddies = m_pluginInjectedFactory->makeUnique<ChatsBuddiesSplitter>(talkables); ChatsModel->setChats(chatsBuddies->chats().toList().toVector()); BuddiesModel->setBuddyList(chatsBuddies->buddies().toList()); }
// ------------------------------------------------------------------- // BuddyList // ------------------------------------------------------------------- boost::shared_ptr<vector<boost::shared_ptr<Buddy> > > SFSBuddyManager::BuddyList() { boost::shared_ptr<vector<boost::shared_ptr<Buddy> > > buddies (new vector<boost::shared_ptr<Buddy> >()); std::map<string, boost::shared_ptr<Buddy> >::iterator iteratorBuddies; for (iteratorBuddies = buddiesByName->begin(); iteratorBuddies != buddiesByName->end(); iteratorBuddies++) { boost::shared_ptr<Buddy> buddy = iteratorBuddies->second; buddies->push_back(buddy); } return buddies; }
void Account::setDirty(bool dirty){ foreach (ServiceBuddyMap::value_type i, buddies()) foreach (Account::BuddyMap::value_type j, i.second) j.second->setDirty(dirty); }