Change DebugPriority name 13/285613/3
authorHeeyong Song <heeyong.song@samsung.com>
Thu, 15 Dec 2022 09:12:23 +0000 (18:12 +0900)
committerHeeyong Song <heeyong.song@samsung.com>
Mon, 19 Dec 2022 00:18:08 +0000 (09:18 +0900)
Change-Id: I6558c8cebec6a26119afd93d7b427490081de9fc

automated-tests/src/dali-scene3d/utc-Dali-StringCallback.cpp
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-application.cpp
dali-toolkit/internal/controls/flex-container/flex-container-impl.cpp
dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-impl.cpp
dali-toolkit/internal/controls/table-view/table-view-impl.cpp
dali-toolkit/public-api/visuals/image-visual-properties.h

index f89ec02..3b80905 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 // Enable debug log for test coverage
 #define DEBUG_ENABLED 1
 
-#include "dali-scene3d/public-api/loader/string-callback.h"
 #include <dali-test-suite-utils.h>
 #include <string_view>
+#include "dali-scene3d/public-api/loader/string-callback.h"
 
 using namespace Dali;
 using namespace Dali::Scene3D::Loader;
 
 namespace
 {
-
 char sBuffer[64];
 
 void TestLogFunction(Integration::Log::DebugPriority level, std::string& str)
@@ -35,12 +34,12 @@ void TestLogFunction(Integration::Log::DebugPriority level, std::string& str)
   snprintf(sBuffer, sizeof(sBuffer), "%d: %s", level, str.c_str());
 }
 
-}
+} // namespace
 
 int UtcDaliUtilsDefaultStringCallback(void)
 {
   InstallLogFunction(TestLogFunction);
   DefaultErrorCallback("Hello world!");
-  DALI_TEST_EQUAL(std::string(sBuffer), "2: string-callback.cpp: DefaultErrorCallback(28) > Hello world!");
+  DALI_TEST_EQUAL(std::string(sBuffer), "3: string-callback.cpp: DefaultErrorCallback(28) > Hello world!");
   END_TEST;
 }
index 873b7b3..e4c6078 100644 (file)
@@ -117,13 +117,16 @@ void TestApplication::LogMessage(Dali::Integration::Log::DebugPriority level, st
   {
     switch(level)
     {
-      case Dali::Integration::Log::DebugInfo:
+      case Dali::Integration::Log::DEBUG:
+        fprintf(stderr, "DEBUG: %s", message.c_str());
+        break;
+      case Dali::Integration::Log::INFO:
         fprintf(stderr, "INFO: %s", message.c_str());
         break;
-      case Dali::Integration::Log::DebugWarning:
+      case Dali::Integration::Log::WARNING:
         fprintf(stderr, "WARN: %s", message.c_str());
         break;
-      case Dali::Integration::Log::DebugError:
+      case Dali::Integration::Log::ERROR:
         fprintf(stderr, "ERROR: %s", message.c_str());
         break;
       default:
index b220445..51b9be2 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -39,7 +39,7 @@ namespace
 // currently not called from code so compiler will optimize these away, kept here for future debugging
 
 #define FLEX_CONTAINER_TAG "DALI Toolkit::FlexContainer "
-#define FC_LOG(fmt, args, ...) Debug::LogMessageWithFunctionLine(Debug::DebugInfo, FLEX_CONTAINER_TAG fmt, ##args)
+#define FC_LOG(fmt, args, ...) Debug::LogMessageWithFunctionLine(Debug::INFO, FLEX_CONTAINER_TAG fmt, ##args)
 // #define FLEX_CONTAINER_DEBUG 1
 
 #if defined(FLEX_CONTAINER_DEBUG)
index 3779e35..986040b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -44,7 +44,7 @@
 //#define ENABLED_SCROLL_STATE_LOGGING
 
 #ifdef ENABLED_SCROLL_STATE_LOGGING
-#define DALI_LOG_SCROLL_STATE(format, ...) Dali::Integration::Log::LogMessageWithFunctionLine(Dali::Integration::Log::DebugInfo, "%s:%d " format "\n", __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__)
+#define DALI_LOG_SCROLL_STATE(format, ...) Dali::Integration::Log::LogMessageWithFunctionLine(Dali::Integration::Log::INFO, "%s:%d " format "\n", __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__)
 #else
 #define DALI_LOG_SCROLL_STATE(format, ...)
 #endif
@@ -532,11 +532,11 @@ void SnapWithVelocity(
 
 Dali::Vector2 GetPosition(Dali::Actor actor)
 {
-  Vector2     screenPosition          = actor.GetProperty<Vector2>(Actor::Property::SCREEN_POSITION);
-  Vector3     size                    = actor.GetCurrentProperty<Vector3>(Actor::Property::SIZE) * actor.GetCurrentProperty<Vector3>(Actor::Property::WORLD_SCALE);
-  bool        positionUsesAnchorPoint = actor.GetProperty<bool>(Actor::Property::POSITION_USES_ANCHOR_POINT);
-  Vector3     anchorPointOffSet       = size * (positionUsesAnchorPoint ? actor.GetCurrentProperty<Vector3>(Actor::Property::ANCHOR_POINT) : AnchorPoint::TOP_LEFT);
-  Vector2     position                = Vector2(screenPosition.x - anchorPointOffSet.x, screenPosition.y - anchorPointOffSet.y);
+  Vector2 screenPosition          = actor.GetProperty<Vector2>(Actor::Property::SCREEN_POSITION);
+  Vector3 size                    = actor.GetCurrentProperty<Vector3>(Actor::Property::SIZE) * actor.GetCurrentProperty<Vector3>(Actor::Property::WORLD_SCALE);
+  bool    positionUsesAnchorPoint = actor.GetProperty<bool>(Actor::Property::POSITION_USES_ANCHOR_POINT);
+  Vector3 anchorPointOffSet       = size * (positionUsesAnchorPoint ? actor.GetCurrentProperty<Vector3>(Actor::Property::ANCHOR_POINT) : AnchorPoint::TOP_LEFT);
+  Vector2 position                = Vector2(screenPosition.x - anchorPointOffSet.x, screenPosition.y - anchorPointOffSet.y);
 
   return position;
 }
index 2afc0da..d75d100 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -51,7 +51,7 @@ bool FitToChild(Actor actor, Dimension::Type dimension)
 // currently not called from code so compiler will optimize these away, kept here for future debugging
 
 #define TABLEVIEW_TAG "DALI Toolkit::TableView "
-#define TV_LOG(fmt, args, ...) Debug::LogMessageWithFunctionLine(Debug::DebugInfo, TABLEVIEW_TAG fmt, ##args)
+#define TV_LOG(fmt, args, ...) Debug::LogMessageWithFunctionLine(Debug::INFO, TABLEVIEW_TAG fmt, ##args)
 //#define TABLEVIEW_DEBUG 1
 
 #if defined(TABLEVIEW_DEBUG)
index 29b9409..2586547 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_IMAGE_VISUAL_PROPERTIES_H
 
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -245,7 +245,7 @@ enum
    * @brief The policy to determine when an image should no longer be cached.
    * @details Name "releasePolicy", Type ReleasePolicy::Type (Property::INTEGER) or Property::STRING
    * @SINCE_1_3_5
-   * @note Default ReleasePolicy::DESTROYED
+   * @note Default ReleasePolicy::DETACHED
    * @see ReleasePolicy::Type
    */
   RELEASE_POLICY,