ProjectItem vs. ProjectFolderItem

Aleix aleixpol at gmail.com
Sun Sep 30 14:47:55 UTC 2007


Well, we could just use the setProjectProperty method to pass the project
name as well.

Aleix

On 9/30/07, Andreas Pakulat <apaku at gmx.de> wrote:
>
> On 30.09.07 09:03:28, Matt Rogers wrote:
> > On Sunday 30 September 2007 04:51:02 am Andreas Pakulat wrote:
> > > Hi,
> > >
> > > as Aleix pointed out its currently quite ugly to create custom
> > > ProjectItem's for your buildmanager. The reason is that you'd have to
> > > subclass KDevelop::ProjectItem+<custom folder item> resulting in this:
> > >
> > > class QMakeProjectItem : public ProjectItem, QMakeFolderItem
> > > {
> > > };
> > >
> > > The reason why this is ugly because the inheritance graph for this is
> > > now:
> > >
> > >              ProjectFolderItem
> > >
> > >           ----------+-------------
> > >
> > >    QMakeFolderItem         ProjectItem
> > >
> > >           ----------+-------------
> > >
> > >              QMakeProjectItem
> > >
> > > (not 100% correct, I left out the ProjectBuildFolderItem)
> > >
> > > So we have that dreaded diamond-shape inheritance :(
> > >
> >
> > Why do we have ProjectItem to begin with? Is there some reason we can't
> just
> > add an isProjectRoot() function to ProjectFolderItem?
>
> See Aleix answer, the reason is currently that for a project item the
> text in the view is the projects name instead of the path of the folder
> like for normal folder items.
>
> So we could do what you propose, but in that case setProjectRoot( bool )
> would do a setText( project()->name() ) behind the scenes. If thats ok,
> then yes thats a good solution of the problem.
>
> Andreas
>
> --
> Another good night not to sleep in a eucalyptus tree.
>
> _______________________________________________
> 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/20070930/c87cc88f/attachment.html>


More information about the KDevelop-devel mailing list