[Development] Fixing connecting to private signals

Stephen Kelly stephen.kelly at kdab.com
Fri Jul 13 11:51:07 CEST 2012


On Friday, July 13, 2012 09:30:44 Thiago Macieira wrote:
> On sexta-feira, 13 de julho de 2012 08.33.42, Girish Ramakrishnan wrote:
> > Hi,
> > 
> > On Wed, Jul 11, 2012 at 10:40 PM, Olivier Goffart <olivier at woboq.com> 
wrote:
> > > On Wednesday 11 July 2012 18:50:15 Stephen Kelly wrote:
> > >> So, either the code should stay as is - leaving the signals
> > >> private and making function pointer connects not work, or the
> > >> patches should be applied, making function pointer connects work.
> > >> 
> > >> Making the signals public is not an option for me.
> > > 
> > > I personally beleive allowing the new syntax is more important than
> > > keeping
> > > those signal private.
> > > Anyway, i'm quite happy with the current implementation in moc.
> > 
> > Is this really important given that we are in feature freeze? Changes
> > to moc, however small, is not advisable at all.
> 
> As I wrote in the change, this breaks if there are overloads to the signal:
> 
> signals:
>     void somethingChanged();
>     void somethingChanged(int, QPrivateSignal);
> 
> You can't connect to the private signal because the type QPrivateSignal is
> private.

I added some unit tests for this case:

https://codereview.qt-project.org/30762

Thanks,

-- 
Stephen Kelly <stephen.kelly at kdab.com> | Software Engineer
KDAB (Deutschland) GmbH & Co.KG, a KDAB Group Company
www.kdab.com || Germany +49-30-521325470 || Sweden (HQ) +46-563-540090
KDAB - Qt Experts - Platform-Independent Software Solutions
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/development/attachments/20120713/210d6136/attachment.sig>


More information about the Development mailing list