[CTS Week24] appwidget-box-label-null should PASS
authorKamil Nowac <k.nowac@partner.samsung.com>
Fri, 14 Jun 2013 09:44:15 +0000 (11:44 +0200)
committerKamil Nowac <k.nowac@partner.samsung.com>
Fri, 14 Jun 2013 11:23:15 +0000 (13:23 +0200)
[Issue#] LINUXWRT-450
[Problem] widget doesn't install
[Cause] N/A
[Solution] Changed verify method
[Verification]
1. Build wrt-installer
2. install appwidget-box-label-null from attachement in
http://cam.sprc.samsung.pl/browse/LINUXWRT-450
Widget should install without problems

Change-Id: Ib4d3635eb94936e0d4a8dced0512cdd6f97e56db

src/configuration_parser/widget_parser.cpp

index b1e5282..b37bd1e 100755 (executable)
@@ -1628,14 +1628,18 @@ class AppWidgetParser : public ElementParser
 
         virtual void Verify()
         {
+            std::pair<DPL::String, DPL::String> boxLabel;
             if (m_label.empty()) {
-                ThrowMsg(Exception::ParseError,
-                        "box-label element cannot be empty - ignoring");
+                LogWarning("box-label element is empty");
+                boxLabel.first = DPL::FromUTF8String("");
+                boxLabel.second = DPL::FromUTF8String("");
+                m_data.m_label.push_back(boxLabel);
+            }
+            else {
+                boxLabel.first = m_lang;
+                boxLabel.second = m_label;
+                m_data.m_label.push_back(boxLabel);
             }
-            std::pair<DPL::String, DPL::String> boxLabel;
-            boxLabel.first = m_lang;
-            boxLabel.second = m_label;
-            m_data.m_label.push_back(boxLabel);
         }
 
         BoxLabelParser(ConfigParserData::LiveboxInfo& data) :