[Development] Container refactor update

Jedrzej Nowacki jedrzej.nowacki at nokia.com
Wed Jun 20 12:46:08 CEST 2012


On Wednesday 20. June 2012 11.25.28 ext Peter Kümmel wrote:
> On 20.06.2012 11:09, Olivier Goffart wrote:
> >> static const char qt_meta_stringdata_Foo<int>[] = {
> >> 
> >>       "Foo<int>\0\0t\0asignal(int)\0"
> >> 
> >> };
> > 
> > That's because you are looking at Qt4.
> > In Qt5 it is could be something more like  "Foo<T>\0asignal\0\0T\0t\0"
> > 
> > And you can connect using the new pointer function syntax.
> > And some little changes would be required to the other syntax for it to
> > work, but it should be possible  (as now, the "signature" of the signal
> > is only reconstructed at runtime)
> > 
> > Foo<int>  foo;
> > connect(&foo,&Foo<int>::asignal, this,&Bar::setInt);
> > connect(&foo, SIGNAL(signal(int)), this, SLOT(setInt(int)));
> 
> OK, connection would work. But what I mean is, from the meta type
> perspective Foo<int> and Foo<double> would have the same meta type.
> Therefore the idea to use specialization, then you could define
> qt_meta_stringdata_Foo for each type.
> 
> Peter

Just a side note. From c++ and qt meta type perspective Foo<int> and 
Foo<double> are unrelated and completely different types. 

Jędrek
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20120620/fdcb19c4/attachment.html>


More information about the Development mailing list