[Patch] fro kdelibs/kdecore

Thomas Braxton brax108 at cox.net
Thu Oct 20 08:27:32 BST 2005


On Thursday 20 October 2005 01:52 am, Nicolas Goutte wrote:
> On Thursday 20 October 2005 08:01, Thomas Braxton wrote:
> > On Thursday 20 October 2005 12:51 am, Thiago Macieira wrote:
> > > Thiago Macieira wrote:
> > > >Christian Ehrlicher wrote:
> > > >>Here a patch to compile kdecore/kdelibs with msvc.net
> > > >>- change some 'class Private' to 'struct Private' because the private
> > > >>vars are defined in a struct and not a class
> > > >
> > > >This doesn't make sense. Why should they be moved to a struct?
> > >
> > > Oops, never mind. I've just noticed that the .cpp in trunk changed:
> > > 	class KAboutDataPrivate
> > > to
> > > 	struct KAboutData::Private
> > >
> > > The .cpp should be changed to class and a public: be added. Everything
> > > else uses "class".
> >
> > If I remember correctly in C++ a struct is just a class that defaults to
> > public access, instead of private access. At least this is how g++ treats
> > them.
>
> But in a struct you cannot have member functions, not even a constructor
> and a destructor (as far as I know).
>
> So personally I would prefer a "class" solution (which KDE always used
> until it was changed in kdelibs, apparently for MSVC-support).
>
> Have a nice day!
In C++, yes you can. The only difference is the default access. Look in 
klibloader.cpp KLibLoader::Private.
But, if MSVC needs it otherwise, I'm not arguing against changing it.




More information about the kde-core-devel mailing list