summaryrefslogtreecommitdiff
path: root/src/lib/ecore
diff options
context:
space:
mode:
authorLarry Lira <larry@expertisesolutions.com.br>2018-11-29 15:11:51 -0200
committerVitor Sousa <vitorsousa@expertisesolutions.com.br>2018-11-30 16:56:47 -0200
commit6b0c85cb0da92e1e00d867e115ffe2827e2e3853 (patch)
tree537467990ce39d4917d285f5f7dc40e90c590dff /src/lib/ecore
parent0398b8f19c2adcf206ec298ded8ce4dd1681a501 (diff)
Efl.Ui.List.View: fixed MVVM life-cycle
Fix bugs on Views and Model related with null items and proper ownership and life-cycle of components. Configure default theme for default factory on finalize.
Diffstat (limited to 'src/lib/ecore')
-rw-r--r--src/lib/ecore/efl_model_container.c6
-rw-r--r--src/lib/ecore/efl_model_item.c9
2 files changed, 2 insertions, 13 deletions
diff --git a/src/lib/ecore/efl_model_container.c b/src/lib/ecore/efl_model_container.c
index 5449ae4307..ce5dc493aa 100644
--- a/src/lib/ecore/efl_model_container.c
+++ b/src/lib/ecore/efl_model_container.c
@@ -84,12 +84,8 @@ _efl_model_container_efl_object_destructor(Eo *obj,
84{ 84{
85 Eina_Stringshare *key; 85 Eina_Stringshare *key;
86 Eina_Iterator *it; 86 Eina_Iterator *it;
87 Efl_Model *child;
88 87
89 EINA_LIST_FREE(sd->childrens, child) 88 eina_list_free(sd->childrens);
90 {
91 if (child) efl_parent_set(child, NULL);
92 }
93 89
94 it = eina_hash_iterator_key_new(sd->properties); 90 it = eina_hash_iterator_key_new(sd->properties);
95 EINA_ITERATOR_FOREACH(it, key) 91 EINA_ITERATOR_FOREACH(it, key)
diff --git a/src/lib/ecore/efl_model_item.c b/src/lib/ecore/efl_model_item.c
index 104125a705..13f60292c9 100644
--- a/src/lib/ecore/efl_model_item.c
+++ b/src/lib/ecore/efl_model_item.c
@@ -44,14 +44,7 @@ _efl_model_item_efl_object_constructor(Eo *obj, Efl_Model_Item_Data *sd)
44static void 44static void
45_efl_model_item_efl_object_destructor(Eo *obj, Efl_Model_Item_Data *sd) 45_efl_model_item_efl_object_destructor(Eo *obj, Efl_Model_Item_Data *sd)
46{ 46{
47 Efl_Model *child; 47 eina_list_free(sd->childrens);
48
49 EINA_LIST_FREE(sd->childrens, child)
50 {
51 if (child)
52 efl_parent_set(child, NULL);
53 }
54
55 eina_hash_foreach(sd->properties, _stringshared_keys_free, NULL); 48 eina_hash_foreach(sd->properties, _stringshared_keys_free, NULL);
56 eina_hash_free(sd->properties); 49 eina_hash_free(sd->properties);
57 50