From: minho.sun Date: Thu, 10 Aug 2017 04:37:18 +0000 (+0900) Subject: Make warning message instead of Assert when getting Child Property X-Git-Tag: dali_1.2.54~5^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=eadac33bcede59f0e1029f7611629fcea30d58ad;p=platform%2Fcore%2Fuifw%2Fdali-core.git Make warning message instead of Assert when getting Child Property If there is no child property, makes warning message instead of Assert and ignores behaviour. Change-Id: I0ac8936e203607a14a6891228b54955cf3702f7a Signed-off-by: minho.sun --- diff --git a/automated-tests/src/dali/utc-Dali-TypeRegistry.cpp b/automated-tests/src/dali/utc-Dali-TypeRegistry.cpp index 0594fe5..f184936 100644 --- a/automated-tests/src/dali/utc-Dali-TypeRegistry.cpp +++ b/automated-tests/src/dali/utc-Dali-TypeRegistry.cpp @@ -1715,6 +1715,8 @@ int UtcDaliTypeRegistryChildPropertyRegistrationP(void) Property::Type type = typeInfoImpl.GetChildPropertyType( typeInfoImpl.GetChildPropertyIndex("childProp4") ); DALI_TEST_EQUALS( type, Property::INTEGER, TEST_LOCATION ); + std::string unRegisteredChildName( typeInfoImpl.GetChildPropertyName( CHILD_PROPERTY_REGISTRATION_START_INDEX + 4 ) ); + DALI_TEST_EQUALS( unRegisteredChildName, "", TEST_LOCATION ); // Create a child actor Actor childActor = Actor::New(); diff --git a/dali/internal/event/common/type-info-impl.cpp b/dali/internal/event/common/type-info-impl.cpp index fec8ead..c8dadae 100644 --- a/dali/internal/event/common/type-info-impl.cpp +++ b/dali/internal/event/common/type-info-impl.cpp @@ -639,7 +639,10 @@ const std::string& TypeInfo::GetChildPropertyName( Property::Index index ) const return GetImplementation(base).GetChildPropertyName( index ); } - DALI_ASSERT_ALWAYS( ! "Cannot find property index" ); // use the same assert as Object + DALI_LOG_WARNING("Cannot find property index"); + + static std::string emptyString; + return emptyString; } Property::Type TypeInfo::GetChildPropertyType( Property::Index index ) const