Exemplo n.º 1
0
BuddyList JabberOpenChatWithRunner::matchingContacts(const QString &query)
{
    BuddyList matchedContacts;
    QString queryCopy(query);
    int pos = 0;
    JabberIdValidator validator;
    if (validator.validate(queryCopy, pos) != QValidator::Acceptable)
        return matchedContacts;

    auto contact = m_contactManager->byId(m_account, query, ActionCreate);
    auto buddy = m_buddyManager->byContact(contact, ActionCreate);
    matchedContacts.append(buddy);

    return matchedContacts;
}
Exemplo n.º 2
0
QValidator::State JabberProtocolFactory::validateId(QString id)
{
	int pos = 0;
	JabberIdValidator validator;
	return validator.validate(id, pos);
}