On 09/30/2016 09:45 AM, Daniel P. Berrange wrote: > Currently the QObjectInputVisitor assumes that all scalar > values are directly represented as the final types declared > by the thing being visited. ie it assumes an 'int' is using > QInt, and a 'bool' is using QBool, etc. This is good when > QObjectInputVisitor is fed a QObject that came from a JSON > document on the QMP monitor, as it will strictly validate > correctness. > > To allow QObjectInputVisitor to be reused for visiting > a QObject originating from QemuOpts, an alternative mode > is needed where all the scalars types are represented as > QString and converted on the fly to the final desired > type. > > Reviewed-by: Kevin Wolf <kw...@redhat.com> > Reviewed-by: Marc-André Lureau <marcandre.lur...@redhat.com> > Signed-off-by: Daniel P. Berrange <berra...@redhat.com> > --- > include/qapi/qobject-input-visitor.h | 32 +++++- > qapi/qobject-input-visitor.c | 132 ++++++++++++++++++++++++ > tests/test-qobject-input-visitor.c | 194 > ++++++++++++++++++++++++++++++++++- > 3 files changed, 350 insertions(+), 8 deletions(-) >
Reviewed-by: Eric Blake <ebl...@redhat.com> -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature