--+HP7ph2BbKc20aGI Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Maybe it's just too late (and I'm going to bed after sending this) but I just can't figure out what in the heck this code is supposed to do. Normally I'd ask the original author, but they dropped support for it (TheKompany's KDEStudio*) :-( As far as I can tell by how it's used, this routine is *supposed* to get a list of all libraries used by this project (to help in creating the Makefile.am). void Workspace::getAllLibrary( QStrList& list ) { if ( getType() =3D=3D SHARED_LIB || getType() =3D=3D STATIC_LIB ) list.a= ppend( name ); QStrList sub; wConfig->setGroup( configPath ); wConfig->readListEntry( "Group", sub ); for ( uint k =3D 0; k < sub.count(); k++ ) { Workspace* ws =3D new Workspace( this, sub.at( sub.count() - 1 - k) ); ws->getAllLibrary( list ); delete ws; } } How it's actually used: 1st layer mainWorkspace->getAllProjectLibrary( prjLib ); 2nd (in a .h) void getAllProjectLibrary( QStrList& list ){ getAllLibrary( list ); } 3rd is above Explanation of function calls and objects: wConfig is a KSimpleConfig object. "Group" seems to contain just the name of the "Project" (i.e., Project "Foo" with several shared libs and executables contained within it). getType() returns what kind of project=20 it is you're making, and in the case that I'm testing, is EXECUTABLE. My immediate question is: why create an object, call the same function, and then delete the object? AFAICT, that for loop is the only thing that *does* anything, and even at that, nothing important! Does anyone see someplace that an actual assignment might be taking place, that I'm missing? Recursion is fine, but there has to be results. My second is: why have the "middle" class? Why wouldn't they just go straight from the first layer to the third? Please note that I know you guys aren't mind-reading gods. I'm more interested in why someone would use a middle layer in the general case, than knowing exactly what was running though their heads in this case. But the recursion thing, *that* I expect you to know immediately *grin* Gah, I'm way too tired to be typing. Have a great night... D.A.Bishop *If somebody is seriously overmotivated, and they have a copy of the kdestudio source, I'm wandering around in studio/src/workspace/workspace.[cpp|h] --+HP7ph2BbKc20aGI Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE9fYwbEHLN/FXAbC0RAhDqAJ4uI7M4VxB002GVEcdZhoAXKlx3zgCfa3CI vTJH3xbEwXymYV+0p0p2c4Q= =adyM -----END PGP SIGNATURE----- --+HP7ph2BbKc20aGI-- >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<