Ejemplo n.º 1
0
static Mapping hashToBiMap(const Hash &hash)
{
  Mapping biMap;
  Hash::const_iterator it = hash.constBegin();
  const Hash::const_iterator end = hash.constEnd();
  for ( ; it != end; ++it)
    biMap.insert(Mapping::value_type(it.key(), it.value()));
  return biMap;
}
Ejemplo n.º 2
0
void KCTimeDict::save(QDataStream &str) const
{
    Hash::const_iterator it = m_hash.constBegin();
    const Hash::const_iterator end = m_hash.constEnd();
    for (; it != end; ++it) {
        str << it.key() << it.value();
    }
    str << QString() << quint32(0);
}
Ejemplo n.º 3
0
QStringList KCTimeDict::remainingResourceList() const
{
    QSet<QString> resources;
    Hash::const_iterator it = m_hash.constBegin();
    const Hash::const_iterator end = m_hash.constEnd();
    for (; it != end; ++it) {
        const QString key = it.key();
        const QString res = key.left(key.indexOf('|'));
        resources.insert(res);
    }
    return resources.toList();
}
Ejemplo n.º 4
0
void AncestorMoveMonitor::dump()
{
#ifndef QT_NO_DEBUG
    TRACE_CONTEXT(AncestorMoveMonitor::dump, EVideoInternal);
    for(Hash::const_iterator it = m_hash.begin();
        it != m_hash.end(); ++it) {
        const QObject *ancestor = it.key();
        TRACE("ancestor 0x%08x", ancestor);
        const TargetList& targetList = it.value();
        VideoOutput* target = 0;
        foreach(target, targetList) {
            TRACE("    target 0x%08x", target);
        }
    }