Mercurial > bellaciao
diff contact_list.cpp @ 7:017925589d4c
Contact (formerly ContactT) now use shared data
author | Goffi <goffi@goffi.org> |
---|---|
date | Sun, 14 Aug 2011 18:03:54 +0200 |
parents | 48045176d1c6 |
children |
line wrap: on
line diff
--- a/contact_list.cpp Fri Aug 12 22:08:37 2011 +0200 +++ b/contact_list.cpp Sun Aug 14 18:03:54 2011 +0200 @@ -31,13 +31,16 @@ } -void ContactList::addContact(const ContactT& contact) +void ContactList::addContact(const Contact& contact) { - const QString &txt = contact.getName().isEmpty() ? contact.jid.getString() : contact.getName(); + const QString & _jid = contact.getJid().getBareString(); + m_contactMap.insert(_jid, contact); + const QString &txt = contact.getName().isEmpty() ? contact.getJid().getString() : contact.getName(); new QListWidgetItem(txt, listWidget); } void ContactList::clear() { listWidget->clear(); + m_contactMap.clear(); }