[gxml] SerializableBool constructor requires property name
- From: Daniel Espinosa Ortiz <despinosa src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gxml] SerializableBool constructor requires property name
- Date: Tue, 6 Oct 2015 20:17:22 +0000 (UTC)
commit ed9a268327a4500325bf839d88ec146ca2738436
Author: Daniel Espinosa <esodan gmail com>
Date: Tue Oct 6 15:16:11 2015 -0500
SerializableBool constructor requires property name
gxml/SerializableBool.vala | 2 +-
test/SerializablePropertyBoolTest.vala | 3 +--
2 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/gxml/SerializableBool.vala b/gxml/SerializableBool.vala
index 60509e4..ad3c6fb 100644
--- a/gxml/SerializableBool.vala
+++ b/gxml/SerializableBool.vala
@@ -29,7 +29,7 @@ public class GXml.SerializableBool : SerializableObjectModel, SerializableProper
{
private string _val = null;
private string _name = null;
- public SerializableBool.with_name (string name) { _name = name; }
+ public SerializableBool (string name) { _name = name; }
public bool get_value () { return bool.parse (_val); }
public void set_value (bool val) { _val = val.to_string (); }
public string get_serializable_property_value () { return _val; }
diff --git a/test/SerializablePropertyBoolTest.vala b/test/SerializablePropertyBoolTest.vala
index 641399c..c1ae5ee 100644
--- a/test/SerializablePropertyBoolTest.vala
+++ b/test/SerializablePropertyBoolTest.vala
@@ -27,7 +27,7 @@ using GXml;
class SerializablePropertyBoolTest : GXmlTest {
public class BoolNode : SerializableObjectModel
{
- public SerializableBool boolean { get; set; }
+ public SerializableBool boolean { get; set; default = new SerializableBool ("boolean"); }
public int integer { get; set; default = 0; }
public string name { get; set; }
public override string node_name () { return "BooleanNode"; }
@@ -58,7 +58,6 @@ class SerializablePropertyBoolTest : GXmlTest {
try {
var bn = new BoolNode ();
var doc = new xDocument ();
- bn.boolean = new SerializableBool.with_name ("boolean");
bn.serialize (doc);
Test.message ("XML:\n"+doc.to_string ());
var element = doc.document_element;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]