jsonapi-generator handle multiple services per file

Before this commit jsonapi-generator was able to parse only one service
instance pointer per file, so only the first one got exposed now it
handle also files where more then one service instance pointer is
declared
This commit is contained in:
Gioacchino Mazzurco 2018-08-30 19:02:50 +02:00
parent c294971633
commit a9b1a15b43
No known key found for this signature in database
GPG Key ID: A1FBCA3872E87051

View File

@ -78,12 +78,12 @@ int main(int argc, char *argv[])
QString headerFileName(hfi.fileName());
headerFileName.replace(QString("_8h.xml"), QString(".h"));
QDomNodeList sectiondefs = hDoc.elementsByTagName("sectiondef");
QDomNodeList sectiondefs = hDoc.elementsByTagName("memberdef");
for(int j = 0; j < sectiondefs.size(); ++j)
{
QDomElement sectDef = sectiondefs.item(j).toElement();
if( sectDef.attributes().namedItem("kind").nodeValue() != "var"
if( sectDef.attributes().namedItem("kind").nodeValue() != "variable"
|| sectDef.elementsByTagName("jsonapi").isEmpty() )
continue;