[Development] Container refactor update

Thiago Macieira thiago.macieira at intel.com
Wed Jun 20 13:38:48 CEST 2012


On quarta-feira, 20 de junho de 2012 13.09.40, Peter Kümmel wrote:
> On 20.06.2012 12:31, Thiago Macieira wrote:
> > On quarta-feira, 20 de junho de 2012 10.47.01, Peter Kümmel wrote:
> >> When Foo<int>  is used, we would need the meta type information
> >> with 'int' not with T:
> >> 
> >> static const char qt_meta_stringdata_Foo<int>[] = {
> >> 
> >>       "Foo<int>\0\0t\0asignal(int)\0"
> >> 
> >> };
> > 
> > Who generates this?
> 
> moc, we simply tell it for which types it should generate it.
> This was the idea for "Q_QOBJECT_SPECIALISATION(int)"

Please tell me what it should generate for these classes then:

template <typename T> class Foo
{
    Q_OBJECT
signals:
    void asignal(typename std::make_unsigned<T>::type)
    void othersignal(typename std::remove_reference<T>::type &)
};

template <typename T> class Foo<T *>
{
    Q_OBJECT
signals:
    void ptrsignal(T);
};

template <int Size> class Bar
{
    Q_OBJECT
signals:
    void asignal(typename QIntegerForSize<Size>::Unsigned);
};

Note that I can make this as complex as you can ask.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center
     Intel Sweden AB - Registration Number: 556189-6027
     Knarrarnäsgatan 15, 164 40 Kista, Stockholm, Sweden
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/development/attachments/20120620/73933d1c/attachment.sig>


More information about the Development mailing list