[apaku at gmx.de: Re: KDE/kdevelop/lib]

Andreas Pakulat apaku at gmx.de
Sun May 20 11:33:52 UTC 2007


On 20.05.07 00:34:26, dukju ahn wrote:
> 2007/5/19, Andreas Pakulat <apaku at gmx.de>:
> > I guess you didn't subscribe yourself to kde-commits for kdevelop trunk
> > yet, right? It would really help if you could set up a commitfilter
> 
> I guess I should subscribe that soon.

Yes please.

> > On 19.05.07 08:14:34, Dukju Ahn wrote:
> > > SVN commit 666233 by dukjuahn:
> > >
> > > Implemented outputview filtering.
> > >
> > > Components who want to hookup special action into outputview item
> > > or who want to paint their output string with special apprearance(font/color)
> > > will now register their own outputview item factory. This factory will
> > > create customized item for outputview.
> >
> > A few notes:
> >
> > - why is there a default implementation? If there's no factory use
> >   standard items, that way we don't need a library for this stuff
> 
> That's for convenience. And I though the library is necessary anyway.
> See below.

What convenience? Who could use that default implementation?

> > - why is there a constructor in IOutputViewItem?
> 
> The constructor is needed because it calls QStdItem()'s constructor.
> Every item the outputview use are QStditem's child so QStdItem()
> constructor should be called inside IOutputViewItem() constructor.
> The children of IOutputViewItem() cannot call QStdItem() directly
> because its not a direct child of QStdItem.

Not every item in the outputview needs to be a child of QStandardItem,
QStandardItem can also be used directly.

> >  It can be a plain interface,
> 
> I doubt. It is different from our usual extensions. Take IMakeBuilder
> for example. IMakeBuilder itself is TOP class so there is no need
> to call its base class. OTHO, IOutputViewItem is child of QStdItem so
> it should call QStdItem()

No, we need just an interface with 2 methods, activate() and
contextMenuActions(). This interface doesn't need to subclass from
QStandardItem, instead the custom item classes can subclass from
QStandardItem and this interface. The outputview can check by
dynamic_casting the activated item for this interface.

> > - for types use an enum, not defines and don't use an int return type,
> >   use the enum type. We're in C++ land so we want proper types.
> > - what is type() needed for anyway?
> 
> int type() is a member method of QStdItem. For user-specific subclass
> Qt-doc says that reimplement this.

Well, see above, we don't need a subclass - IMHO.

Andreas

-- 
You are standing on my toes.




More information about the KDevelop-devel mailing list