projectmanager interface

Aleix Pol aleixpol at kde.org
Fri Dec 26 19:36:29 UTC 2008


On Fri, Dec 26, 2008 at 5:19 AM, Matt Rogers <mattr at kde.org> wrote:

> 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.

Maybe the name is wrong?
By now the file is deleted by the projectmanagerview though, not by the
plugin. the plugin just makes sure that the change is coherent with the
call.


>
>
> > - 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)

These files won't be added to a target but to a folder.

It doesn't really make sense to me to have to add the file first to a parent
and then reparent it to another one.


>
> > - 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.

Sorry.
we have addFile, addFolder but createTarget. Why not addTarget?


>
>
> > - 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?

why don't we have addItem(ProjectBaseItem*) instead of every addFile,
Folder, Target.



>
>
> > - 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? :)

sorry, i meant buildsys instead of builddir.

>
>
> >
> > night guys!
> > merry xmass everyone! bon nadal!
> >
> > Aleix
>
> --
> Matt
>
> _______________________________________________
> KDevelop-devel mailing list
> KDevelop-devel at kdevelop.org
> https://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20081226/5ba1da8e/attachment.html>


More information about the KDevelop-devel mailing list