void ChannelContactModel::onContactPresenceChanged(const Tp::Presence &presence)
{
    Tp::ContactPtr contact(qobject_cast<Tp::Contact*>(sender()));

    QModelIndex index = createIndex(m_contacts.lastIndexOf(contact), 0);
    Q_EMIT dataChanged(index, index);

    Q_EMIT contactPresenceChanged(contact, KTp::Presence(presence));
}
Example #2
0
void Addressbook::emitContactPresenceChanged(const QString &uid, int presence)
{
    if(uid.isEmpty())
    {
        //This warning below is annoying.  FIXME - disabled because it's too verbose
        //		kdDebug() << "Addressbook::emitContactPresenceChanged was called with empty uid" << endl;
        return;
    }
    Q_ASSERT(kapp->dcopClient());
    emit contactPresenceChanged(uid, kapp->dcopClient()->appId(), presence);
    //	kdDebug() << "Presence changed for uid " << uid << " to " << presence << endl;
}