summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2018-06-25 06:56:09 -0400
committerMike Blumenkrantz <zmike@samsung.com>2018-06-25 06:56:09 -0400
commitd714c21ecbb17fe2ae5270cb94e47ce0bcfb9317 (patch)
treef856780011438e9f5e9f09e029067cd3e94320ce
parentddeae9642128a281cf8f531b8403669355e36a99 (diff)
efl_ui_layout_object: fix warnings
Summary: ensure that the signal is correctly composed. For the case that the eina value is carrying a error, then we just error out. Depends on D6378 Reviewers: devilhorns, zmike Reviewed By: zmike Subscribers: cedric, #committers, zmike Tags: #efl Differential Revision: https://phab.enlightenment.org/D6379
-rw-r--r--src/lib/elementary/efl_ui_layout_object.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/lib/elementary/efl_ui_layout_object.c b/src/lib/elementary/efl_ui_layout_object.c
index 95b3fc5fb9..1c16f29db4 100644
--- a/src/lib/elementary/efl_ui_layout_object.c
+++ b/src/lib/elementary/efl_ui_layout_object.c
@@ -1950,6 +1950,15 @@ _efl_ui_layout_view_model_signal_update(Efl_Ui_Layout_Object_Data *pd, const cha
1950 v = efl_model_property_get(pd->connect.model, fetch); 1950 v = efl_model_property_get(pd->connect.model, fetch);
1951 if (!v) return; 1951 if (!v) return;
1952 1952
1953 if (eina_value_type_get(v) == EINA_VALUE_TYPE_ERROR)
1954 {
1955 Eina_Error error;
1956
1957 eina_value_get(v, &error);
1958 ERR("Failed to fetch signal value. Error: %s", eina_error_msg_get(error));
1959 return;
1960 }
1961
1953 // FIXME: previous implementation would just do that for signal/part == "selected" 1962 // FIXME: previous implementation would just do that for signal/part == "selected"
1954 if (eina_value_type_get(v) == EINA_VALUE_TYPE_UCHAR) 1963 if (eina_value_type_get(v) == EINA_VALUE_TYPE_UCHAR)
1955 { 1964 {
@@ -1959,7 +1968,7 @@ _efl_ui_layout_view_model_signal_update(Efl_Ui_Layout_Object_Data *pd, const cha
1959 if (bl) value = strdup("selected"); 1968 if (bl) value = strdup("selected");
1960 else value = strdup("unselected"); 1969 else value = strdup("unselected");
1961 } 1970 }
1962 else if (eina_value_type_get(v) != EINA_VALUE_TYPE_ERROR) 1971 else
1963 { 1972 {
1964 value = eina_value_to_string(v); 1973 value = eina_value_to_string(v);
1965 } 1974 }