efl: Change non required constructors to @optional.
authorLauro Moura <lauromoura@expertisesolutions.com.br>
Thu, 7 Feb 2019 17:02:21 +0000 (18:02 +0100)
committerWooHyun Jung <wh0705.jung@samsung.com>
Mon, 11 Feb 2019 01:37:26 +0000 (10:37 +0900)
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

Reviewers: segfaultxavi, zmike, bu5hm4n, cedric, felipealmeida

Reviewed By: segfaultxavi, cedric

Tags: #efl, #do_not_merge

Maniphest Tasks: T7673

Differential Revision: https://phab.enlightenment.org/D7855

src/lib/ecore/efl_composite_model.eo
src/lib/ecore/efl_view_model.eo
src/lib/elementary/efl_ui_widget.eo
src/lib/elementary/efl_ui_widget_factory.eo
src/lib/elementary/efl_ui_win.eo
src/lib/elementary/elm_glview.eo
src/lib/elementary/elm_view_form.eo
src/lib/elementary/elm_view_list.eo

index 58cc3c3..b1b3cc7 100644 (file)
@@ -31,6 +31,7 @@ class Efl.Composite_Model extends Efl.Loop_Model implements Efl.Ui.View
       Efl.Model.child_del;
    }
    constructors {
-      .index;
+      .index @optional;
+      Efl.Ui.View.model;
    }
 }
index d362e88..349a5a4 100644 (file)
@@ -99,6 +99,6 @@ class Efl.View_Model extends Efl.Composite_Model
       Efl.Model.property { set; get; }
    }
    constructors {
-      Efl.View_Model.children_bind;
+      Efl.View_Model.children_bind @optional;
    }
 }
index 23f9548..cb93420 100644 (file)
@@ -895,7 +895,7 @@ abstract Efl.Ui.Widget extends Efl.Canvas.Group implements Efl.Access.Object,
        *******/
    }
    constructors {
-      .style;
+      .style @optional;
    }
    events {
       moved: Efl.Object; [[Called when widget moved]]
index 3652010..63eb3c2 100644 (file)
@@ -23,6 +23,6 @@ class Efl.Ui.Widget_Factory extends Efl.Loop_Consumer implements Efl.Ui.Factory
       Efl.Ui.Model.Connect.connect;
    }
    constructors {
-      .item_class;
+      .item_class @optional;
    }
-}
\ No newline at end of file
+}
index c7ee1ee..ced7416 100644 (file)
@@ -919,9 +919,9 @@ class Efl.Ui.Win extends Efl.Ui.Widget implements Efl.Canvas.Scene, Efl.Access.W
       //
    }
    constructors {
-      .win_name;
-      .win_type;
-      .accel_preference;
+      .win_name @optional;
+      .win_type @optional;
+      .accel_preference @optional;
    }
    events {
       delete,request: void; [[Called when the window receives a delete request]]
index faa03f2..73b8bf8 100644 (file)
@@ -229,6 +229,6 @@ class Elm.Glview extends Efl.Ui.Widget implements Efl.Gfx.View, Efl.Ui.Legacy
             ]]
    }
    constructors {
-      .version_constructor;
+      .version_constructor @optional;
    }
 }
index a6bf4cc..ce32cec 100644 (file)
@@ -26,6 +26,6 @@ class Elm.View.Form extends Efl.Object
         Efl.Object.destructor;
     }
     constructors {
-        .model_set;
+        .model_set @optional;
     }
 }
index 7a8e777..932b586 100644 (file)
@@ -60,6 +60,6 @@ class Elm.View.List extends Efl.Object
         Efl.Object.destructor;
     }
     constructors {
-        .genlist_set;
+        .genlist_set @optional;
     }
 }