From: Rico Tzschichholz Date: Sun, 16 Sep 2018 15:49:02 +0000 (+0200) Subject: libvaladoc: Drop PropertyBindingType X-Git-Tag: 0.43.1~40 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e68288a5e66eccb2352c27926425c45d295cf78e;p=thirdparty%2Fvala.git libvaladoc: Drop PropertyBindingType --- diff --git a/libvaladoc/Makefile.am b/libvaladoc/Makefile.am index 413d12dd1..ef0fb552d 100644 --- a/libvaladoc/Makefile.am +++ b/libvaladoc/Makefile.am @@ -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 \ diff --git a/libvaladoc/api/property.vala b/libvaladoc/api/property.vala index a5c8df043..2a0182e4c 100644 --- a/libvaladoc/api/property.vala +++ b/libvaladoc/api/property.vala @@ -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 index c2e74eb71..000000000 --- a/libvaladoc/api/propertybindingtype.vala +++ /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 - */ - - -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 (); - } -} - diff --git a/valadoc/treebuilder.vala b/valadoc/treebuilder.vala index b81d01613..79a17ee57 100644 --- a/valadoc/treebuilder.vala +++ b/valadoc/treebuilder.vala @@ -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);