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

dukju ahn dukjuahn at gmail.com
Sun May 20 04:34:26 UTC 2007


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.

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

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

>  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 need for a constructor, nothing should be allowed to
>   create an IOutputViewItem (at the moment).

There are still two pure virtual methods in IOutputViewItem.
Nobody can construct IOutputView directly due to these pure virtuals

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




More information about the KDevelop-devel mailing list