On Mon, Sep 12, 2016 at 06:21:32PM +0200, Markus Armbruster wrote: > "Daniel P. Berrange" <berra...@redhat.com> writes: > > > Currently the QmpInputVisitor assumes that all scalar > > values are directly represented as their final types. > > ie it assumes an 'int' is using QInt, and a 'bool' is > > using QBool. > > > > This adds an alternative constructor for QmpInputVisitor > > that will set it up such that it expects a QString for > > all scalar types instead. > > > > This makes it possible to use QmpInputVisitor with a > > QDict produced from QemuOpts, where everything is in > > string format. > > > > Reviewed-by: Marc-André Lureau <marcandre.lur...@redhat.com> > > Signed-off-by: Daniel P. Berrange <berra...@redhat.com> > > Ignorant question: is this used by the next patch?
Yes indeed :-) We use the qdict_crumpl() method to turn the command line QemuOpts into a QDict, and then this new mode for QmpInputVisitor for the visiting this QDict, thus eliminating need to use OptsVisitor in QOM. Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|