Commit b4aea796 authored by Wouter's avatar Wouter

Do not add default values to union typed parameters

This doesn't work (yet)
parent e6a8f69f
......@@ -964,8 +964,9 @@ Property *Introspector::introspectProperty(const QString& id, const QVariantMap&
Property *member;
member = new Property(finalId, reference, Type::Public, id, parent);
// Apply default value
if (data.contains("default")) {
// Apply default value (but not for unions)
bool isUnion = (dynamic_cast<UnionType*>(baseType) != nullptr);
if (data.contains("default") && !isUnion) {
// Quote anything but numbers and ints
member->setDefaultValue(quoteValue(data.value("default").toString(), baseType));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment