From: Kimmo Hoikka Date: Tue, 10 Mar 2015 17:33:43 +0000 (+0000) Subject: Remove unused FindActorByAlias X-Git-Tag: dali_1.0.33~1 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=commitdiff_plain;h=2d176ad7e81d50e266dced075281b7a2a92f6b45 Remove unused FindActorByAlias Change-Id: I6838d61433ebcf1c84d4d42846ca7abf7a8d5d1c --- diff --git a/dali-toolkit/internal/builder/builder-signals.cpp b/dali-toolkit/internal/builder/builder-signals.cpp index 40428e3..0efd85b 100644 --- a/dali-toolkit/internal/builder/builder-signals.cpp +++ b/dali-toolkit/internal/builder/builder-signals.cpp @@ -43,12 +43,12 @@ using namespace Dali; // Signal Actions // -// Action on child actor. The child is found by alias so can be 'previous' etc. +// Action on child actor. The child is found by name struct ChildActorAction { std::string actorName; std::string actionName; - std::string childAlias; + std::string childName; PropertyValueContainer parameters; void operator()(void) @@ -57,7 +57,7 @@ struct ChildActorAction if(actor) { - Actor child_actor = actor.FindChildByAlias(childAlias); + Actor child_actor = actor.FindChildByName(childName); if(child_actor) { @@ -65,7 +65,7 @@ struct ChildActorAction } else { - DALI_SCRIPT_WARNING("Could not find child by alias '%s'\n", childAlias.c_str()); + DALI_SCRIPT_WARNING("Could not find child by name '%s'\n", childName.c_str()); } } }; @@ -239,7 +239,7 @@ boost::function GetAction(const TreeNode &root, const TreeNode &chi { ChildActorAction action; action.actorName = *actorName; - action.childAlias = *childActorName; + action.childName = *childActorName; action.actionName = *actionName; GetParameters(child, action.parameters); callback = action; diff --git a/dali-toolkit/public-api/controls/control-impl.cpp b/dali-toolkit/public-api/controls/control-impl.cpp index 16a009b..b79badd 100644 --- a/dali-toolkit/public-api/controls/control-impl.cpp +++ b/dali-toolkit/public-api/controls/control-impl.cpp @@ -1308,11 +1308,6 @@ bool Control::OnMouseWheelEvent(const MouseWheelEvent& event) return false; // Do not consume } -Actor Control::GetChildByAlias(const std::string& actorAlias) -{ - return Actor(); -} - void Control::OnStageConnection() { RelayoutRequest(); diff --git a/dali-toolkit/public-api/controls/control-impl.h b/dali-toolkit/public-api/controls/control-impl.h index 72c0535..a441b07 100644 --- a/dali-toolkit/public-api/controls/control-impl.h +++ b/dali-toolkit/public-api/controls/control-impl.h @@ -646,11 +646,6 @@ private: */ virtual bool OnMouseWheelEvent(const MouseWheelEvent& event); - /** - * @copydoc Dali::CustomActorImpl::GetChildByAlias(const std::string& actorAlias) - */ - virtual Actor GetChildByAlias(const std::string& actorAlias); - // From CustomActorImpl, derived classes should NOT override these. /** diff --git a/plugins/dali-script-v8/src/actors/actor-api.cpp b/plugins/dali-script-v8/src/actors/actor-api.cpp index ebc1fa7..89a3a67 100644 --- a/plugins/dali-script-v8/src/actors/actor-api.cpp +++ b/plugins/dali-script-v8/src/actors/actor-api.cpp @@ -335,39 +335,6 @@ void ActorApi::FindChildByName( const v8::FunctionCallbackInfo& args } /** - * Search through this actor's hierarchy for an actor with the given name or alias. - * - * Actors can customize this function to provide actors with preferred alias' - * For example 'previous' could return the last selected child. - * If no aliased actor is found then FindChildByName() is called. - * - * @for Actor - * @method findChildByAlias - * @param {String} actor alias - * @return {Object} actor on success, empty actor handle if not found - */ -void ActorApi::FindChildByAlias( const v8::FunctionCallbackInfo& args ) -{ - v8::Isolate* isolate = args.GetIsolate(); - v8::HandleScope handleScope( isolate ); - Actor parent = GetActor( isolate, args ); - bool found( false ); - std::string name = V8Utils::GetStringParameter( PARAMETER_0, found, isolate, args ); - if( !found ) - { - DALI_SCRIPT_EXCEPTION( isolate, "String parameter not found" ); - return; - } - Actor childActor = parent.FindChildByAlias( name ); - if( childActor ) - { - // wrap the child - v8::Local < v8::Object > wrappedLayer = ActorWrapper::WrapActor( isolate, childActor ); - args.GetReturnValue().Set( wrappedLayer ); - } -} - -/** * Search through this actor's hierarchy for an actor with the given unique ID. * The actor itself is also considered in the search * diff --git a/plugins/dali-script-v8/src/actors/actor-api.h b/plugins/dali-script-v8/src/actors/actor-api.h index 38bc95a..8b27961 100644 --- a/plugins/dali-script-v8/src/actors/actor-api.h +++ b/plugins/dali-script-v8/src/actors/actor-api.h @@ -58,7 +58,6 @@ namespace ActorApi void Unparent( const v8::FunctionCallbackInfo< v8::Value >& args); void GetChildAt( const v8::FunctionCallbackInfo< v8::Value >& args); void FindChildByName( const v8::FunctionCallbackInfo< v8::Value >& args); - void FindChildByAlias( const v8::FunctionCallbackInfo< v8::Value >& args); void FindChildById( const v8::FunctionCallbackInfo< v8::Value >& args); void GetParent( const v8::FunctionCallbackInfo< v8::Value >& args ); void GetChildCount( const v8::FunctionCallbackInfo< v8::Value >& args ); diff --git a/plugins/dali-script-v8/src/actors/actor-wrapper.cpp b/plugins/dali-script-v8/src/actors/actor-wrapper.cpp index 7d10f3a..dded413 100644 --- a/plugins/dali-script-v8/src/actors/actor-wrapper.cpp +++ b/plugins/dali-script-v8/src/actors/actor-wrapper.cpp @@ -199,7 +199,6 @@ const ActorFunctions ActorFunctionTable[]= { "GetChildCount", ActorApi::GetChildCount, ACTOR_API }, { "GetChildAt" , ActorApi::GetChildAt, ACTOR_API }, { "FindChildByName", ActorApi::FindChildByName, ACTOR_API }, - { "FindChildByAlias", ActorApi::FindChildByAlias, ACTOR_API }, { "FindChildById", ActorApi::FindChildById, ACTOR_API }, { "GetParent" , ActorApi::GetParent, ACTOR_API }, { "GetActorType" , ActorApi::GetActorType, ACTOR_API }, // custom for javascript