From 10cbd6f840b97a2a32dcd83a1af52290823d36e8 Mon Sep 17 00:00:00 2001
From: dongsug-song <35130733+dongsug-song@users.noreply.github.com>
Date: Wed, 22 Aug 2018 16:04:35 +0900
Subject: [PATCH] [NUI] Make vulkan constructor as InhouseAPI, Fix Codacy
errors (#407)
---
src/Tizen.NUI/src/public/BaseComponents/TextEditor.cs | 4 ++--
src/Tizen.NUI/src/public/BaseComponents/TextField.cs | 2 +-
src/Tizen.NUI/src/public/NUIApplication.cs | 10 +++++++---
3 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/src/Tizen.NUI/src/public/BaseComponents/TextEditor.cs b/src/Tizen.NUI/src/public/BaseComponents/TextEditor.cs
index bca0c94..ff796af 100755
--- a/src/Tizen.NUI/src/public/BaseComponents/TextEditor.cs
+++ b/src/Tizen.NUI/src/public/BaseComponents/TextEditor.cs
@@ -955,7 +955,7 @@ namespace Tizen.NUI.BaseComponents
//You should not access any managed member here except static instance.
//because the execution order of Finalizes is non-deterministic.
- if (this != null && _textEditorTextChangedCallbackDelegate != null)
+ if (this.HasBody() && _textEditorTextChangedCallbackDelegate != null)
{
TextChangedSignal().Disconnect(_textEditorTextChangedCallbackDelegate);
}
@@ -1121,7 +1121,7 @@ namespace Tizen.NUI.BaseComponents
{
ScrollStateChangedEventArgs e = new ScrollStateChangedEventArgs();
- if (textEditor != null)
+ if (textEditor != global::System.IntPtr.Zero)
{
// Populate all members of "e" (ScrollStateChangedEventArgs) with real data
e.TextEditor = Registry.GetManagedBaseHandleFromNativePtr(textEditor) as TextEditor;
diff --git a/src/Tizen.NUI/src/public/BaseComponents/TextField.cs b/src/Tizen.NUI/src/public/BaseComponents/TextField.cs
index 06d7543..412267d 100755
--- a/src/Tizen.NUI/src/public/BaseComponents/TextField.cs
+++ b/src/Tizen.NUI/src/public/BaseComponents/TextField.cs
@@ -1007,7 +1007,7 @@ namespace Tizen.NUI.BaseComponents
//Release your own unmanaged resources here.
//You should not access any managed member here except static instance.
//because the execution order of Finalizes is non-deterministic.
- if (this != null)
+ if (this.HasBody())
{
if (_textFieldMaxLengthReachedCallbackDelegate != null)
{
diff --git a/src/Tizen.NUI/src/public/NUIApplication.cs b/src/Tizen.NUI/src/public/NUIApplication.cs
index cc44cde..bd2d361 100755
--- a/src/Tizen.NUI/src/public/NUIApplication.cs
+++ b/src/Tizen.NUI/src/public/NUIApplication.cs
@@ -131,14 +131,16 @@ namespace Tizen.NUI
}
///
- /// Internal constructor with Graphics Backend Type
+ /// Internal inhouse constructor with Graphics Backend Type
///
///
///
///
///
///
- internal NUIApplication(Graphics.BackendType backend, WindowMode windowMode = WindowMode.Opaque, Size2D windowSize = null, Position2D windowPosition = null, string styleSheet = "") : base(new NUICoreBackend(styleSheet, windowMode))
+ /// InhouseAPI, this could be opend in NextTizen
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public NUIApplication(Graphics.BackendType backend, WindowMode windowMode = WindowMode.Opaque, Size2D windowSize = null, Position2D windowPosition = null, string styleSheet = "") : base(new NUICoreBackend(styleSheet, windowMode))
{
//windowMode and styleSheet will be added later. currenlty it's not working as expected.
Graphics.Backend = backend;
@@ -355,7 +357,9 @@ namespace Tizen.NUI
///
/// Graphics BackendType
///
- internal class Graphics
+ /// InhouseAPI, this could be opend in NextTizen
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public class Graphics
{
public enum BackendType
{
--
2.7.4