[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdelibs/kio/kio
From:       Waldo Bastian <bastian () kde ! org>
Date:       2004-03-02 16:20:10
Message-ID: 20040302162010.2803F990E () office ! kde ! org
[Download RAW message or body]

CVS commit by waba: 

Adjust the timing of the clear() signal a bit so that it
gets emitted *before* items are actually being deleted. (BR74946)


  M +5 -3      kdirlister.cpp   1.172


--- kdelibs/kio/kio/kdirlister.cpp  #1.171:1.172
@@ -410,4 +410,5 @@ void KDirListerCache::forgetDirs( KDirLi
   kdDebug(7004) << k_funcinfo << lister << endl;
 
+  emit lister->clear();
   // clear lister->d->lstDirs before calling forgetDirs(), so that
   // it doesn't contain things that itemsInUse doesn't. When emitting
@@ -422,6 +423,4 @@ void KDirListerCache::forgetDirs( KDirLi
     forgetDirs( lister, *it, false );
   }
-
-  emit lister->clear();
 }
 
@@ -1457,9 +1456,12 @@ void KDirListerCache::deleteDir( const K
           {
             bool treeview = kdl->d->lstDirs.count() > 1;
+            if ( !treeview )
+            {
+              emit kdl->clear();
+            }
             forgetDirs( kdl, deletedUrl, treeview );
             if ( !treeview )
             {
               kdl->d->lstDirs.clear();
-              emit kdl->clear();
             }
           }


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic