KDE/kdelibs/kio
    Benjamin Meyer 
    ben at meyerhome.net
       
    Wed Oct 11 21:03:26 BST 2006
    
    
  
On Tuesday 26 September 2006 3:36 pm, David Faure wrote:
> SVN commit 588613 by dfaure:
>
> KDirModel, a directory model for KIO-based directory listings.
>  Handles files being created, modified and deleted at runtime.
>  With unit tests and a gui test program (which creates QListViews and a
> QTreeView to test it) The model has been tested with 10000 subdirs and the
> branch opens as fast as it did in kde3 times.
I like how you have canFetchMore only return true if it is a dir and 0 count.  
I have a flag in my own model, but like you said in the comment, the common 
case is not an empty directory.   Worst case would be a directory that is 
empty that is viewed in a tree and the user constantly is opening and closing 
it.  Hmmm unless someone did
while(canFetchMore(parent))
	fetchMore(parent);
One thing is that there is already a list of dirs that is being watched by the 
kdirlister.  If there was a function to determine if a directory has already 
been added to that canFetchMore could return false and you wouldn't need to 
have a bool populated flag.
-Benjamin Meyer
-- 
aka icefox
Public Key: http://www.icefox.net/public_key.asc
    
    
More information about the kde-core-devel
mailing list