[Ksecretservice-devel] KSecretsService : client API review request

Olivier Goffart ogoffart at kde.org
Thu Aug 4 15:31:09 UTC 2011


On Thursday 04 August 2011 16:38:11 Valentin Rusu wrote:
> Hello Olivier,
> 
> Thanks for the review!
> 
> On 08/03/2011 11:10 AM, Olivier Goffart wrote:
> 
> [snip] All suggestions taken into account
> 
> > Why are the private class not in the namespace?
> 
> They are private so adding them into the namespace is useless in opinion.

Then some other library could use the private name in the global namespace, 
and there would be conflict.  It is the point of namespace, to separate 
everything.

> > In general, we use QSharedData/QExplicitlySharedDataPointer for the d.
> > QSharedPointer is a bit more expensive. But that is an imlementation
> > detail.
> 
> Some of my Private classes must be QObjects to enable slots on them.
> These are internally used by the QDBusPendingCallWatchers.
> QSharedDataPointer require QShareData parent, and that's not a QObject.
> Hence, I'm forced to use QSharedPointer instead.

You can use double inheritance.

> > What i wonder is why is there so many public constructors that take the
> > private as argument
> 
> Because of the DBus internal stuff. Using private structs in constructor
> allow me to hide away things like QDBusPaths.
> 
> Cheers,
> Valentin


More information about the Ksecretservice-devel mailing list