]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
libvaladoc: Drop PropertyBindingType
authorRico Tzschichholz <ricotz@ubuntu.com>
Sun, 16 Sep 2018 15:49:02 +0000 (17:49 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Sun, 25 Nov 2018 10:19:06 +0000 (11:19 +0100)
libvaladoc/Makefile.am
libvaladoc/api/property.vala
libvaladoc/api/propertybindingtype.vala [deleted file]
valadoc/treebuilder.vala

index 413d12dd175914ed9d48fe248cc3fff31ddfdb16..ef0fb552d20e8276e63020fa4e478e2f6d4b8c32 100644 (file)
@@ -80,7 +80,6 @@ libvaladoc_la_VALASOURCES = \
        api/property.vala \
        api/propertyaccessor.vala \
        api/propertyaccessortype.vala \
-       api/propertybindingtype.vala \
        api/signal.vala \
        api/signaturebuilder.vala \
        api/sourcefile.vala \
index a5c8df043bd15fcfb7653647dee695501ba9eae9..2a0182e4c4da0c5a2e847b07a7a1dacc13612ba2 100644 (file)
@@ -27,18 +27,16 @@ using Valadoc.Content;
  * Represents a property declaration.
  */
 public class Valadoc.Api.Property : Symbol {
-       private PropertyBindingType binding_type;
        private string? dbus_name;
        private string? cname;
 
        public Property (Node parent, SourceFile file, string name, Vala.SymbolAccessibility accessibility,
                                         SourceComment? comment, string? cname, string? dbus_name, bool is_dbus_visible,
-                                        PropertyBindingType binding_type, Vala.Property data)
+                                        Vala.Property data)
        {
                base (parent, file, name, accessibility, comment, data);
 
                this.is_dbus_visible = is_dbus_visible;
-               this.binding_type = binding_type;
 
                this.dbus_name = dbus_name;
                this.cname = cname;
@@ -71,7 +69,7 @@ public class Valadoc.Api.Property : Symbol {
         */
        public bool is_virtual {
                get {
-                       return binding_type == PropertyBindingType.VIRTUAL;
+                       return ((Vala.Property) data).is_virtual;
                }
        }
 
@@ -80,7 +78,7 @@ public class Valadoc.Api.Property : Symbol {
         */
        public bool is_abstract {
                get {
-                       return binding_type == PropertyBindingType.ABSTRACT;
+                       return ((Vala.Property) data).is_abstract;
                }
        }
 
@@ -89,7 +87,7 @@ public class Valadoc.Api.Property : Symbol {
         */
        public bool is_override {
                get {
-                       return binding_type == PropertyBindingType.OVERRIDE;
+                       return ((Vala.Property) data).overrides;
                }
        }
 
diff --git a/libvaladoc/api/propertybindingtype.vala b/libvaladoc/api/propertybindingtype.vala
deleted file mode 100644 (file)
index c2e74eb..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-/* propertybindingtype.vala
- *
- * Copyright (C) 2011  Florian Brosch
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
- *
- * Author:
- *     Florian Brosch <flo.brosch@gmail.com>
- */
-
-
-public enum Valadoc.Api.PropertyBindingType {
-       UNMODIFIED,
-       OVERRIDE,
-       ABSTRACT,
-       VIRTUAL;
-
-       public unowned string to_string () {
-               switch (this) {
-               case OVERRIDE:
-                       return "override";
-
-               case ABSTRACT:
-                       return "abstract";
-
-               case VIRTUAL:
-                       return "virtual";
-
-               case UNMODIFIED:
-                       return "";
-               }
-
-               assert_not_reached ();
-       }
-}
-
index b81d01613ff06960b8ad34c16c5a788632b26cb1..79a17ee57af283d56785ffd86d22a8ad5f04527a 100644 (file)
@@ -609,18 +609,6 @@ public class Valadoc.Drivers.TreeBuilder : Vala.CodeVisitor {
                return Ownership.UNOWNED;
        }
 
-       private PropertyBindingType get_property_binding_type (Vala.Property element) {
-               if (element.is_abstract) {
-                       return PropertyBindingType.ABSTRACT;
-               } else if (element.is_virtual) {
-                       return PropertyBindingType.VIRTUAL;
-               } else if (element.overrides) {
-                       return PropertyBindingType.OVERRIDE;
-               }
-
-               return PropertyBindingType.UNMODIFIED;
-       }
-
 
        //
        // Vala tree creation:
@@ -1049,7 +1037,6 @@ public class Valadoc.Drivers.TreeBuilder : Vala.CodeVisitor {
                                                                          element.nick,
                                                                          Vala.GDBusModule.get_dbus_name_for_member (element),
                                                                          Vala.GDBusModule.is_dbus_visible (element),
-                                                                         get_property_binding_type (element),
                                                                          element);
                node.property_type = create_type_reference (element.property_type, node, node);
                symbol_map.set (element, node);