On Thursday, 2013-06-20, Pali Rohár wrote:
> On Thursday 20 June 2013 10:47:27 Jan Kundrát wrote:
> > On Wednesday, 19 June 2013 10:28:09 CEST, Pali Rohár wrote:
> > >     AddressbookInterface(QObject * parent) : QObject(parent)
> > >     {} virtual ~AddressbookInterface() {}
> > 
> > I wouldn't make these inline, but in the .cpp file. Perhaps
> > it's not needed for QObject, but the destructor is typically
> > the first virtual function being defined, and it is often
> > used for RTTI purposes (dynamic_cast etc). This is probably a
> > huge oversimplification, but the lesson I've learned is that
> > virtual destructors shall never be inlined.
> 
> Moving function outside *.h file could be problem, because this is
> interface for plugins...

Ah, but the AddressbookInterface class is no longer the plugin interface :)

> > I don't see a point in having a *private* static method
> > available in the public header of a plugin interface. Please
> > remove this from the plugin API -- perhaps into some utility
> > class.
> 
> Kevin suggested that this method can be usefull for plugins. So
> then it is needed to be stored somewhere from plugins can call it
> (plugins do not have pointer to some window/util objects). But I
> think that this method is too small and plugins can copy paste it
> if they really need it.

I had suggested a static method (but private does indeed not make sense) 
because it is the easiest way to share between plugin implementations in order 
to ensure consistent output.
Of course a helper class or namespace would work as well.

Cheers,
Kevin
-- 
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to