projectmanager interface

Matt Rogers mattr at kde.org
Fri Dec 26 04:19:26 UTC 2008


On Wednesday 24 December 2008 07:35:17 pm Aleix Pol wrote:
> hi,
> I've been checking the project modification interface and there are some
> things that look a bit strange.
>
> - why do we need the removeFileFromTarget when we have a removeFile? we can
> check if it is from an item using
> dynamic_cast<ProjectTargetItem*>(it->parent()).

What happens if you want to remove a file from a target and move it to another 
target? That was the use-case that removeFileFromTarget was intended for. If 
removeFile is a destructive action (i.e. the file gets deleted) then this is  
still needed. It also makes the operation explicit in terms of API. 

> - why do we have addFileToTarget and addFile(toFolder)? and the target case
> has a ProjectFileItem as a parameter instead of a KUrl :S

because the addFile call is expected to take place before the addFileToTarget 
call. You can have files in the project file structure and not have them be 
part of the target (think README, TODO, and HACKING files)

> - why do we add everything but targets that are created? because they're
> not in the FS? :S

This question doesn't make sense to me. 

> - why don't we just merge these methods that just pass the same and we pass
> a ProjectBaseItem as the parent?

I also don't understand this question. Could you be more explicit?

> - create target should change. We should tell the builddir if we want to
> create a lib target or an executable target.

Why are we telling the builddir anything? We should be telling the build 
system manager what type is. Got a patch? :)

>
> night guys!
> merry xmass everyone! bon nadal!
>
> Aleix

-- 
Matt




More information about the KDevelop-devel mailing list