| 90 | } |
| 91 | |
| 92 | void WizMobileXmlProcesser::processXML(const QByteArray& datagram) |
| 93 | { |
| 94 | QXmlStreamReader xml(datagram); |
| 95 | while (!xml.atEnd() && !xml.hasError()) |
| 96 | { |
| 97 | QXmlStreamReader::TokenType token = xml.readNext(); |
| 98 | if(token == QXmlStreamReader::StartDocument) |
| 99 | { |
| 100 | continue; |
| 101 | } |
| 102 | |
| 103 | if(token == QXmlStreamReader::StartElement) |
| 104 | { |
| 105 | if(xml.name() == "file") |
| 106 | { |
| 107 | processFileParam(xml); |
| 108 | } |
| 109 | } |
| 110 | } |
| 111 | if (xml.hasError()) { |
| 112 | qWarning() << "process xml failed : " << xml.errorString(); |
| 113 | } |
| 114 | xml.clear(); |
| 115 | } |
| 116 | |
| 117 | void WizMobileXmlProcesser::processFileParam(QXmlStreamReader& xml) |
| 118 | { |
nothing calls this directly
no test coverage detected