[Qt5-feedback] Make some undocumented features documented

Peter Kümmel syntheticpp at gmx.net
Thu May 26 20:54:42 CEST 2011


On 25.05.2011 23:10, Thiago Macieira wrote:
> 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; });
>

Nice, inline-defined slots.

> Unless you're a friend of SenderClass.
>

It should be possible to inherit on-the-fly from the signaling class
so you could still have protected signals.

I hope I find the time to polish a several year old macro/template based
type-checking connect. Is this list the right place to post it?

Peter




More information about the Qt5-feedback mailing list