aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Snow <jsnow@redhat.com>2025-03-10 23:42:14 -0400
committerMarkus Armbruster <armbru@redhat.com>2025-03-11 10:10:56 +0100
commit3d9a23f92f35afd16dfa5aaf52ede850de54560c (patch)
treec4b4cfb35d82f779201d252121f04d8feb93c006
parent618379701b4127877d858aa6a792c8a329ec48bc (diff)
downloadqemu-3d9a23f92f35afd16dfa5aaf52ede850de54560c.zip
qemu-3d9a23f92f35afd16dfa5aaf52ede850de54560c.tar.gz
qemu-3d9a23f92f35afd16dfa5aaf52ede850de54560c.tar.bz2
docs/qapi-domain: add "Features:" field lists
Add support for Features field lists. There is no QAPI-specific functionality here, but this could be changed if desired (if we wanted the feature names to link somewhere, for instance.) This feature list doesn't have any restrictions, so it can be used to document object-wide features or per-member features as deemed appropriate. It's essentially free-form text. The syntax for this field is: :feat name: description description cont'd Signed-off-by: John Snow <jsnow@redhat.com> Message-ID: <20250311034303.75779-17-jsnow@redhat.com> Acked-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
-rw-r--r--docs/sphinx/qapi_domain.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/docs/sphinx/qapi_domain.py b/docs/sphinx/qapi_domain.py
index b4289db..8ec4482 100644
--- a/docs/sphinx/qapi_domain.py
+++ b/docs/sphinx/qapi_domain.py
@@ -33,7 +33,7 @@ from sphinx.domains import (
from sphinx.locale import _, __
from sphinx.roles import XRefRole
from sphinx.util import logging
-from sphinx.util.docfields import TypedField
+from sphinx.util.docfields import GroupedField, TypedField
from sphinx.util.nodes import make_id, make_refnode
@@ -220,6 +220,16 @@ class QAPIObject(QAPIDescription):
}
)
+ doc_field_types = [
+ # :feat name: descr
+ GroupedField(
+ "feature",
+ label=_("Features"),
+ names=("feat",),
+ can_collapse=False,
+ ),
+ ]
+
def get_signature_prefix(self) -> List[nodes.Node]:
"""Return a prefix to put before the object name in the signature."""
assert self.objtype