> You can be sure that the conversion from QList<int> to
QSequentialIterable
> will be successful, but the other way around is not given.
QSequentialIterable
> can contain QVariants of different types. I'm curious what is the use
case for
> the feature?

Imagine one could call a Q_INVOKABLE or a slot given QJsonDocument. The
approach is to get parameter type ids, to make deserializations into
QVariant instances and to invoke.
This becomes non-trivial for container types of arbitary element types.

> I think it could be implemented by extending:
> https://code.woboq.org/qt5/qtbase/src/corelib/kernel/qmetatype.h.html#2306
> which registers conversion from a container to QSequentialIterable. You
could
> add the opposite function. That way no binary compatibility would be
broken
> nor major re-factoring would be needed.

That's right. This solution works exactly like you suggest
https://github.com/Skycoder42/QtJsonSerializer . I am seeking for a way of
eliminating a need of registering types and converters.

> Sure, try, you can add me to review :-)

Great! Thanks!
_______________________________________________
Development mailing list
Development@qt-project.org
https://lists.qt-project.org/listinfo/development

Reply via email to