[vala/staging: 9/22] libvaladoc: Drop PropertyAccessorType
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/staging: 9/22] libvaladoc: Drop PropertyAccessorType
- Date: Sun, 25 Nov 2018 13:08:51 +0000 (UTC)
commit af9c1c3d08943f3cb723a7a1a9d9d1f8b879722f
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Fri Nov 16 09:05:59 2018 +0100
libvaladoc: Drop PropertyAccessorType
libvaladoc/Makefile.am | 1 -
libvaladoc/api/propertyaccessor.vala | 10 +++-----
libvaladoc/api/propertyaccessortype.vala | 43 --------------------------------
valadoc/treebuilder.vala | 17 -------------
4 files changed, 4 insertions(+), 67 deletions(-)
---
diff --git a/libvaladoc/Makefile.am b/libvaladoc/Makefile.am
index ef0fb552d..619e63e49 100644
--- a/libvaladoc/Makefile.am
+++ b/libvaladoc/Makefile.am
@@ -79,7 +79,6 @@ libvaladoc_la_VALASOURCES = \
api/pointer.vala \
api/property.vala \
api/propertyaccessor.vala \
- api/propertyaccessortype.vala \
api/signal.vala \
api/signaturebuilder.vala \
api/sourcefile.vala \
diff --git a/libvaladoc/api/propertyaccessor.vala b/libvaladoc/api/propertyaccessor.vala
index 55bead0d9..29ad225a9 100644
--- a/libvaladoc/api/propertyaccessor.vala
+++ b/libvaladoc/api/propertyaccessor.vala
@@ -27,18 +27,16 @@ using Valadoc.Content;
* Represents a get or set accessor of a property.
*/
public class Valadoc.Api.PropertyAccessor : Symbol {
- private PropertyAccessorType type;
private Ownership ownership;
private string? cname;
public PropertyAccessor (Property parent, SourceFile file, string name, Vala.SymbolAccessibility
accessibility,
- string? cname, PropertyAccessorType type, Ownership
ownership, Vala.PropertyAccessor data)
+ string? cname, Ownership ownership,
Vala.PropertyAccessor data)
{
base (parent, file, name, accessibility, null, data);
this.ownership = ownership;
this.cname = cname;
- this.type = type;
}
/**
@@ -66,7 +64,7 @@ public class Valadoc.Api.PropertyAccessor : Symbol {
*/
public bool is_construct {
get {
- return (type & PropertyAccessorType.CONSTRUCT) != 0;
+ return ((Vala.PropertyAccessor) data).construction;
}
}
@@ -75,7 +73,7 @@ public class Valadoc.Api.PropertyAccessor : Symbol {
*/
public bool is_set {
get {
- return (type & PropertyAccessorType.SET) != 0;
+ return ((Vala.PropertyAccessor) data).writable;
}
}
@@ -84,7 +82,7 @@ public class Valadoc.Api.PropertyAccessor : Symbol {
*/
public bool is_get {
get {
- return (type & PropertyAccessorType.GET) != 0;
+ return ((Vala.PropertyAccessor) data).readable;
}
}
diff --git a/valadoc/treebuilder.vala b/valadoc/treebuilder.vala
index 79a17ee57..7c5d4d112 100644
--- a/valadoc/treebuilder.vala
+++ b/valadoc/treebuilder.vala
@@ -496,21 +496,6 @@ public class Valadoc.Drivers.TreeBuilder : Vala.CodeVisitor {
return meta_data.get_namespace ((Vala.Namespace) namespace_symbol, file);
}
- private PropertyAccessorType get_property_accessor_type (Vala.PropertyAccessor element) {
- if (element.construction) {
- if (element.writable) {
- return (PropertyAccessorType.CONSTRUCT | PropertyAccessorType.SET);
- }
- return PropertyAccessorType.CONSTRUCT;
- } else if (element.writable) {
- return PropertyAccessorType.SET;
- } else if (element.readable) {
- return PropertyAccessorType.GET;
- }
-
- error ("Unknown symbol accessibility type");
- }
-
private bool type_reference_pass_ownership (Vala.DataType? element) {
if (element == null) {
return false;
@@ -1050,7 +1035,6 @@ public class Valadoc.Drivers.TreeBuilder : Vala.CodeVisitor {
element.name,
accessor.access,
get_cname
(accessor),
-
get_property_accessor_type (accessor),
get_property_ownership (accessor),
accessor);
}
@@ -1062,7 +1046,6 @@ public class Valadoc.Drivers.TreeBuilder : Vala.CodeVisitor {
element.name,
accessor.access,
get_cname
(accessor),
-
get_property_accessor_type (accessor),
get_property_ownership (accessor),
accessor);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]