Page MenuHomePhabricator

efl: Change non required constructors to @optional.
ClosedPublic

Authored by lauromoura on Jan 31 2019, 4:02 PM.

Details

Summary

These constructors aren't checked for in the finalize step of the
initialization and may be given the @optional tag.

For C# this means they can be ommitted from the constructor call.

This also adds Efl.Ui.View.model as a constructor of
Efl.Composite_Model as the finalizer checks for it.

Fixes T7673

Test Plan

make check

Diff Detail

Repository
rEFL core/efl
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
lauromoura created this revision.Jan 31 2019, 4:02 PM
lauromoura requested review of this revision.Jan 31 2019, 4:02 PM
segfaultxavi accepted this revision.Feb 1 2019, 1:05 AM

These look OK to me, except the Model and Factory ones which @cedric should review.

This revision is now accepted and ready to land.Feb 1 2019, 1:05 AM
lauromoura added inline comments.Feb 1 2019, 4:55 AM
src/lib/elementary/efl_ui_widget_factory.eo
26

item_class is not checked for in the finalizer (actually, Widget_Factory doesn't even implement the finalizer). When it tries to create a widget without a class, a future with incorrect_value error is returned.

Is there any use case for instantiating factories without an item_class or instead of making it optional, we should check for it in the finalizer?

cedric accepted this revision.Feb 7 2019, 6:07 AM
cedric added inline comments.
src/lib/elementary/efl_ui_widget_factory.eo
26

Hum, the thing is that you can inherit from WidgetFactory and not necessarily set the item_class on the parent (as does caching factory).

This revision was automatically updated to reflect the committed changes.