summaryrefslogtreecommitdiff
path: root/doc/tools
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2017-10-21 13:53:59 +0200
committerRémi Verschelde <rverschelde@gmail.com>2017-10-21 13:53:59 +0200
commit2cd044e89bcf04a58216802b32d3264749acd6d1 (patch)
tree7a2a118179808cf81b3786ae4e170d3954d7adf9 /doc/tools
parentb302084395a6d7f3cc8e4102751ced29779f2ea2 (diff)
makerst: Add support for [member] and [signal]
Part of #11137. [enum] is still missing, and none are implemented in the engine itself yet.
Diffstat (limited to 'doc/tools')
-rw-r--r--doc/tools/makerst.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/doc/tools/makerst.py b/doc/tools/makerst.py
index 94dc8b276b..219b2485f7 100644
--- a/doc/tools/makerst.py
+++ b/doc/tools/makerst.py
@@ -212,7 +212,7 @@ def rstize_text(text, cclass):
cmd = tag_text[:space_pos]
param = tag_text[space_pos + 1:]
tag_text = param
- elif cmd.find('method') == 0:
+ elif cmd.find('method') == 0 or cmd.find('member') == 0 or cmd.find('signal') == 0:
cmd = tag_text[:space_pos]
param = tag_text[space_pos + 1:]
@@ -450,6 +450,7 @@ def make_rst_class(node):
if events != None and len(list(events)) > 0:
f.write(make_heading('Signals', '-'))
for m in list(events):
+ f.write(".. _class_" + name + "_" + m.attrib['name'] + ":\n\n")
make_method(f, node.attrib['name'], m, True, name, True)
f.write('\n')
d = m.find('description')
@@ -465,12 +466,14 @@ def make_rst_class(node):
f.write(make_heading('Member Variables', '-'))
for c in list(members):
+ # Leading two spaces necessary to prevent breaking the <ul>
+ f.write(" .. _class_" + name + "_" + c.attrib['name'] + ":\n\n")
s = '- '
s += make_type(c.attrib['type']) + ' '
s += '**' + c.attrib['name'] + '**'
if c.text.strip() != '':
s += ' - ' + rstize_text(c.text.strip(), name)
- f.write(s + '\n')
+ f.write(s + '\n\n')
f.write('\n')
constants = node.find('constants')