class Private or FooPrivate?

Inge Wallin inge at lysator.liu.se
Mon Jun 24 03:22:05 BST 2013


On Sunday, June 23, 2013 22:20:59 Boudewijn Rempt wrote:
> On Sunday 23 June 2013 Jun 21:30:38 Kevin Krammer wrote:
> > On Sunday, 2013-06-23, Inge Wallin wrote:
> > > I got a comment from Zagge in a review request lately about naming of
> > > the
> > > private class.  So I did a little investigation and there is a mix of
> > > two
> > > styles:  class Private (i.e. Foo::Private) and class FooPrivate.
> > 
> > Sometimes the latter is used because the developer in question wanted to
> > use Q_DECLARE_PRIVATE and related access macros.
> > Doesn't have to be the case in the Calligra code base, just a general
> > observation :)
> 
> That's probably the case here, actually.
> 
> Going forward, I rather like the suggestions in
> http://ivan.fomentgroup.org/blog/2013/06/22/d-ptr-the-modern-way/

Yes, that is very clean.  I've seen a number of commits with the comment "fix 
memory leak" which just added a "delete d" in the destructor. This way would 
make all that unnecessary.

Is it portable to Windows and MacOS X too?  And ARM?

	-Inge




More information about the calligra-devel mailing list