[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: KParts API: thinking about the future (patch)
From:       Werner Trobin <trobin () kde ! org>
Date:       2002-03-04 10:44:57
[Download RAW message or body]

On Monday 04 March 2002 00:35, Martijn Klingens wrote:
> On Monday 04 March 2002 01:17, aleXXX wrote:

::snip::

> > class MyPartThingy:public KParts::ReadOnlyPart {
> > ...
> > public:
> >    virtual bool openStream() {return doOpenStream();}
> >    virtual bool writeStream(const QDataStream &s) {return
> > doWriteStream(s); } virtual bool closeStream() { return doCloseStream();
> > }
> > private:
> >    virtual bool doOpenStream() { return false; }
> >    virtual bool doWriteStream( const QDataStream& ) { return false; }
> >    virtual bool doCloseStream() { return false; }
> > ...
> > };
>
> After reading the above link you'd probably agree that public methods
> usually shouldn't be virtual. For me it was a definitive eye-opener.

Right, I agree 100% with the above said. Still, you shouldn't make the above 
public methods inline.

Ciao,
Werner
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic