35 html.replace(QLatin1String(
"<a"), QLatin1String(
"<i"));
36 html.replace(QLatin1String(
"</a"), QLatin1String(
"</i"));
37 uint firstParaEndXhtml = (
uint) html.indexOf(QLatin1String(
"</p>"));
38 uint firstParaEndHtml = (
uint) html.indexOf(QLatin1String(
"<p>"), html.indexOf(QLatin1String(
"<p>"))+1);
39 uint firstParaEndBr = (
uint) html.indexOf(QLatin1String(
"<br"));
40 uint firstParaEnd = qMin(firstParaEndXhtml, firstParaEndHtml);
41 firstParaEnd = qMin(firstParaEnd, firstParaEndBr);
42 return html.left(firstParaEnd);
58 case QXmlStreamReader::StartElement:
65 item.
pubDate = QDateTime::fromString(dateStr, Qt::RFC2822Date);
72 case QXmlStreamReader::EndElement:
86 while (!streamReader.atEnd()) {
87 switch (streamReader.readNext()) {
88 case QXmlStreamReader::StartElement:
89 if (streamReader.name() == QLatin1String(
"item"))
91 else if (streamReader.name() == QLatin1String(
"title"))
92 blogName = streamReader.readElementText();
93 else if (streamReader.name() == QLatin1String(
"link")) {
94 if (!streamReader.namespaceUri().isEmpty())
96 QString favIconString(streamReader.readElementText());
97 QUrl favIconUrl(favIconString);
98 favIconUrl.setPath(QLatin1String(
"favicon.ico"));