[KPhotoAlbum] Very experimental image-grouping patch

Paul Fleischer paul at xpg.dk
Wed Nov 28 23:11:12 GMT 2007


2007/11/28, Tero Tilus <tero at tilus.net>:
[snip]
> images = loadImagesFromXML();
> parent_cache = new imageList();
> foreach img in images {
>   if( images->parent() != null ) {
>     if ( ! parent = parent_cache->get(img->parent()) ) {
>       parent = DB::ImageDB::instance()->info( img->parent() );
>       parent_cache->add(parent);
>     }
>     parent->addChildImage(img->fileName());
>   }
> }

I might be wrong here, but doesn't ImageDB::info() do exactly this?

/Paul



More information about the Kphotoalbum mailing list