[Qt5-feedback] Make some undocumented features documented

Thiago Macieira thiago at kde.org
Wed May 25 23:10:20 CEST 2011


On Wednesday, 25 de May de 2011 21:53:27 Peter Kümmel wrote:
> On 25.05.2011 06:35, Thiago Macieira wrote:
> > All signals are protected today. I already said it might change in Qt 5
> > so we can use C++0x-based connect statements.
> 
> Nice, sounds like a C++(C++0x) only connect with compile-time type checking.
> 
> Are there any concrete plans in this direction, or is it just a
> "all is possible in Qt5, show us code" statement?

Somewhat.

I do have some code I wrote that allows to do the compile-time argument 
checking and casting, as well as the delivery code. I know Olivier has been 
doing some experiments with connecting to regular function pointers. Put the 
two together and you've got C++0x connects.

This doesn't need to be in Qt 5.0, though.

However, the change of "signals" to public needs to. Otherwise, you cannot 
write:

	QObject::connect(sender, &SenderClass::signalName, 
		[](int i){ qDebug() << i; });

Unless you're a friend of SenderClass.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
  Senior Product Manager - Nokia, Qt Development Frameworks
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt.nokia.com/pipermail/qt5-feedback/attachments/20110525/140da991/attachment-0001.bin 


More information about the Qt5-feedback mailing list