From d585c0f0d53c488eb5026d2e9c49e90698b20181 Mon Sep 17 00:00:00 2001 From: Victor Cebollada Date: Fri, 25 Jul 2014 13:37:10 +0100 Subject: [PATCH] Toolkit - Fixes TC build issues and compile warnings. Change-Id: If614e5935e1ba1513df945eb080b155e8ab7afa1 Signed-off-by: Victor Cebollada --- .../dali-toolkit-internal/utc-Dali-TextView.cpp | 10 +++---- .../dali-toolkit-unmanaged/utc-Dali-JsonParser.cpp | 4 +++ .../utc-Dali-KeyInputFocusManager.cpp | 2 +- .../dali-toolkit-unmanaged/utc-Dali-ScrollView.cpp | 13 --------- .../dali-toolkit-unmanaged/utc-Dali-TextInput.cpp | 6 ++-- .../dali-test-suite-utils.h | 1 - .../dali-toolkit-test-utils/test-gl-abstraction.h | 1 - .../src/dali-toolkit/utc-Dali-PushButton.cpp | 3 -- .../src/dali-toolkit/utc-Dali-ScrollViewEffect.cpp | 32 ---------------------- 9 files changed, 13 insertions(+), 59 deletions(-) diff --git a/automated-tests/src/dali-toolkit-internal/utc-Dali-TextView.cpp b/automated-tests/src/dali-toolkit-internal/utc-Dali-TextView.cpp index f9744cc..7d39047 100644 --- a/automated-tests/src/dali-toolkit-internal/utc-Dali-TextView.cpp +++ b/automated-tests/src/dali-toolkit-internal/utc-Dali-TextView.cpp @@ -236,16 +236,16 @@ void Print( const TextStyle& style ) std::cout << " : " << style.GetFontPointSize() << std::endl; std::cout << " : " << style.GetWeight() << std::endl; std::cout << " : " << style.GetTextColor() << std::endl; - std::cout << " : " << style.GetItalics() << std::endl; - std::cout << " : " << style.GetUnderline() << std::endl; - std::cout << " : " << style.GetShadow() << std::endl; + std::cout << " : " << style.IsItalicsEnabled() << std::endl; + std::cout << " : " << style.IsUnderlineEnabled() << std::endl; + std::cout << " : " << style.IsShadowEnabled() << std::endl; std::cout << " : " << style.GetShadowColor() << std::endl; std::cout << " : " << style.GetShadowOffset() << std::endl; - std::cout << " : " << style.GetGlow() << std::endl; + std::cout << " : " << style.IsGlowEnabled() << std::endl; std::cout << " : " << style.GetGlowColor() << std::endl; std::cout << " : " << style.GetGlowIntensity() << std::endl; std::cout << " : " << style.GetSmoothEdge() << std::endl; - std::cout << " : " << style.GetOutline() << std::endl; + std::cout << " : " << style.IsOutlineEnabled() << std::endl; std::cout << " : " << style.GetOutlineThickness() << std::endl; } diff --git a/automated-tests/src/dali-toolkit-unmanaged/utc-Dali-JsonParser.cpp b/automated-tests/src/dali-toolkit-unmanaged/utc-Dali-JsonParser.cpp index 8a85198..a1ebacd 100644 --- a/automated-tests/src/dali-toolkit-unmanaged/utc-Dali-JsonParser.cpp +++ b/automated-tests/src/dali-toolkit-unmanaged/utc-Dali-JsonParser.cpp @@ -90,6 +90,10 @@ void CompareTrees(const TreeNode& a, const TreeNode& b) DALI_TEST_CHECK( a.GetBoolean() == b.GetBoolean() ); break; } + default: + { + break; + } } } diff --git a/automated-tests/src/dali-toolkit-unmanaged/utc-Dali-KeyInputFocusManager.cpp b/automated-tests/src/dali-toolkit-unmanaged/utc-Dali-KeyInputFocusManager.cpp index d004365..2e087c3 100644 --- a/automated-tests/src/dali-toolkit-unmanaged/utc-Dali-KeyInputFocusManager.cpp +++ b/automated-tests/src/dali-toolkit-unmanaged/utc-Dali-KeyInputFocusManager.cpp @@ -296,7 +296,7 @@ int UtcDaliKeyInputFocusManagerSignalUnhandledKeyEvent(void) DALI_TEST_CHECK(event.keyName == data.receivedKeyEvent.keyPressedName ); DALI_TEST_CHECK(event.keyCode == data.receivedKeyEvent.keyCode); DALI_TEST_CHECK(event.keyString == data.receivedKeyEvent.keyPressed ); - DALI_TEST_CHECK(event.state == data.receivedKeyEvent.state ); + DALI_TEST_CHECK(static_cast( event.state ) == static_cast( data.receivedKeyEvent.state ) ); data.Reset(); diff --git a/automated-tests/src/dali-toolkit-unmanaged/utc-Dali-ScrollView.cpp b/automated-tests/src/dali-toolkit-unmanaged/utc-Dali-ScrollView.cpp index d554677..267e811 100644 --- a/automated-tests/src/dali-toolkit-unmanaged/utc-Dali-ScrollView.cpp +++ b/automated-tests/src/dali-toolkit-unmanaged/utc-Dali-ScrollView.cpp @@ -143,9 +143,7 @@ int Wait(ToolkitTestApplication& application, int duration = 0) static bool gOnScrollStartCalled; ///< Whether the OnScrollStart signal was invoked. static bool gOnScrollUpdateCalled; ///< Whether the OnScrollUpdate signal was invoked. static bool gOnScrollCompleteCalled; ///< Whether the OnScrollComplete signal was invoked. -static bool gOnScrollClampedCalled; ///< Whether the OnScrollClamped signal was invoked. static bool gOnSnapStartCalled; ///< Whether the OnSnapStart signal was invoked. -static ClampState3 gLastClampPosition; ///< Clamping information from OnScrollClampedEvent. static SnapType gLastSnapType; ///< Snaping information from SnapEvent. static Vector3 gConstraintResult; ///< Result from constraint. @@ -180,17 +178,6 @@ static void OnScrollComplete( const Vector3& position ) } /** - * Invoked when scrolling clamped. - * - * @param[in] event The position/scale/rotation axes that were clamped. - */ -static void OnScrollClamped( const ScrollView::ClampEvent& event ) -{ - gOnScrollClampedCalled = true; - gLastClampPosition = event.position; -} - -/** * Invoked when a snap or flick started. * * @param[in] event The type of snap and the target position/scale/rotation. diff --git a/automated-tests/src/dali-toolkit-unmanaged/utc-Dali-TextInput.cpp b/automated-tests/src/dali-toolkit-unmanaged/utc-Dali-TextInput.cpp index 244e936..52d91f4 100644 --- a/automated-tests/src/dali-toolkit-unmanaged/utc-Dali-TextInput.cpp +++ b/automated-tests/src/dali-toolkit-unmanaged/utc-Dali-TextInput.cpp @@ -182,7 +182,7 @@ int UtcDaliTextInputGetStyleAtCursor(void) TextStyle retreivedStyleAtCursor = textInput.GetStyleAtCursor(); DALI_TEST_CHECK( style == retreivedStyleAtCursor ); - DALI_TEST_CHECK( !retreivedStyleAtCursor.GetItalics() ); + DALI_TEST_CHECK( !retreivedStyleAtCursor.IsItalicsEnabled() ); tet_infoline("Set style before adding new character"); style.SetItalics( true ); @@ -196,10 +196,10 @@ int UtcDaliTextInputGetStyleAtCursor(void) tet_infoline("Confirm style at cursor is correct style"); retreivedStyleAtCursor = textInput.GetStyleAtCursor(); - DALI_TEST_CHECK( retreivedStyleAtCursor.GetItalics() ); + DALI_TEST_CHECK( retreivedStyleAtCursor.IsItalicsEnabled() ); tet_infoline("Confirm style at cursor is not a style that was not set"); - DALI_TEST_CHECK( !retreivedStyleAtCursor.GetUnderline() ); + DALI_TEST_CHECK( !retreivedStyleAtCursor.IsUnderlineEnabled() ); tet_infoline("Confirm markup text is correct"); DALI_TEST_EQUALS( styledString, textInput.GetMarkupText(), TEST_LOCATION); diff --git a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/dali-test-suite-utils.h b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/dali-test-suite-utils.h index dee880b..082c2dd 100644 --- a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/dali-test-suite-utils.h +++ b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/dali-test-suite-utils.h @@ -20,7 +20,6 @@ // INTERNAL INCLUDES #include -#include #include void tet_infoline(const char*str); diff --git a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-gl-abstraction.h b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-gl-abstraction.h index c17fa22..efd8a5b 100644 --- a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-gl-abstraction.h +++ b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-gl-abstraction.h @@ -24,7 +24,6 @@ #include // INTERNAL INCLUDES -#include #include #include #include diff --git a/automated-tests/src/dali-toolkit/utc-Dali-PushButton.cpp b/automated-tests/src/dali-toolkit/utc-Dali-PushButton.cpp index 723d35d..79c39d7 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-PushButton.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-PushButton.cpp @@ -73,9 +73,6 @@ const Dali::TouchPoint pointMotionOut( 0, TouchPoint::Motion, 10, 10 ); const Dali::TouchPoint pointDownOutside( 0, TouchPoint::Down, 10, 10 ); const Dali::TouchPoint pointUpOutside( 0, TouchPoint::Up, 10, 10 ); -static bool gOnTouchPointInterrupted = false; - - Image CreateSolidColorImage( const Vector4& color, unsigned int width, unsigned int height ) { BitmapImage imageData = BitmapImage::New( width, height, Pixel::RGBA8888 ); diff --git a/automated-tests/src/dali-toolkit/utc-Dali-ScrollViewEffect.cpp b/automated-tests/src/dali-toolkit/utc-Dali-ScrollViewEffect.cpp index 9c89b59..553dc7a 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-ScrollViewEffect.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-ScrollViewEffect.cpp @@ -42,12 +42,6 @@ void utc_dali_toolkit_scroll_view_effect_cleanup(void) namespace { -static bool gObjectCreatedCallBackCalled; - -static void TestCallback(BaseHandle handle) -{ - gObjectCreatedCallBackCalled = true; -} const int MILLISECONDS_PER_SECOND = 1000; const int RENDER_FRAME_INTERVAL = 16; ///< Duration of each frame in ms. (at approx 60FPS) @@ -100,10 +94,6 @@ RulerPtr CreateRuler(float gridSize = 0.0f) static bool gOnScrollStartCalled; ///< Whether the OnScrollStart signal was invoked. static bool gOnScrollUpdateCalled; ///< Whether the OnScrollUpdate signal was invoked. static bool gOnScrollCompleteCalled; ///< Whether the OnScrollComplete signal was invoked. -static bool gOnScrollClampedCalled; ///< Whether the OnScrollClamped signal was invoked. -static bool gOnSnapStartCalled; ///< Whether the OnSnapStart signal was invoked. -static ClampState3 gLastClampPosition; ///< Clamping information from OnScrollClampedEvent. -static SnapType gLastSnapType; ///< Snaping information from SnapEvent. static Vector3 gConstraintResult; ///< Result from constraint. static ActorContainer gPages; ///< Keeps track of all the pages for applying effects. @@ -145,28 +135,6 @@ static void OnScrollComplete( const Vector3& position ) gOnScrollCompleteCalled = true; } -/** - * Invoked when scrolling clamped. - * - * @param[in] event The position/scale/rotation axes that were clamped. - */ -static void OnScrollClamped( const ScrollView::ClampEvent& event ) -{ - gOnScrollClampedCalled = true; - gLastClampPosition = event.position; -} - -/** - * Invoked when a snap or flick started. - * - * @param[in] event The type of snap and the target position/scale/rotation. - */ -static void OnSnapStart( const ScrollView::SnapEvent& event ) -{ - gOnSnapStartCalled = true; - gLastSnapType = event.type; -} - ScrollView SetupTestScrollView(int rows, int columns, Vector2 size) { ScrollView scrollView = ScrollView::New(); -- 2.7.4