| 309 | } |
| 310 | |
| 311 | static CppcheckLibraryData::PlatformType loadPlatformType(QXmlStreamReader &xmlReader) |
| 312 | { |
| 313 | CppcheckLibraryData::PlatformType platformType; |
| 314 | platformType.name = xmlReader.attributes().value("name").toString(); |
| 315 | platformType.value = xmlReader.attributes().value("value").toString(); |
| 316 | |
| 317 | QXmlStreamReader::TokenType type; |
| 318 | while ((type = xmlReader.readNext()) != QXmlStreamReader::EndElement || |
| 319 | xmlReader.name().toString() != "platformtype") { |
| 320 | if (type != QXmlStreamReader::StartElement) |
| 321 | continue; |
| 322 | const QString elementName = xmlReader.name().toString(); |
| 323 | if (QStringList({"unsigned", "long", "pointer", "const_ptr", "ptr_ptr"}).contains(elementName)) { |
| 324 | platformType.types.append(elementName); |
| 325 | } else if (elementName == "platform") { |
| 326 | platformType.platforms.append(xmlReader.attributes().value("type").toString()); |
| 327 | } else { |
| 328 | unhandledElement(xmlReader); |
| 329 | } |
| 330 | } |
| 331 | return platformType; |
| 332 | } |
| 333 | |
| 334 | static CppcheckLibraryData::Reflection loadReflection(QXmlStreamReader &xmlReader) |
| 335 | { |