From a374a6ce52670dc0e5b96e1fd5cc4e8eb6c7c552 Mon Sep 17 00:00:00 2001 From: Mykola Alieksieiev Date: Wed, 30 Dec 2015 20:51:56 +0200 Subject: [PATCH] TizenRefApp-5315 Crash in Composer fixed Change-Id: Ifa41610b952ea2b7352e223a55b7ce57ea5f9ba7 Signed-off-by: Mykola Alieksieiev --- src/Conversation/Recipients/View/inc/RecipientsPanelView.h | 2 +- src/Conversation/Recipients/View/src/RecipientsPanelView.cpp | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Conversation/Recipients/View/inc/RecipientsPanelView.h b/src/Conversation/Recipients/View/inc/RecipientsPanelView.h index bdf3132..4b9a7ab 100644 --- a/src/Conversation/Recipients/View/inc/RecipientsPanelView.h +++ b/src/Conversation/Recipients/View/inc/RecipientsPanelView.h @@ -71,7 +71,7 @@ namespace Msg void onItemDeleted(Evas_Object *obj, void *item); void onItemAdded(Evas_Object *obj, void *item); void onItemClicked(Evas_Object *obj, void *item); - void onItemPressed(Evas_Object *obj, void *item); + static void onItemPressed(void *data, Evas_Object *obj, void *eventInfo); Eina_Bool onMbeFilter(Evas_Object *obj, const char *item_label, const void *item_data); void onMbeFocused(Evas_Object *obj, void *event_info); diff --git a/src/Conversation/Recipients/View/src/RecipientsPanelView.cpp b/src/Conversation/Recipients/View/src/RecipientsPanelView.cpp index 0ba9c8f..5ec61c2 100644 --- a/src/Conversation/Recipients/View/src/RecipientsPanelView.cpp +++ b/src/Conversation/Recipients/View/src/RecipientsPanelView.cpp @@ -45,8 +45,8 @@ RecipientsPanelView::~RecipientsPanelView() void RecipientsPanelView::appendItem(RecipientViewItem &item) { item.m_pOwner = this; - Elm_Object_Item *elmItem = elm_multibuttonentry_item_append(m_pMbe, item.getDisplayName().c_str(), - SMART_CALLBACK(RecipientsPanelView, onItemPressed), &item); + Elm_Object_Item *elmItem = elm_multibuttonentry_item_append(m_pMbe, item.getDisplayName().c_str(), &onItemPressed, &item); + if(elmItem) item.setElmObjItem(elmItem); else @@ -306,10 +306,10 @@ void RecipientsPanelView::onItemClicked(Evas_Object *obj, void *item) onItemClicked(*it); } -void RecipientsPanelView::onItemPressed(Evas_Object *obj, void *item) +void RecipientsPanelView::onItemPressed(void *data, Evas_Object *obj, void *eventInfo) { - RecipientViewItem* it = getItem(item); - onItemPressed(*it); + RecipientViewItem* it = static_cast(data); + it->m_pOwner->onItemPressed(*it); } Eina_Bool RecipientsPanelView::onMbeFilter(Evas_Object *obj, const char *item_label, const void *item_data) -- 2.7.4