From: Adeel Kazmi Date: Wed, 10 Dec 2014 11:35:01 +0000 (+0000) Subject: (Control) Make Control constructors explicit X-Git-Tag: accepted/tizen/common/20141211.150149^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=703cd0df6b257f83c72bff2e7bf07d6e5a21ecd4;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git (Control) Make Control constructors explicit Change-Id: I917c039a8808470771d939dd33053965e23431a6 --- diff --git a/base/dali-toolkit/public-api/controls/control-impl.cpp b/base/dali-toolkit/public-api/controls/control-impl.cpp index bea8263..d678af6 100644 --- a/base/dali-toolkit/public-api/controls/control-impl.cpp +++ b/base/dali-toolkit/public-api/controls/control-impl.cpp @@ -1101,7 +1101,7 @@ void Control::Initialize() styleManager.StyleChangeSignal().Connect( this, &Control::DoStyleChange ); // SetTheme - GetImpl( styleManager ).ApplyThemeStyle( GetOwner() ); + GetImpl( styleManager ).ApplyThemeStyle( Toolkit::Control( GetOwner() ) ); } SetRequiresHoverEvents(mImpl->mFlags & REQUIRES_HOVER_EVENTS); @@ -1204,7 +1204,7 @@ void Control::OnActivated() void Control::OnThemeChange( Toolkit::StyleManager styleManager ) { - GetImpl( styleManager ).ApplyThemeStyle( GetOwner() ); + GetImpl( styleManager ).ApplyThemeStyle( Toolkit::Control( GetOwner() ) ); } void Control::OnFontChange( bool defaultFontChange, bool defaultFontSizeChange ) diff --git a/base/dali-toolkit/public-api/controls/control.h b/base/dali-toolkit/public-api/controls/control.h index 8d4d732..e50c544 100644 --- a/base/dali-toolkit/public-api/controls/control.h +++ b/base/dali-toolkit/public-api/controls/control.h @@ -380,15 +380,17 @@ public: */ KeyEventSignalV2& KeyEventSignal(); -public: // Intended for control developers (used implicitly) +public: // Intended for control developers /** * @brief Create an initialised Control. * * @param[in] implementation The implementation for this control. * @return A handle to a newly allocated Dali resource. + * + * @note Should NOT be called to create a handle from the implementation. As stated, this allocates a NEW Dali resource. */ - Control(Internal::Control& implementation); + explicit Control(Internal::Control& implementation); /** * @brief This constructor is used by CustomActor within Dali core to create additional Control handles @@ -396,7 +398,7 @@ public: // Intended for control developers (used implicitly) * * @param [in] internal A pointer to a newly allocated Dali resource */ - Control(Dali::Internal::CustomActor* internal); + explicit Control(Dali::Internal::CustomActor* internal); public: // Templates for Deriving Classes