Commit 6739cba1 authored by Wouter's avatar Wouter

Do not initialize class-type properties using default strings

parent c4adea0d
......@@ -1019,7 +1019,8 @@ Property *Introspector::introspectProperty(const QString& id, const QVariantMap&
// Apply default value (but not for unions)
bool isUnion = (dynamic_cast<UnionType*>(baseType) != nullptr);
if (data.contains("default") && !isUnion) {
bool isClass = (dynamic_cast<Class*>(baseType) != nullptr);
if (data.contains("default") && !isUnion && !isClass) {
// 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