Merge "Fixes the change of style when the text-field grabs the keyboard focus." into...
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / builder / json-parser-impl.cpp
index 7a2832c..fdec738 100644 (file)
@@ -1,24 +1,27 @@
-//
-// Copyright (c) 2014 Samsung Electronics Co., Ltd.
-//
-// Licensed under the Flora License, Version 1.0 (the License);
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://floralicense.org/license/
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an AS IS BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
+/*
+ * Copyright (c) 2014 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
 
 // CLASS HEADER
 #include <dali-toolkit/internal/builder/json-parser-impl.h>
-// EXTERNAL
+
+// EXTERNAL INCLUDES
 #include <cstring>
 
+// INTERNAL INCLUDES
 #include <dali-toolkit/internal/builder/tree-node-manipulator.h>
 #include <dali-toolkit/internal/builder/json-parser-state.h>
 
@@ -93,7 +96,7 @@ JsonParser::~JsonParser()
   }
 }
 
-int JsonParser::Parse(const std::string& source)
+bool JsonParser::Parse(const std::string& source)
 {
   mSources.push_back( VectorChar(source.begin(), source.end()) );
 
@@ -113,6 +116,8 @@ int JsonParser::Parse(const std::string& source)
   }
   else
   {
+    mRoot = NULL;
+
     mErrorDescription   = parserState.GetErrorDescription();
     if(NULL == mErrorDescription)
     {