From 0f334da9864bfa409a54c6b52ec99904eb483dc4 Mon Sep 17 00:00:00 2001 From: Richard Underhill Date: Mon, 2 Mar 2015 15:09:31 +0000 Subject: [PATCH] Changed Type of PROPERTY_RENDERING_BACKEND to signed, to correct Property::Value construction from enum Change-Id: I0dcfb5b6325c53dc8d4b0aa855268ff18edd1218 Signed-off-by: Richard Underhill --- dali-toolkit/internal/controls/text-controls/text-field-impl.cpp | 2 +- dali-toolkit/internal/controls/text-controls/text-label-impl.cpp | 6 +++--- dali-toolkit/public-api/controls/text-controls/text-field.h | 4 ++-- dali-toolkit/public-api/controls/text-controls/text-label.h | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/dali-toolkit/internal/controls/text-controls/text-field-impl.cpp b/dali-toolkit/internal/controls/text-controls/text-field-impl.cpp index 53c5705..c4a636e 100644 --- a/dali-toolkit/internal/controls/text-controls/text-field-impl.cpp +++ b/dali-toolkit/internal/controls/text-controls/text-field-impl.cpp @@ -68,7 +68,7 @@ BaseHandle Create() TypeRegistration mType( typeid(Toolkit::TextField), typeid(Toolkit::Control), Create ); -PropertyRegistration property01( mType, "rendering-backend", Toolkit::TextField::PROPERTY_RENDERING_BACKEND, Property::UNSIGNED_INTEGER, &TextField::SetProperty, &TextField::GetProperty ); +PropertyRegistration property01( mType, "rendering-backend", Toolkit::TextField::PROPERTY_RENDERING_BACKEND, Property::INTEGER, &TextField::SetProperty, &TextField::GetProperty ); PropertyRegistration property02( mType, "placeholder-text", Toolkit::TextField::PROPERTY_PLACEHOLDER_TEXT, Property::STRING, &TextField::SetProperty, &TextField::GetProperty ); PropertyRegistration property03( mType, "text", Toolkit::TextField::PROPERTY_TEXT, Property::STRING, &TextField::SetProperty, &TextField::GetProperty ); PropertyRegistration property04( mType, "cursor-image", Toolkit::TextField::PROPERTY_CURSOR_IMAGE, Property::STRING, &TextField::SetProperty, &TextField::GetProperty ); diff --git a/dali-toolkit/internal/controls/text-controls/text-label-impl.cpp b/dali-toolkit/internal/controls/text-controls/text-label-impl.cpp index 5e5d9ba..7c7de29 100644 --- a/dali-toolkit/internal/controls/text-controls/text-label-impl.cpp +++ b/dali-toolkit/internal/controls/text-controls/text-label-impl.cpp @@ -60,7 +60,7 @@ BaseHandle Create() TypeRegistration mType( typeid(Toolkit::TextLabel), typeid(Toolkit::Control), Create ); -PropertyRegistration property1( mType, "rendering-backend", Toolkit::TextLabel::PROPERTY_RENDERING_BACKEND, Property::UNSIGNED_INTEGER, &TextLabel::SetProperty, &TextLabel::GetProperty ); +PropertyRegistration property1( mType, "rendering-backend", Toolkit::TextLabel::PROPERTY_RENDERING_BACKEND, Property::INTEGER, &TextLabel::SetProperty, &TextLabel::GetProperty ); PropertyRegistration property2( mType, "text", Toolkit::TextLabel::PROPERTY_TEXT, Property::STRING, &TextLabel::SetProperty, &TextLabel::GetProperty ); PropertyRegistration property3( mType, "multi-line", Toolkit::TextLabel::PROPERTY_MULTI_LINE, Property::STRING, &TextLabel::SetProperty, &TextLabel::GetProperty ); @@ -92,11 +92,11 @@ void TextLabel::SetProperty( BaseObject* object, Property::Index index, const Pr { case Toolkit::TextLabel::PROPERTY_RENDERING_BACKEND: { - unsigned int backend = value.Get< unsigned int >(); + unsigned int backend = value.Get< int >(); if( impl.mRenderingBackend != backend ) { - impl.mRenderingBackend = backend; + impl.mRenderingBackend = static_cast< unsigned int >( backend ); impl.mRenderer.Reset(); } break; diff --git a/dali-toolkit/public-api/controls/text-controls/text-field.h b/dali-toolkit/public-api/controls/text-controls/text-field.h index 941f495..293e293 100644 --- a/dali-toolkit/public-api/controls/text-controls/text-field.h +++ b/dali-toolkit/public-api/controls/text-controls/text-field.h @@ -41,7 +41,7 @@ class DALI_IMPORT_API TextField : public Control public: // Property indices - static const Property::Index PROPERTY_RENDERING_BACKEND; ///< name "rendering-backend", type UNSIGNED INT + static const Property::Index PROPERTY_RENDERING_BACKEND; ///< name "rendering-backend", type INT static const Property::Index PROPERTY_PLACEHOLDER_TEXT; ///< name "placeholder-text", type STRING static const Property::Index PROPERTY_TEXT; ///< name "text", type STRING static const Property::Index PROPERTY_CURSOR_IMAGE; ///< name "cursor-image", type STRING @@ -53,7 +53,7 @@ public: static const Property::Index PROPERTY_GRAB_HANDLE_IMAGE; ///< name "grab-handle-image", type STRING // Property names - static const std::string RENDERING_BACKEND_PROPERTY_NAME; ///< Property, name "rendering-backend", type UNSIGNED INT + static const std::string RENDERING_BACKEND_PROPERTY_NAME; ///< Property, name "rendering-backend", type INT static const std::string PLACEHOLDER_TEXT_PROPERTY_NAME; ///< Property, name "placeholder-text", type STRING static const std::string TEXT_PROPERTY_NAME; ///< Property, name "text", type STRING static const std::string CURSOR_IMAGE_PROPERTY_NAME; ///< Property, name "cursor-image", type STRING diff --git a/dali-toolkit/public-api/controls/text-controls/text-label.h b/dali-toolkit/public-api/controls/text-controls/text-label.h index 8391682..00398b3 100644 --- a/dali-toolkit/public-api/controls/text-controls/text-label.h +++ b/dali-toolkit/public-api/controls/text-controls/text-label.h @@ -43,12 +43,12 @@ class DALI_IMPORT_API TextLabel : public Control public: // Property indices - static const Property::Index PROPERTY_RENDERING_BACKEND; ///< name "rendering-backend", type UNSIGNED INT + static const Property::Index PROPERTY_RENDERING_BACKEND; ///< name "rendering-backend", type INT static const Property::Index PROPERTY_TEXT; ///< name "text", type STRING static const Property::Index PROPERTY_MULTI_LINE; ///< name "multi-line", type BOOLEAN // Property names - static const std::string RENDERING_BACKEND_PROPERTY_NAME; ///< Property, name "rendering-backend", type UNSIGNED INT + static const std::string RENDERING_BACKEND_PROPERTY_NAME; ///< Property, name "rendering-backend", type INT static const std::string TEXT_PROPERTY_NAME; ///< Property, name "text", type STRING static const std::string MULTI_LINE_PROPERTY_NAME; ///< Property, name "multi-line", type BOOLEAN -- 2.7.4