Changeset View
Changeset View
Standalone View
Standalone View
src/remoteaccountparser.cpp
Show All 27 Lines | |||||
28 | 28 | | |||
29 | RemoteAccount RemoteAccount::Parser::parseXml(QXmlStreamReader &xml) | 29 | RemoteAccount RemoteAccount::Parser::parseXml(QXmlStreamReader &xml) | ||
30 | { | 30 | { | ||
31 | RemoteAccount remoteaccount; | 31 | RemoteAccount remoteaccount; | ||
32 | 32 | | |||
33 | // For specs about the XML provided, see here: | 33 | // For specs about the XML provided, see here: | ||
34 | // http://www.freedesktop.org/wiki/Specifications/open-collaboration-services-draft#RemoteAccounts | 34 | // http://www.freedesktop.org/wiki/Specifications/open-collaboration-services-draft#RemoteAccounts | ||
35 | while (!xml.atEnd()) { | 35 | while (!xml.atEnd()) { | ||
36 | //qDebug() << "XML returned:" << xml.text().toString(); | 36 | //qCDebug(ATTICA) << "XML returned:" << xml.text().toString(); | ||
37 | xml.readNext(); | 37 | xml.readNext(); | ||
38 | 38 | | |||
39 | if (xml.isStartElement()) { | 39 | if (xml.isStartElement()) { | ||
40 | if (xml.name() == QLatin1String("id")) { | 40 | if (xml.name() == QLatin1String("id")) { | ||
41 | remoteaccount.setId(xml.readElementText()); | 41 | remoteaccount.setId(xml.readElementText()); | ||
42 | } else if (xml.name() == QLatin1String("type")) { | 42 | } else if (xml.name() == QLatin1String("type")) { | ||
43 | remoteaccount.setType(xml.readElementText()); | 43 | remoteaccount.setType(xml.readElementText()); | ||
44 | } else if (xml.name() == QLatin1String("typeid")) { // FIXME: change to remoteserviceid sometime soon (OCS API change pending | 44 | } else if (xml.name() == QLatin1String("typeid")) { // FIXME: change to remoteserviceid sometime soon (OCS API change pending | ||
Show All 19 Lines |