[Development] QMetaTypeId and QMetaTypeId2
Stephen Kelly
stephen.kelly at kdab.com
Thu Feb 9 12:39:54 CET 2012
On Thursday, February 09, 2012 10:07:16 Jedrzej Nowacki wrote:
> Hi,
>
> Does anybody know why we have separation between QMetaTypeId and
> QMetaTypeId2 classes?
>
> QMetaTypeId2 delegates all operations to QMetaTypeId by default and
> qMetaTypeId() function is calling QMetaTypeId2. To make it more complex
> Q_DECLARE_METATYPE is specializing QMetaTypeId but
> Q_DECLARE_BUILTIN_METATYPE is specializing QMetTypeId2. From an user
> perspective it is not visible, but it makes implementation complex.
>
> Can I merge QMetaTypeId and QMetaTypeId2?
I always thought they were split so that Qt could add new built-in metatypes
without breaking user code.
Eg, if you merge them, any user code doing:
Q_DECLARE_METATYPE(QModelIndex)
will no longer compile until that line is removed (It is a built-in metatype
now).
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 --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20120209/a2e87eef/attachment.html>
-------------- 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/20120209/a2e87eef/attachment.sig>
More information about the Development
mailing list