[Open-collaboration-services] kdesupport/attica/lib

Mateu Batle mateu.batle at collabora.co.uk
Wed Aug 11 19:59:30 CEST 2010


In the OCS draft was changed to "children".
Maybe we should support both for backwards compatibility,
or just take the incorrect "childs" spelling,

Frank: what do you think ?

best regards
  Mat



On 08/11/2010 12:55 PM, Shantanu Tushar Jha wrote:
> SVN commit 1162227 by shantanu:
>
> The OCS specification mentions the tag as "childs", instead of "children" [1]
>
> [1] http://www.freedesktop.org/wiki/Specifications/open-collaboration-services#COMMENTS
>
> CCMAIL: mbatle at collabora.co.uk
>
>
>
>  M  +4 -3      commentparser.cpp  
>
>
> --- trunk/kdesupport/attica/lib/commentparser.cpp #1162226:1162227
> @@ -23,12 +23,13 @@
>  */
>  
>  #include "commentparser.h"
> +#include <QDebug>
>  
> -
>  using namespace Attica;
>  
>  Comment Comment::Parser::parseXml(QXmlStreamReader& xml)
>  {
> +    qDebug() << "XML " << xml.text();
>      Comment comment;
>  
>      while (!xml.atEnd()) {
> @@ -49,7 +50,7 @@
>                  comment.setDate(QDateTime::fromString( xml.readElementText(), Qt::ISODate ));
>              } else if (xml.name() == "score") {
>                  comment.setScore(xml.readElementText().toInt());
> -            } else if (xml.name() == "children") {
> +            } else if (xml.name() == "childs") {
>                  QList<Comment> children = parseXmlChildren(xml);
>                  comment.setChildren(children);
>              }
> @@ -73,7 +74,7 @@
>                  Comment comment = parseXml(xml);
>                  children.append(comment);
>              }
> -        } else if (xml.isEndElement() && xml.name() == "children") {
> +        } else if (xml.isEndElement() && xml.name() == "childs") {
>              break;
>          }
>      }
>   



More information about the Open-collaboration-services mailing list