KDE/kdevplatform/language/duchain

Milian Wolff mail at milianw.de
Mon Feb 16 16:27:34 UTC 2009


On Monday 16 February 2009, Andreas Pakulat wrote:
> On 16.02.09 14:50:12, Milian Wolff wrote:
> > SVN commit 927003 by mwolff:
> >
> > make isConstructor and isDestructor virtual since the current
> > implementation is cpp specific and needs to be adapted e.g. for PHP
> >
> >  M  +2 -2      classfunctiondeclaration.h
> >
> >
> > --- trunk/KDE/kdevplatform/language/duchain/classfunctiondeclaration.h
> > #927002:927003 @@ -90,8 +90,8 @@
> >    bool isFinal() const;
> >    void setIsFinal(bool);
> >
> > -  bool isConstructor() const;
> > -  bool isDestructor() const;
> > +  virtual bool isConstructor() const;
> > +  virtual bool isDestructor() const;
>
> Looking at the implementation of the constructor and even more so the
> destructor variant of these two I wonder wether they should do anything at
> all by default. The current implementation in duchain only works for C++
> (well, the constructor also works for java by accident), but all other
> languages I've used have totally different ways of identifying constructors
> and destructors (if they even have any). So maybe by the default these
> should return false and the languages should provide their own
> implementation?

I thought so as well, but just didn't want to change the cpp plugin.


-- 
Milian Wolff
mail at milianw.de
http://milianw.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20090216/c688bf67/attachment.sig>


More information about the KDevelop-devel mailing list