aboutsummaryrefslogtreecommitdiff
path: root/qapi
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2021-08-04 12:31:01 +0400
committerMarkus Armbruster <armbru@redhat.com>2021-08-26 13:53:56 +0200
commit5d83b9a130690f879d5f33e991beabe69cb88bc8 (patch)
treeec68563193b1bbaafb4614a08e15845d33f8d7d9 /qapi
parentd806f89f87152def5f422e946c84948831615236 (diff)
qapi: replace if condition list with dict {'all': [...]}
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 <marcandre.lureau@redhat.com> Message-Id: <20210804083105.97531-7-marcandre.lureau@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> [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 <armbru@redhat.com>
Diffstat (limited to 'qapi')
-rw-r--r--qapi/ui.json6
1 files changed, 4 insertions, 2 deletions
diff --git a/qapi/ui.json b/qapi/ui.json
index fd9677d48e..aed2bec4ab 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)' ] } }
}
}