forked from enlightenment/efl
eio: we do not need to actually loop explicitely for the loop here.
Actually efl_loop_future_scheduler_get does lookup on the object and its provider someone that could be a loop provider and find a scheduler. There is no need to custom look for a loop provider. Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es> Reviewed-by: Vitor Sousa da Silva <vitorsousa@expertisesolutions.com.br> Differential Revision: https://phab.enlightenment.org/D7338
This commit is contained in:
parent
bf82792a22
commit
0b8da6e945
|
@ -660,7 +660,6 @@ _eio_model_efl_model_property_set(Eo *obj,
|
||||||
Eio_Model_Data *pd,
|
Eio_Model_Data *pd,
|
||||||
const char *property, Eina_Value *value)
|
const char *property, Eina_Value *value)
|
||||||
{
|
{
|
||||||
Eo *loop = efl_provider_find(obj, EFL_LOOP_CLASS);
|
|
||||||
const char *path;
|
const char *path;
|
||||||
Eina_Future *f;
|
Eina_Future *f;
|
||||||
Eina_Value s = EINA_VALUE_EMPTY;
|
Eina_Value s = EINA_VALUE_EMPTY;
|
||||||
|
@ -683,7 +682,7 @@ _eio_model_efl_model_property_set(Eo *obj,
|
||||||
|
|
||||||
if (finalized)
|
if (finalized)
|
||||||
{
|
{
|
||||||
Eina_Promise *p = efl_loop_promise_new(loop, _efl_io_manager_future_cancel, NULL);
|
Eina_Promise *p = efl_loop_promise_new(obj, _efl_io_manager_future_cancel, NULL);
|
||||||
f = eina_future_new(p);
|
f = eina_future_new(p);
|
||||||
|
|
||||||
pd->request.move = eio_file_move(pd->path, path,
|
pd->request.move = eio_file_move(pd->path, path,
|
||||||
|
@ -697,14 +696,14 @@ _eio_model_efl_model_property_set(Eo *obj,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
f = eina_future_resolved(efl_loop_future_scheduler_get(loop),
|
f = eina_future_resolved(efl_loop_future_scheduler_get(obj),
|
||||||
eina_value_string_init(pd->path));
|
eina_value_string_init(pd->path));
|
||||||
}
|
}
|
||||||
|
|
||||||
return efl_future_then(obj, f);
|
return efl_future_then(obj, f);
|
||||||
|
|
||||||
on_error:
|
on_error:
|
||||||
return eina_future_rejected(efl_loop_future_scheduler_get(loop), err);
|
return eina_future_rejected(efl_loop_future_scheduler_get(obj), err);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Reference in New Issue