summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2017-09-13 19:33:34 +0200
committerAleksander Morgado <aleksander@aleksander.es>2017-09-13 22:18:48 -0700
commit66d208abc14c00d3d2435a53fd9529f74eaeaa76 (patch)
tree546754d89b81d54c0d53d8359e02e35a0baa0191
parent844d4893bf37b86398e4639c9340cf2f472701a0 (diff)
qmi-codegen: avoid generating duplicated section titles
Section titles are used to generate unique ids in the documentation, so avoid generating the same title if both a request/response and an indication have the same message name. Warning: multiple "IDs" for constraint linkend: libqmi-glib-PDC-Activate-Config. Warning: multiple "IDs" for constraint linkend: libqmi-glib-PDC-Activate-Config. Warning: multiple "IDs" for constraint linkend: libqmi-glib-PDC-Deactivate-Config. Warning: multiple "IDs" for constraint linkend: libqmi-glib-PDC-Deactivate-Config. Warning: multiple "IDs" for constraint linkend: libqmi-glib-PDC-Get-Config-Info. Warning: multiple "IDs" for constraint linkend: libqmi-glib-PDC-Get-Config-Info. Warning: multiple "IDs" for constraint linkend: libqmi-glib-PDC-Get-Selected-Config. Warning: multiple "IDs" for constraint linkend: libqmi-glib-PDC-Get-Selected-Config. .... (cherry picked from commit 90a3a4085a164ac163be4919afe98f977d0c79fe)
-rw-r--r--build-aux/qmi-codegen/Client.py2
-rw-r--r--build-aux/qmi-codegen/Message.py5
2 files changed, 5 insertions, 2 deletions
diff --git a/build-aux/qmi-codegen/Client.py b/build-aux/qmi-codegen/Client.py
index 796c3b8..b35eab9 100644
--- a/build-aux/qmi-codegen/Client.py
+++ b/build-aux/qmi-codegen/Client.py
@@ -223,7 +223,7 @@ class Client:
' * @object: A #${camelcase}.\n'
' * @output: A #${output_camelcase}.\n'
' *\n'
- ' * The ::${signal_name} signal gets emitted when a \'<link linkend=\"libqmi-glib-${service}-${message_name_dashed}.top_of_page\">${message_name}</link>\' indication is received.\n'
+ ' * The ::${signal_name} signal gets emitted when a \'<link linkend=\"libqmi-glib-${service}-${message_name_dashed}-indication.top_of_page\">${message_name}</link>\' indication is received.\n'
' *\n'
' * Since: ${since}\n'
' */\n'
diff --git a/build-aux/qmi-codegen/Message.py b/build-aux/qmi-codegen/Message.py
index 6de8fe8..e60b01a 100644
--- a/build-aux/qmi-codegen/Message.py
+++ b/build-aux/qmi-codegen/Message.py
@@ -446,6 +446,9 @@ class Message:
'qmi_client_${service}_${name_underscore}\n'
'qmi_client_${service}_${name_underscore}_finish\n')
sections['public-methods'] += string.Template(template).substitute(translations)
+ translations['message_type'] = 'request/response'
+ elif self.type == 'Indication':
+ translations['message_type'] = 'indication'
translations['public_types'] = sections['public-types']
translations['public_methods'] = sections['public-methods']
@@ -455,7 +458,7 @@ class Message:
template = (
'<SECTION>\n'
'<FILE>${hyphened}</FILE>\n'
- '<TITLE>${fullname}</TITLE>\n'
+ '<TITLE>${fullname} ${message_type}</TITLE>\n'
'${public_types}'
'${public_methods}'
'<SUBSECTION Private>\n'