From 01b2ffcedd94ad7b42bc870e4c6936c87ad03429 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Wed, 7 Jun 2017 20:35:58 +0400 Subject: qapi: merge QInt and QFloat in QNum MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We would like to use a same QObject type to represent numbers, whether they are int, uint, or floats. Getters will allow some compatibility between the various types if the number fits other representations. Add a few more tests while at it. Signed-off-by: Marc-André Lureau Message-Id: <20170607163635.17635-7-marcandre.lureau@redhat.com> Reviewed-by: Markus Armbruster [parse_stats_intervals() simplified a bit, comment in test_visitor_in_int_overflow() tidied up, suppress bogus warnings] Signed-off-by: Markus Armbruster --- ui/spice-core.c | 1 - ui/vnc-enc-tight.c | 1 - 2 files changed, 2 deletions(-) (limited to 'ui') diff --git a/ui/spice-core.c b/ui/spice-core.c index a087ad5da9..7519965f75 100644 --- a/ui/spice-core.c +++ b/ui/spice-core.c @@ -30,7 +30,6 @@ #include "qemu-x509.h" #include "qemu/sockets.h" #include "qmp-commands.h" -#include "qapi/qmp/qint.h" #include "qapi/qmp/qbool.h" #include "qapi/qmp/qstring.h" #include "qapi/qmp/qjson.h" diff --git a/ui/vnc-enc-tight.c b/ui/vnc-enc-tight.c index 1e53b1cf84..89ab12c0d8 100644 --- a/ui/vnc-enc-tight.c +++ b/ui/vnc-enc-tight.c @@ -44,7 +44,6 @@ #endif #include "qemu/bswap.h" -#include "qapi/qmp/qint.h" #include "vnc.h" #include "vnc-enc-tight.h" #include "vnc-palette.h" -- cgit v1.2.1 From ad664c1d4c731c8320fb9008125fa93069a6315f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Wed, 7 Jun 2017 20:36:32 +0400 Subject: console: use get_uint() for "head" property MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit TYPE_QEMU_CONSOLE property "head" is defined with object_property_add_uint*_ptr(). Signed-off-by: Marc-André Lureau Message-Id: <20170607163635.17635-41-marcandre.lureau@redhat.com> Signed-off-by: Markus Armbruster --- ui/console.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ui') diff --git a/ui/console.c b/ui/console.c index d914cced53..40572c9254 100644 --- a/ui/console.c +++ b/ui/console.c @@ -1872,8 +1872,8 @@ QemuConsole *qemu_console_lookup_by_device(DeviceState *dev, uint32_t head) if (DEVICE(obj) != dev) { continue; } - h = object_property_get_int(OBJECT(consoles[i]), - "head", &error_abort); + h = object_property_get_uint(OBJECT(consoles[i]), + "head", &error_abort); if (h != head) { continue; } -- cgit v1.2.1