From 5d83b9a130690f879d5f33e991beabe69cb88bc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Wed, 4 Aug 2021 12:31:01 +0400 Subject: qapi: replace if condition list with dict {'all': [...]} MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace the simple list sugar form with a recursive structure that will accept other operators in the following commits (all, any or not). Signed-off-by: Marc-André Lureau Message-Id: <20210804083105.97531-7-marcandre.lureau@redhat.com> Reviewed-by: Markus Armbruster [Accidental code motion undone. Degenerate :forms: comment dropped. Helper _check_if() moved. Error messages tweaked. ui.json updated. Accidental changes to qapi-schema-test.json dropped.] Signed-off-by: Markus Armbruster --- qapi/ui.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'qapi') diff --git a/qapi/ui.json b/qapi/ui.json index fd9677d..aed2bec 100644 --- a/qapi/ui.json +++ b/qapi/ui.json @@ -1136,7 +1136,8 @@ { 'name': 'gtk', 'if': 'defined(CONFIG_GTK)' }, { 'name': 'sdl', 'if': 'defined(CONFIG_SDL)' }, { 'name': 'egl-headless', - 'if': 'defined(CONFIG_OPENGL) && defined(CONFIG_GBM)' }, + 'if': { 'all': [ 'defined(CONFIG_OPENGL)', + 'defined(CONFIG_GBM)' ] } }, { 'name': 'curses', 'if': 'defined(CONFIG_CURSES)' }, { 'name': 'cocoa', 'if': 'defined(CONFIG_COCOA)' }, { 'name': 'spice-app', 'if': 'defined(CONFIG_SPICE)'} ] } @@ -1167,7 +1168,8 @@ 'gtk': { 'type': 'DisplayGTK', 'if': 'defined(CONFIG_GTK)' }, 'curses': { 'type': 'DisplayCurses', 'if': 'defined(CONFIG_CURSES)' }, 'egl-headless': { 'type': 'DisplayEGLHeadless', - 'if': 'defined(CONFIG_OPENGL) && defined(CONFIG_GBM)' } + 'if': { 'all': [ 'defined(CONFIG_OPENGL)', + 'defined(CONFIG_GBM)' ] } } } } -- cgit v1.1