[patch] remove IProjectController::findProjectByName

David Nolden zwabel at googlemail.com
Thu Nov 13 10:47:45 UTC 2008


Am Donnerstag, 13. November 2008 10:44:45 schrieb Manuel Breugelmans:
> This findProjectByName method is flawed because it is perfectly legal to
> have multiple projects with the same name. Right now it retrieves the first
> project with this name in it's internal data structure, ie undefined
> behavior.
>
> The method is only used in the buildsetmodel. I didn't actually check but
> I'm pretty sure the buildset will act weird with multiple identically named
> projects.
>
> Attached patch removes this method from the API. It also fixes the buildset
> by storing the project root URL for every item.

Umm, do you really think it makes sense to have multiple projects with the 
same name open? Not only could it create a lot of confusion, but it may also 
make programming harder in some cases. You would have to use urls to identify 
projects, which breaks if the directory is moved.

What about just not allowing to load multiple projects of the same name?

Greetings, David




More information about the KDevelop-devel mailing list