aboutsummaryrefslogtreecommitdiffstats
path: root/typesystem.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'typesystem.cpp')
-rw-r--r--typesystem.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/typesystem.cpp b/typesystem.cpp
index 6475db065..90b77faf1 100644
--- a/typesystem.cpp
+++ b/typesystem.cpp
@@ -1530,12 +1530,12 @@ bool Handler::startElement(const QString &, const QString &n,
Include inc(loc, attributes["file-name"]);
ComplexTypeEntry *ctype = static_cast<ComplexTypeEntry *>(element->entry);
- if (topElement.type & StackElement::ComplexTypeEntryMask)
- ctype->setInclude(inc);
- else if (topElement.type == StackElement::ExtraIncludes)
- ctype->addExtraInclude(inc);
- else {
- m_error = "Only supported parents are complex types and extra-includes";
+ if (topElement.type & (StackElement::ComplexTypeEntryMask | StackElement::PrimitiveTypeEntry)) {
+ element->entry->setInclude(inc);
+ } else if (topElement.type == StackElement::ExtraIncludes) {
+ element->entry->addExtraInclude(inc);
+ } else {
+ m_error = "Only supported parent tags are primitive-type, complex types or extra-includes";
return false;
}