[Development] Fixing connecting to private signals

Stephen Kelly stephen.kelly at kdab.com
Fri Jul 13 12:04:08 CEST 2012


On Friday, July 13, 2012 12:00:07 Thiago Macieira wrote:
> On sexta-feira, 13 de julho de 2012 11.51.07, Stephen Kelly wrote:
> > > 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
> 
> Why did the change have to be in Q_OBJECT? Couldn't it be done for this one
> class that requires private signals only?

3 classes require it - QAbstractItemModel, QAbstractTransition and 
QAbstractState. 

Initially I had it as a private struct in QAbstractItemModel, but ossi 
suggested to put it in QObject because moc needed knowledge of what it was 
called anyway. I agree with ossi on that.

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/813bccae/attachment.sig>


More information about the Development mailing list