On Thursday 11 October 2012 23:06:18 Thiago Macieira wrote:
> On sexta-feira, 12 de outubro de 2012 07.27.51, Marc Mutz wrote:
> > Hi,
> > 
> > I was wondering whether we should stop using the pattern of declaring
> > _q_privateSlots() in favour of connecting to functors or functions
> > directly.
> Makes sense, except that it's of inconvenient use:
>  - lambdas: can't use in Qt code
>  - functors: inconvenient (need to be out of the class)
>  - static member or free functions: will not have access to the target
> object - private member functions: disallowed by Qt coding guidelines


That is indeed a problem: it is not possible to connect to member function of 
a QObjectPrivate, only QObject.

One could add an overload  (or even a QObjectPrivate::connect) that connect to 
a QObjectPrivate function.
>From the implementation point of view  it is just a matter of adding a 
QPrivateSlotObject inhartiting from QSlotBase.

-- 
Olivier

Woboq - Qt services and support - http://woboq.com


_______________________________________________
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to