summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCedric BAIL <cedric.bail@free.fr>2019-04-02 10:04:32 -0700
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2019-04-21 11:36:50 +0200
commitb2db95947a67bfa28a7d94d729be61d88e004372 (patch)
treee2ecc6c406480ae85c2a8fbeef7a6f3782b236a5
parent856a453dd8a7979d58e306fbbd3a407e7267ede6 (diff)
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 <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D8536
-rw-r--r--src/lib/elementary/elc_fileselector_entry.c17
1 files 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)
430} 430}
431 431
432EOLIAN static Efl_Model * 432EOLIAN static Efl_Model *
433_elm_fileselector_entry_efl_ui_view_model_get(const Eo *obj EINA_UNUSED, Elm_Fileselector_Entry_Data *sd) 433_elm_fileselector_entry_efl_ui_view_model_get(const Eo *obj, Elm_Fileselector_Entry_Data *sd)
434{ 434{
435 Efl_Model *bmodel, *ret; 435 Efl_Model *bmodel, *ret;
436 Eina_Value path; 436
437 bmodel = efl_ui_view_model_get(sd->button); 437 bmodel = efl_ui_view_model_get(sd->button);
438 if (!bmodel) 438 if (!bmodel)
439 { 439 {
@@ -441,13 +441,16 @@ _elm_fileselector_entry_efl_ui_view_model_get(const Eo *obj EINA_UNUSED, Elm_Fil
441 return NULL; 441 return NULL;
442 } 442 }
443 443
444 ret = efl_add(efl_class_get(bmodel), NULL);
445 free(sd->path); 444 free(sd->path);
446 sd->path = elm_entry_markup_to_utf8(elm_object_text_get(sd->entry)); 445 sd->path = elm_entry_markup_to_utf8(elm_object_text_get(sd->entry));
447 eina_value_setup(&path, EINA_VALUE_TYPE_STRING); 446
448 eina_value_set(&path, sd->path); 447 if (!strcmp(sd->path, efl_io_model_path_get(bmodel)))
449 efl_model_property_set(ret, "path", &path); 448 return bmodel;
450 eina_value_flush(&path); 449
450 ret = efl_add_ref(efl_class_get(bmodel), (Eo*) obj,
451 efl_io_model_path_set(efl_added, sd->path),
452 efl_loop_model_volatile_make(efl_added));
453 eina_freeq_ptr_add(postponed_fq, ret, EINA_FREE_CB(efl_unref), sizeof (void*));
451 454
452 return ret; 455 return ret;
453} 456}