Attica
10#include "commentparser.h"
11#include "atticautils.h"
20 while (!xml.
atEnd()) {
24 if (xml.
name() == QLatin1String(
"id")) {
26 }
else if (xml.
name() == QLatin1String(
"subject")) {
28 }
else if (xml.
name() == QLatin1String(
"text")) {
30 }
else if (xml.
name() == QLatin1String(
"childcount")) {
32 }
else if (xml.
name() == QLatin1String(
"user")) {
34 }
else if (xml.
name() == QLatin1String(
"date")) {
36 }
else if (xml.
name() == QLatin1String(
"score")) {
38 }
else if (xml.
name() == QLatin1String(
"children")) {
42 QList<Comment> children = comment.children();
43 children += parseXmlChildren(xml);
44 comment.setChildren(children);
54QList<Comment> Comment::Parser::parseXmlChildren(QXmlStreamReader &xml)
56 QList<Comment> children;
58 while (!xml.
atEnd()) {
62 if (xml.
name() == QLatin1String(
"comment")) {
63 Comment comment = parseXml(xml);
64 children.append(comment);
74QStringList Comment::Parser::xmlElement()
const
76 return QStringList(QStringLiteral(
"comment"));
int toInt(bool *ok, int base) const const
bool isEndElement() const const
bool isStartElement() const const
QStringView name() const const
QString readElementText(ReadElementTextBehaviour behaviour)
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:57:04 by
doxygen 1.13.2 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.