<br><br><div class="gmail_quote">On Fri, Dec 26, 2008 at 5:19 AM, Matt Rogers <span dir="ltr"><<a href="mailto:mattr@kde.org">mattr@kde.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">On Wednesday 24 December 2008 07:35:17 pm Aleix Pol wrote:<br>
> hi,<br>
> I've been checking the project modification interface and there are some<br>
> things that look a bit strange.<br>
><br>
> - why do we need the removeFileFromTarget when we have a removeFile? we can<br>
> check if it is from an item using<br>
> dynamic_cast<ProjectTargetItem*>(it->parent()).<br>
<br>
</div>What happens if you want to remove a file from a target and move it to another<br>
target? That was the use-case that removeFileFromTarget was intended for. If<br>
removeFile is a destructive action (i.e. the file gets deleted) then this is<br>
still needed. It also makes the operation explicit in terms of API.</blockquote><div>Maybe the name is wrong?<br>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.<br>
 <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
<div class="Ih2E3d"><br>
> - why do we have addFileToTarget and addFile(toFolder)? and the target case<br>
> has a ProjectFileItem as a parameter instead of a KUrl :S<br>
<br>
</div>because the addFile call is expected to take place before the addFileToTarget<br>
call. You can have files in the project file structure and not have them be<br>
part of the target (think README, TODO, and HACKING files)</blockquote><div>These files won't be added to a target but to a folder.<br><br>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.<br>
<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
<div class="Ih2E3d"><br>
> - why do we add everything but targets that are created? because they're<br>
> not in the FS? :S<br>
<br>
</div>This question doesn't make sense to me.</blockquote><div>Sorry.<br>we have addFile, addFolder but createTarget. Why not addTarget?<br> <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
<div class="Ih2E3d"><br>
> - why don't we just merge these methods that just pass the same and we pass<br>
> a ProjectBaseItem as the parent?<br>
<br>
</div>I also don't understand this question. Could you be more explicit?</blockquote><div>why don't we have addItem(ProjectBaseItem*) instead of every addFile, Folder, Target.<br><br> <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
<div class="Ih2E3d"><br>
> - create target should change. We should tell the builddir if we want to<br>
> create a lib target or an executable target.<br>
<br>
</div>Why are we telling the builddir anything? We should be telling the build<br>
system manager what type is. Got a patch? :)</blockquote><div>sorry, i meant buildsys instead of builddir. <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
<div class="Ih2E3d"><br>
><br>
> night guys!<br>
> merry xmass everyone! bon nadal!<br>
><br>
> Aleix<br>
<br>
</div>--<br>
<font color="#888888">Matt<br>
</font><div><div></div><div class="Wj3C7c"><br>
_______________________________________________<br>
KDevelop-devel mailing list<br>
<a href="mailto:KDevelop-devel@kdevelop.org">KDevelop-devel@kdevelop.org</a><br>
<a href="https://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-devel" target="_blank">https://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-devel</a><br>
</div></div></blockquote></div><br>