diff options
author | Peter Hartmann <peter.hartmann@nokia.com> | 2010-02-11 09:58:05 (GMT) |
---|---|---|
committer | Peter Hartmann <peter.hartmann@nokia.com> | 2010-02-11 10:27:10 (GMT) |
commit | eab121a9023eee10b49813161867011dc9fb9689 (patch) | |
tree | 6f7c9f7f78e816e28b723f43af6e70d6d2054cf1 /src/xmlpatterns | |
parent | c0179a6f640a3a88550656884d0bb5065e6b048a (diff) | |
download | Qt-eab121a9023eee10b49813161867011dc9fb9689.zip Qt-eab121a9023eee10b49813161867011dc9fb9689.tar.gz Qt-eab121a9023eee10b49813161867011dc9fb9689.tar.bz2 |
QXmlSchema: fix crash in schema parser
previously, annotations were only supposed to appear within elements of
the form <element name="..."> ; However, they can also appear in
elements of the form <element ref="foo:bar">
Patch-by: Tobias König <tokoe@kde.org>
Diffstat (limited to 'src/xmlpatterns')
-rw-r--r-- | src/xmlpatterns/schema/qxsdschemaparser.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/xmlpatterns/schema/qxsdschemaparser.cpp b/src/xmlpatterns/schema/qxsdschemaparser.cpp index 6d878e8..6ed28af 100644 --- a/src/xmlpatterns/schema/qxsdschemaparser.cpp +++ b/src/xmlpatterns/schema/qxsdschemaparser.cpp @@ -4832,7 +4832,7 @@ XsdTerm::Ptr XsdSchemaParser::parseLocalElement(const XsdParticle::Ptr &particle if (isSchemaTag(XsdSchemaToken::Annotation, token, namespaceToken)) { const XsdAnnotation::Ptr annotation = parseAnnotation(); - element->addAnnotation(annotation); + term->addAnnotation(annotation); } else if (isSchemaTag(XsdSchemaToken::SimpleType, token, namespaceToken)) { if (hasRefAttribute) { error(QtXmlPatterns::tr("%1 element with %2 child element must not have a %3 attribute.") |