Exemple #1
0
std::ostream& operator<< ( std::ostream& out,
                           const std::vector<char>& vec )
{
    out << "std::vector<char> [";
    insertRange(out, vec.begin(), vec.end(), " ");
    out << "] ";
    return out;
}
void SeasideCache::finalizeUpdate(SeasideFilteredModel::FilterType filter)
{
    const QList<QContactLocalId> queryIds = m_contactIdRequest.ids();
    QVector<QContactLocalId> &cacheIds = m_contacts[filter];

    if (m_cacheIndex < cacheIds.count())
        removeRange(filter, m_cacheIndex, cacheIds.count() - m_cacheIndex);

    if (m_queryIndex < queryIds.count()) {
        const int count = queryIds.count() - m_queryIndex;
        insertRange(filter, cacheIds.count(), count, queryIds, m_queryIndex);
    }

    m_cacheIndex = 0;
    m_queryIndex = 0;
}