void Kleo::HierarchicalKeyListJob::slotNextKey( const GpgME::Key & key ) {
  if ( const char * chain_id = key.chainID() )
    mNextSet.insert( chain_id );
  if ( const char * fpr = key.primaryFingerprint() )
    if ( mSentSet.find( fpr ) == mSentSet.end() ) {
      mSentSet.insert( fpr );
      emit nextKey( key );
    }
}
Exemplo n.º 2
0
void Kleo::KeyListView::doHierarchicalInsert( const GpgME::Key & key ) {
  const QCString fpr = key.primaryFingerprint();
  if ( fpr.isEmpty() )
    return;
  KeyListViewItem * item = 0;
  if ( !key.isRoot() )
    if ( KeyListViewItem * parent = itemByFingerprint( key.chainID() ) ) {
      item = new KeyListViewItem( parent, key );
      parent->setOpen( true );
    }
  if ( !item )
    item = new KeyListViewItem( this, key ); // top-level (for now)

  d->itemMap.insert( std::make_pair( fpr, item ) );
}