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;
}
Esempio n. 2
0
QValidator::State JabberProtocolFactory::validateId(QString id)
{
	int pos = 0;
	JabberIdValidator validator;
	return validator.validate(id, pos);
}