|
|
|
@ -447,8 +447,11 @@ void KDirListerCache::forgetDirs( KDirLister *lister, const KURL& _url, bool not
|
|
|
|
|
url.adjustPath( -1 );
|
|
|
|
|
TQString urlStr = url.url();
|
|
|
|
|
TQPtrList<KDirLister> *holders = urlsCurrentlyHeld[urlStr];
|
|
|
|
|
Q_ASSERT( holders );
|
|
|
|
|
holders->removeRef( lister );
|
|
|
|
|
//Q_ASSERT( holders );
|
|
|
|
|
if ( holders )
|
|
|
|
|
{
|
|
|
|
|
holders->removeRef( lister );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// remove the dir from lister->d->lstDirs so that it doesn't contain things
|
|
|
|
|
// that itemsInUse doesn't. When emitting the canceled signals lstDirs must
|
|
|
|
@ -457,9 +460,8 @@ void KDirListerCache::forgetDirs( KDirLister *lister, const KURL& _url, bool not
|
|
|
|
|
lister->d->lstDirs.remove( lister->d->lstDirs.find( url ) );
|
|
|
|
|
|
|
|
|
|
DirItem *item = itemsInUse[urlStr];
|
|
|
|
|
Q_ASSERT( item );
|
|
|
|
|
|
|
|
|
|
if ( holders->isEmpty() )
|
|
|
|
|
if ( holders && holders->isEmpty() )
|
|
|
|
|
{
|
|
|
|
|
urlsCurrentlyHeld.remove( urlStr ); // this deletes the (empty) holders list
|
|
|
|
|
if ( !urlsCurrentlyListed[urlStr] )
|
|
|
|
@ -486,7 +488,7 @@ void KDirListerCache::forgetDirs( KDirLister *lister, const KURL& _url, bool not
|
|
|
|
|
if ( notify )
|
|
|
|
|
emit lister->clear( url );
|
|
|
|
|
|
|
|
|
|
if ( item->complete )
|
|
|
|
|
if ( item && item->complete )
|
|
|
|
|
{
|
|
|
|
|
kdDebug(7004) << k_funcinfo << lister << " item moved into cache: " << url << endl;
|
|
|
|
|
itemsCached.insert( urlStr, item ); // TODO: may return false!!
|
|
|
|
|