From 46272435211865654f9580d202a50006c2cf6b2a Mon Sep 17 00:00:00 2001 From: suhyung Eom Date: Thu, 10 Nov 2016 16:51:50 +0900 Subject: [PATCH] Apply deprecate macro and LOG Signed-off-by: suhyung Eom Change-Id: If9e0583d52cab9a036da0a93dd924c8a02bec999 --- dali/integration-api/debug.h | 2 ++ dali/internal/event/actors/actor-impl.cpp | 1 - dali/public-api/actors/actor.cpp | 6 ++++++ dali/public-api/actors/actor.h | 6 +++--- dali/public-api/actors/custom-actor-impl.h | 2 +- dali/public-api/common/dali-common.h | 6 ++++++ dali/public-api/common/stage.cpp | 2 ++ dali/public-api/common/stage.h | 2 +- dali/public-api/events/touch-event.cpp | 10 ++++++++++ dali/public-api/events/touch-event.h | 10 +++++----- dali/public-api/object/property-map.cpp | 7 +++++++ dali/public-api/object/property-map.h | 4 ++-- 12 files changed, 45 insertions(+), 13 deletions(-) diff --git a/dali/integration-api/debug.h b/dali/integration-api/debug.h index 8b17e38..828aa3a 100644 --- a/dali/integration-api/debug.h +++ b/dali/integration-api/debug.h @@ -90,6 +90,8 @@ DALI_IMPORT_API void UninstallLogFunction(); #define DALI_LOG_ERROR_NOFN(format, args...) Dali::Integration::Log::LogMessage(Dali::Integration::Log::DebugError, format, ## args) +#define DALI_LOG_WARNING_NOFN(format, args...) Dali::Integration::Log::LogMessage(Dali::Integration::Log::DebugWarning, format, ## args) + /** * Provides unfiltered logging for fps monitor */ diff --git a/dali/internal/event/actors/actor-impl.cpp b/dali/internal/event/actors/actor-impl.cpp index 2e9add2..a3ca220 100644 --- a/dali/internal/event/actors/actor-impl.cpp +++ b/dali/internal/event/actors/actor-impl.cpp @@ -1887,7 +1887,6 @@ bool Actor::EmitWheelEventSignal( const WheelEvent& event ) Dali::Actor::TouchSignalType& Actor::TouchedSignal() { - DALI_LOG_WARNING( "Deprecated: Use TouchSignal() instead\n" ); return mTouchedSignal; } diff --git a/dali/public-api/actors/actor.cpp b/dali/public-api/actors/actor.cpp index 25628ee..b96283f 100644 --- a/dali/public-api/actors/actor.cpp +++ b/dali/public-api/actors/actor.cpp @@ -247,11 +247,15 @@ Vector3 Actor::GetCurrentWorldPosition() const void Actor::SetPositionInheritanceMode( PositionInheritanceMode mode ) { + DALI_LOG_WARNING_NOFN("DEPRECATION WARNING: SetPositionInheritanceMode() is deprecated and will be removed from next release. Use SetInheritPosition() instead.\n" ); + GetImplementation(*this).SetPositionInheritanceMode( mode ); } PositionInheritanceMode Actor::GetPositionInheritanceMode() const { + DALI_LOG_WARNING_NOFN("DEPRECATION WARNING: GetPositionInheritanceMode() is deprecated and will be removed from next release. Use IsPositionInherited() instead.\n" ); + return GetImplementation(*this).GetPositionInheritanceMode(); } @@ -536,6 +540,8 @@ int Actor::GetHierarchyDepth() Actor::TouchSignalType& Actor::TouchedSignal() { + DALI_LOG_WARNING_NOFN("DEPRECATION WARNING: TouchedSignal() is deprecated and will be removed from next release. Use TouchSignal() instead.\n" ); + return GetImplementation(*this).TouchedSignal(); } diff --git a/dali/public-api/actors/actor.h b/dali/public-api/actors/actor.h index 927b10e..0dc0876 100644 --- a/dali/public-api/actors/actor.h +++ b/dali/public-api/actors/actor.h @@ -774,7 +774,7 @@ public: * @pre The Actor has been initialized. * @see PositionInheritanceMode */ - void SetPositionInheritanceMode( PositionInheritanceMode mode ); + void SetPositionInheritanceMode( PositionInheritanceMode mode ) DALI_DEPRECATED_API; /** * @brief Set whether a child actor inherits it's parent's position. @@ -799,7 +799,7 @@ public: * @return Return the position inheritance mode. * @pre The Actor has been initialized. */ - PositionInheritanceMode GetPositionInheritanceMode() const; + PositionInheritanceMode GetPositionInheritanceMode() const DALI_DEPRECATED_API; /** * @brief Returns whether the actor inherits its parent's position. @@ -1452,7 +1452,7 @@ public: // Signals * @return The signal to connect to. * @pre The Actor has been initialized. */ - TouchSignalType& TouchedSignal(); + TouchSignalType& TouchedSignal() DALI_DEPRECATED_API; /** * @brief This signal is emitted when touch input is received. diff --git a/dali/public-api/actors/custom-actor-impl.h b/dali/public-api/actors/custom-actor-impl.h index fadf9b5..b447244 100644 --- a/dali/public-api/actors/custom-actor-impl.h +++ b/dali/public-api/actors/custom-actor-impl.h @@ -174,7 +174,7 @@ public: * @return True if the event should be consumed. * @note CustomActorImpl::REQUIRES_TOUCH_EVENTS must be enabled during construction. See CustomActorImpl::CustomActorImpl( ActorFlags flags ). */ - virtual bool OnTouchEvent(const TouchEvent& event) = 0; + virtual bool OnTouchEvent(const TouchEvent& event) DALI_DEPRECATED_API = 0; /** * @brief Called after a hover-event is received by the owning actor. diff --git a/dali/public-api/common/dali-common.h b/dali/public-api/common/dali-common.h index 88f035f..8c28b19 100644 --- a/dali/public-api/common/dali-common.h +++ b/dali/public-api/common/dali-common.h @@ -53,6 +53,12 @@ # define DALI_INTERNAL #endif +#ifdef DEPRECATION_WARNING +#define DALI_DEPRECATED_API __attribute__((__visibility__("default"), deprecated)) +#else +#define DALI_DEPRECATED_API +#endif + #if defined (__GXX_EXPERIMENTAL_CXX0X__) || (__cplusplus >= 201103L) // C++0x support #define _CPP11 diff --git a/dali/public-api/common/stage.cpp b/dali/public-api/common/stage.cpp index 3d809a0..13825ff 100644 --- a/dali/public-api/common/stage.cpp +++ b/dali/public-api/common/stage.cpp @@ -146,6 +146,8 @@ Stage::EventProcessingFinishedSignalType& Stage::EventProcessingFinishedSignal() Stage::TouchedSignalType& Stage::TouchedSignal() { + DALI_LOG_WARNING_NOFN("DEPRECATION WARNING: TouchedSignal() is deprecated and will be removed from next release. Use TouchSignal() instead.\n" ); + return GetImplementation(*this).TouchedSignal(); } diff --git a/dali/public-api/common/stage.h b/dali/public-api/common/stage.h index 66d86c9..1602cc6 100644 --- a/dali/public-api/common/stage.h +++ b/dali/public-api/common/stage.h @@ -303,7 +303,7 @@ public: * @return The touch signal to connect to. * @note Motion events are not emitted. */ - TouchedSignalType& TouchedSignal(); + TouchedSignalType& TouchedSignal() DALI_DEPRECATED_API; /** * @brief This signal is emitted when the screen is touched and when the touch ends diff --git a/dali/public-api/events/touch-event.cpp b/dali/public-api/events/touch-event.cpp index 8090d74..acb8496 100644 --- a/dali/public-api/events/touch-event.cpp +++ b/dali/public-api/events/touch-event.cpp @@ -18,6 +18,9 @@ // CLASS HEADER #include +// EXTERNAL INCLUDES +#include + // INTERNAL INCLUDES #include @@ -27,24 +30,31 @@ namespace Dali TouchEvent::TouchEvent() : time(0) { + DALI_LOG_WARNING_NOFN("DEPRECATION WARNING: TouchEvent() is deprecated and will be removed from next release. Use TouchData instead.\n" ); } TouchEvent::TouchEvent(unsigned long time) : time(time) { + DALI_LOG_WARNING_NOFN("DEPRECATION WARNING: TouchEvent() is deprecated and will be removed from next release. Use TouchData instead.\n" ); } TouchEvent::~TouchEvent() { + DALI_LOG_WARNING_NOFN("DEPRECATION WARNING: ~TouchEvent() is deprecated and will be removed from next release. Use TouchData instead.\n" ); } unsigned int TouchEvent::GetPointCount() const { + DALI_LOG_WARNING_NOFN("DEPRECATION WARNING: GetPointCount() is deprecated and will be removed from next release. Use TouchData instead.\n" ); + return points.size(); } const TouchPoint& TouchEvent::GetPoint(unsigned int point) const { + DALI_LOG_WARNING_NOFN("DEPRECATION WARNING: GetPoint() is deprecated and will be removed from next release. Use TouchData instead.\n" ); + DALI_ASSERT_ALWAYS( point < points.size() && "No point at index" ); return points[point]; } diff --git a/dali/public-api/events/touch-event.h b/dali/public-api/events/touch-event.h index 92b6988..45d6498 100644 --- a/dali/public-api/events/touch-event.h +++ b/dali/public-api/events/touch-event.h @@ -47,7 +47,7 @@ struct DALI_IMPORT_API TouchEvent * @brief Default constructor * @SINCE_1_0.0 */ - TouchEvent(); + TouchEvent() DALI_DEPRECATED_API; /** * @DEPRECATED_1_1.37 @@ -55,14 +55,14 @@ struct DALI_IMPORT_API TouchEvent * @SINCE_1_0.0 * @param[in] time The time the event occurred */ - TouchEvent(unsigned long time); + TouchEvent(unsigned long time) DALI_DEPRECATED_API; /** * @DEPRECATED_1_1.37 * @brief Destructor * @SINCE_1_0.0 */ - ~TouchEvent(); + ~TouchEvent() DALI_DEPRECATED_API; // Data @@ -90,7 +90,7 @@ struct DALI_IMPORT_API TouchEvent * @SINCE_1_0.0 * @return Total number of Points. */ - unsigned int GetPointCount() const; + unsigned int GetPointCount() const DALI_DEPRECATED_API; /** * @DEPRECATED_1_1.37 @@ -104,7 +104,7 @@ struct DALI_IMPORT_API TouchEvent * @note "point" should be less than the value returned by GetPointCount(). * If out of range, then program asserts. */ - const TouchPoint& GetPoint(unsigned int point) const; + const TouchPoint& GetPoint(unsigned int point) const DALI_DEPRECATED_API; }; /** diff --git a/dali/public-api/object/property-map.cpp b/dali/public-api/object/property-map.cpp index fddcaa4..ebd95a8 100644 --- a/dali/public-api/object/property-map.cpp +++ b/dali/public-api/object/property-map.cpp @@ -18,6 +18,9 @@ // CLASS HEADER #include +// EXTERNAL INCLUDES +#include + // INTERNAL INCLUDES #include @@ -100,6 +103,8 @@ Property::Value& Property::Map::GetValue( SizeType position ) const const std::string& Property::Map::GetKey( SizeType position ) const { + DALI_LOG_WARNING_NOFN("DEPRECATION WARNING: GetKey() is deprecated and will be removed from next release.\n" ); + SizeType numStringKeys = mImpl->mStringValueContainer.size(); DALI_ASSERT_ALWAYS( position < numStringKeys && "position out-of-bounds" ); @@ -126,6 +131,8 @@ Property::Key Property::Map::GetKeyAt( SizeType position ) const StringValuePair& Property::Map::GetPair( SizeType position ) const { + DALI_LOG_WARNING_NOFN("DEPRECATION WARNING: GetPair() is deprecated and will be removed from next release.\n" ); + SizeType numStringKeys = mImpl->mStringValueContainer.size(); DALI_ASSERT_ALWAYS( position < ( numStringKeys ) && "position out-of-bounds" ); diff --git a/dali/public-api/object/property-map.h b/dali/public-api/object/property-map.h index 307f31a..008c5aa 100644 --- a/dali/public-api/object/property-map.h +++ b/dali/public-api/object/property-map.h @@ -183,7 +183,7 @@ public: * * @note Will assert if position >= Count() */ - const std::string& GetKey( SizeType position ) const; + const std::string& GetKey( SizeType position ) const DALI_DEPRECATED_API; /** * @brief Retrieve the key at the specified position. @@ -206,7 +206,7 @@ public: * * @note Will assert if position >= Count() or key at position is an index key. */ - StringValuePair& GetPair( SizeType position ) const; + StringValuePair& GetPair( SizeType position ) const DALI_DEPRECATED_API; /** * @brief Retrieve the key & the value at the specified position. -- 2.7.4