first prototype

This commit is contained in:
Blue 2020-04-18 02:17:47 +03:00
parent 494afcf2b5
commit 83a2e6af85
13 changed files with 365 additions and 244 deletions

View file

@ -18,6 +18,7 @@
#include "group.h"
#include "contact.h"
#include "reference.h"
Models::Group::Group(const QMap<QString, QVariant>& data, Models::Item* parentItem):
Item(group, data, parentItem),
@ -103,16 +104,3 @@ unsigned int Models::Group::getOnlineContacts() const
return amount;
}
bool Models::Group::hasContact(const QString& jid) const
{
for (Models::Item* item : childItems) {
if (item->type == Item::contact) {
const Contact* cnt = static_cast<const Contact*>(item);
if (cnt->getJid() == jid) {
return true;
}
}
}
return false;
}