]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Minor fixes
authorJCWasmx86 <JCWasmx86@t-online.de>
Sun, 15 May 2022 09:26:34 +0000 (11:26 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Sat, 29 Apr 2023 19:00:17 +0000 (21:00 +0200)
dbusgen/valadbusparser.vala

index 25d362b8d08ca92245409b68ec4ef780a9414bd7..4acf2d3ef935b24090cbf5aa3360ed00fb79c406 100644 (file)
@@ -281,14 +281,17 @@ public class Vala.DBusParser : CodeVisitor {
                        case "org.gtk.GDBus.DocString":
                                // A string with Docbook content for documentation. This annotation can be used on <interface>, <method>, <signal>,
                                // <property> and <arg> elements.
-                               if (val != null) {
+                               if (val != null && current_node is Symbol) {
                                        ((Symbol) current_node).comment = new Vala.Comment (val, get_current_src ());
                                }
                                break;
                        case "org.gtk.GDBus.DocString.Short":
                                // A string with Docbook content for short/brief documentation. This annotation can only be used on <interface>
                                // elements.
-                               //TODO
+                               // Prefer long comments over short comments
+                               if (val != null && current_node is Symbol && ((Symbol) current_node).comment == null) {
+                                       ((Symbol) current_node).comment = new Vala.Comment (val, get_current_src ());
+                               }
                                break;
                        default:
                                break;