[vala/wip/dbusgen: 3/4] dbusgen: Make sure to name changes are reversible
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/wip/dbusgen: 3/4] dbusgen: Make sure to name changes are reversible
- Date: Wed, 19 Sep 2018 17:15:16 +0000 (UTC)
commit 8fd02c2b03055d46632c01e9351b1d52f6066c76
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Wed Sep 19 18:41:47 2018 +0200
dbusgen: Make sure to name changes are reversible
dbusgen/valadbusparser.vala | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
---
diff --git a/dbusgen/valadbusparser.vala b/dbusgen/valadbusparser.vala
index 19e284bf1..b18250001 100644
--- a/dbusgen/valadbusparser.vala
+++ b/dbusgen/valadbusparser.vala
@@ -295,7 +295,10 @@ public class Vala.DBusParser : CodeVisitor {
return;
}
- name = Vala.Symbol.camel_case_to_lower_case (name);
+ var vala_name = Vala.Symbol.camel_case_to_lower_case (name);
+ if (name == Vala.Symbol.lower_case_to_camel_case (vala_name)) {
+ name = vala_name;
+ }
current_node = current_method = new Method (name, dbus_module.void_type.copy (),
get_current_src ());
current_iface.add_method ((Method)current_method);
((Method)current_method).is_abstract = true;
@@ -359,7 +362,10 @@ public class Vala.DBusParser : CodeVisitor {
set_access = new PropertyAccessor (false, true, false, data_type, null,
get_current_src ());
}
- name = Vala.Symbol.camel_case_to_lower_case (name);
+ var vala_name = Vala.Symbol.camel_case_to_lower_case (name);
+ if (name == Vala.Symbol.lower_case_to_camel_case (vala_name)) {
+ name = vala_name;
+ }
current_node = current_property = new Property (name, data_type, get_access, set_access,
get_current_src ());
current_property.is_abstract = true;
current_property.access = SymbolAccessibility.PUBLIC;
@@ -477,7 +483,10 @@ public class Vala.DBusParser : CodeVisitor {
return;
}
- name = Vala.Symbol.camel_case_to_lower_case (name);
+ var vala_name = Vala.Symbol.camel_case_to_lower_case (name);
+ if (name == Vala.Symbol.lower_case_to_camel_case (vala_name)) {
+ name = vala_name;
+ }
current_node = current_method = new Signal (name, dbus_module.void_type.copy ());
current_iface.add_signal ((Signal)current_node);
((Signal)current_node).access = SymbolAccessibility.PUBLIC;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]