An eio model (and I believe most other models as well, in fact)
require a Efl.Loop.User as parent in order for efl future/promises
to work. This adds a fallback code directly inside eio model. The
alternative was to parent and efl_del all models in fileselector.
See T4686
efl_destructor(efl_super(obj, MY_CLASS));
}
-
static Eo *
_eio_model_efl_object_parent_get(Eo *obj , Eio_Model_Data *priv)
{
}
return model;
}
+
+EOLIAN static Eo *
+_eio_model_efl_object_provider_find(Eo *obj, Eio_Model_Data *priv EINA_UNUSED, const Efl_Class *klass)
+{
+ Eo *provider = efl_provider_find(efl_super(obj, MY_CLASS), klass);
+
+ // Provide main loop even if we don't have a loop user parent
+ if (!provider && (klass == EFL_LOOP_CLASS) && eina_main_loop_is())
+ return ecore_main_loop_get();
+
+ return provider;
+}
+
#include "eio_model.eo.c"
Efl.Object.constructor;
Efl.Object.destructor;
Efl.Object.parent.get;
+ Efl.Object.provider_find;
Efl.Model.properties.get;
Efl.Model.property_set;
Efl.Model.property_get;