zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=171aeb16a55a2e359d9ed468a590df5cab184ba5
commit 171aeb16a55a2e359d9ed468a590df5cab184ba5 Author: Cedric BAIL <cedric.b...@free.fr> Date: Tue Apr 2 10:04:32 2019 -0700 elementary: fix elm_fileselector_entry model_get to be properly build with a parent and synchronously. This fix the following warning: ERR<12924>:eo ../src/lib/eo/eo.c:880 _efl_add_internal_start() Creation of 'Efl.Io.Model' object at line 443 in '../src/lib/elementary/elc_fileselector_entry.c' is done without parent. This should use efl_add_ref. Reviewed-by: Marcel Hollerbach <m...@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D8536 --- src/lib/elementary/elc_fileselector_entry.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/lib/elementary/elc_fileselector_entry.c b/src/lib/elementary/elc_fileselector_entry.c index eee488267b..21c8f1f6aa 100644 --- a/src/lib/elementary/elc_fileselector_entry.c +++ b/src/lib/elementary/elc_fileselector_entry.c @@ -430,10 +430,10 @@ _elm_fileselector_entry_path_get_internal(const Evas_Object *obj) } EOLIAN static Efl_Model * -_elm_fileselector_entry_efl_ui_view_model_get(const Eo *obj EINA_UNUSED, Elm_Fileselector_Entry_Data *sd) +_elm_fileselector_entry_efl_ui_view_model_get(const Eo *obj, Elm_Fileselector_Entry_Data *sd) { Efl_Model *bmodel, *ret; - Eina_Value path; + bmodel = efl_ui_view_model_get(sd->button); if (!bmodel) { @@ -441,13 +441,16 @@ _elm_fileselector_entry_efl_ui_view_model_get(const Eo *obj EINA_UNUSED, Elm_Fil return NULL; } - ret = efl_add(efl_class_get(bmodel), NULL); free(sd->path); sd->path = elm_entry_markup_to_utf8(elm_object_text_get(sd->entry)); - eina_value_setup(&path, EINA_VALUE_TYPE_STRING); - eina_value_set(&path, sd->path); - efl_model_property_set(ret, "path", &path); - eina_value_flush(&path); + + if (!strcmp(sd->path, efl_io_model_path_get(bmodel))) + return bmodel; + + ret = efl_add_ref(efl_class_get(bmodel), (Eo*) obj, + efl_io_model_path_set(efl_added, sd->path), + efl_loop_model_volatile_make(efl_added)); + eina_freeq_ptr_add(postponed_fq, ret, EINA_FREE_CB(efl_unref), sizeof (void*)); return ret; } --