Skip to content

Commit

Permalink
Default qualified attributes parsing bug fix(recursion in
Browse files Browse the repository at this point in the history
parseSchemaTag)
  • Loading branch information
Судаков Иван Анатольевич committed Jan 17, 2018
1 parent d4a7e53 commit 8a7bc6d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion kdwsdl2cpp/schema/parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,10 @@ bool Parser::parseSchemaTag(ParserContext *context, const QDomElement &root)
context->namespaceManager()->enterChild(root);

// This method can call itself recursively, so save/restore the member attribute.
QString oldNamespace = d->mNameSpace;
const QString oldNamespace = d->mNameSpace;
const bool oldDefaultQualifiedElements = d->mDefaultQualifiedElements;
const bool oldDefaultQualifiedAttributes = d->mDefaultQualifiedAttributes;

if (root.hasAttribute(QLatin1String("targetNamespace"))) {
d->mNameSpace = root.attribute(QLatin1String("targetNamespace"));
}
Expand Down Expand Up @@ -233,6 +236,8 @@ bool Parser::parseSchemaTag(ParserContext *context, const QDomElement &root)

d->mImportedSchemas.append(d->mNameSpace);
d->mNameSpace = oldNamespace;
d->mDefaultQualifiedElements = oldDefaultQualifiedElements;
d->mDefaultQualifiedAttributes = oldDefaultQualifiedAttributes;

return true;
}
Expand Down

0 comments on commit 8a7bc6d

Please sign in to comment.