Logo Search packages:      
Sourcecode: k4dirstat version File versions  Download package

void KDirTreeView::addChild ( KFileInfo newChild ) [protected, slot]

Add a child as a clone of original tree item "newChild" to this view tree.

Definition at line 375 of file kdirtreeview.cpp.

References locate(), and KDirStat::KFileInfo::parent().

Referenced by createTree().

{
    if ( newChild->parent() )
    {
      KDirTreeViewItem *cloneParent = locate( newChild->parent(),
                                    _doLazyClone,           // lazy
                                    true );                 // doClone

      if ( cloneParent )
      {
          if ( isOpen( cloneParent ) || ! _doLazyClone )
          {
            // kdDebug() << "Immediately cloning " << newChild << endl;
            new KDirTreeViewItem( this, cloneParent, newChild );
          }
      }
      else  // Error
      {
          if ( ! _doLazyClone )
          {
            kdError() << k_funcinfo << "Can't find parent view item for "
                    << newChild << endl;
          }
      }
    }
    else    // No parent - top level item
    {
      // kdDebug() << "Immediately top level cloning " << newChild << endl;
      new KDirTreeViewItem( this, newChild );
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index