[valadoc] doclets/gtkdoclet: Fix handling undocumented parameters. Support not-error.
- From: Florian Brosch <flobrosch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [valadoc] doclets/gtkdoclet: Fix handling undocumented parameters. Support not-error.
- Date: Tue, 4 May 2010 21:35:30 +0000 (UTC)
commit d8214f7742d1a31e46becfa22cf16f9e5cfd7dc8
Author: Luca Bruno <lethalman88 gmail com>
Date: Tue May 4 22:06:06 2010 +0200
doclets/gtkdoclet: Fix handling undocumented parameters. Support not-error.
src/doclets/gtkdoc/generator.vala | 15 ++++++++-------
1 files changed, 8 insertions(+), 7 deletions(-)
---
diff --git a/src/doclets/gtkdoc/generator.vala b/src/doclets/gtkdoc/generator.vala
index c0766e5..142d6f9 100644
--- a/src/doclets/gtkdoc/generator.vala
+++ b/src/doclets/gtkdoc/generator.vala
@@ -123,7 +123,7 @@ public class Gtkdoc.Generator : Api.Visitor {
}
}
- if (!found) {
+ if (!found && lang_header.value != null) {
headers.add (lang_header);
}
}
@@ -192,7 +192,7 @@ public class Gtkdoc.Generator : Api.Visitor {
}
private Header? add_header (string name, Comment? comment, string[]? annotations = null) {
- if (comment == null) {
+ if (comment == null && annotations == null) {
return null;
}
@@ -454,7 +454,6 @@ public class Gtkdoc.Generator : Api.Visitor {
} else if (param.is_ref) {
direction = "inout";
}
-
annotations += direction;
if (param.parameter_type.is_nullable) {
@@ -469,13 +468,15 @@ public class Gtkdoc.Generator : Api.Visitor {
annotations += "array length=%s".printf (param.name+"_length1");
}
- if (param.documentation != null) {
- add_header (param.name, param.documentation, annotations);
+ if (get_cname (param.parameter_type.data_type) == "GError") {
+ annotations += "not-error";
}
- else if (current_signal != null && param.documentation == null) {
+
+ if (current_signal != null && param.documentation == null) {
// gtkdoc writes arg0, arg1 which is ugly. As a workaround, we always add an header for them.
add_manual_header (param.name, "", null);
- return;
+ } else {
+ add_header (param.name, param.documentation, annotations);
}
param.accept_all_children (this);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]