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