[Development] Wishes for C++ standard or compilers
Olivier Goffart
olivier at woboq.com
Mon Mar 20 08:20:33 CET 2017
On Sonntag, 19. März 2017 19:51:47 CET Thiago Macieira wrote:
> On domingo, 19 de março de 2017 02:24:56 PDT Olivier Goffart wrote:
> > But because QMetaType was historically made for QueuedConnection, it needs
> > the name, and so needs to be declared or registered with
> > Q_DECLARE_METATYPE/ qRegisterMetaType. But the truth is that we could get
> > rid of both already with what C++98. moc could generate the code that
> > register the name for the signal arguments (it already does for some type,
> > but that could be extended to all types). QMetaTypeid::name() would not
> > work for every type but that's not so important.
>
> The name is necessary for compatiblity iwth other languages.
Can you elaborate?
In QtScript or QtQml, the name is only used for error message, or for
compatibility before the QMetaObject was in the QMetaType.
Types that can be used directly needs to be registered with functions such as
qmlRegisterMetaType
I see many use in QtDBus but I suppose if it falls in the category of types
used for signals and slot which could be registered by moc.
--
Olivier
Woboq - Qt services and support - https://woboq.com - https://code.woboq.org
More information about the Development
mailing list