Beispiel #1
0
KLibrary::~KLibrary()
{
//    kdDebug(150) << "Deleting KLibrary " << this << "  " << m_libname << endl;
    if ( m_timer && m_timer->isActive() )
	m_timer->stop();

    // If any object is remaining, delete
    if ( m_objs.count() > 0 )
	{
	    QPtrListIterator<QObject> it( m_objs );
	    for ( ; it.current() ; ++it )
		{
		    kdDebug(150) << "Factory still has object " << it.current() << " " << it.current()->name () << " Library = " << m_libname << endl;
		    disconnect( it.current(), SIGNAL( destroyed() ),
				this, SLOT( slotObjectDestroyed() ) );
		}
	    m_objs.setAutoDelete(true);
	    m_objs.clear();
	}

    if ( m_factory ) {
//	kdDebug(150) << " ... deleting the factory " << m_factory << endl;
	delete m_factory;
        m_factory = 0L;
    }
}
Beispiel #2
0
void KLibrary::slotObjectCreated(QObject *obj)
{
    if(!obj)
        return;

    if(m_timer && m_timer->isActive())
        m_timer->stop();

    if(m_objs.containsRef(obj))
        return; // we know this object already

    connect(obj, SIGNAL(destroyed()), this, SLOT(slotObjectDestroyed()));

    m_objs.append(obj);
}
Beispiel #3
0
KonqView::~KonqView()
{
  //kDebug() << "part=" << m_pPart;

  // We did so ourselves for passive views
  if (m_pPart != 0L)
  {
    finishedWithCurrentURL();
    if ( isPassiveMode() )
      disconnect( m_pPart, SIGNAL( destroyed() ), m_pMainWindow->viewManager(), SLOT( slotObjectDestroyed() ) );

    if (m_pPart->manager())
      m_pPart->manager()->removePart(m_pPart); // ~Part does this, but we have to do it before (#213876, #207173)

    delete m_pPart;
  }

  qDeleteAll( m_lstHistory );
  m_lstHistory.clear();

  setRun( 0L );
  //kDebug() << this << "done";
}