summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/tools/makerst.py15
1 files changed, 7 insertions, 8 deletions
diff --git a/doc/tools/makerst.py b/doc/tools/makerst.py
index 94dc8b276b..dc015d781b 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:]
@@ -310,11 +310,11 @@ def make_method(
if declare or pp == None:
- s = ' **' + m.attrib['name'] + '** '
+ s = '**' + m.attrib['name'] + '** '
else:
s = ':ref:`' + m.attrib['name'] + '<class_' + cname + "_" + m.attrib['name'] + '>` '
- s += ' **(**'
+ s += '**(**'
argfound = False
for a in mdata['argidx']:
arg = mdata[a]
@@ -334,10 +334,6 @@ def make_method(
if 'default' in arg.attrib:
s += '=' + arg.attrib['default']
- argfound = True
-
- if argfound:
- s += ' '
s += ' **)**'
if 'qualifiers' in m.attrib:
@@ -450,6 +446,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 +462,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')