Skip to content

Commit

Permalink
Merge pull request #115 from REC-SPb-ETU/default-qualified-attributes…
Browse files Browse the repository at this point in the history
…-parsing-bug-fix

Default qualified attributes parsing bug fix
  • Loading branch information
dfaure-kdab authored Jan 17, 2018
2 parents d4a7e53 + 8a7bc6d commit 2c49768
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 2c49768

Please sign in to comment.