Commit f32a4f33 authored by Wouter's avatar Wouter

Fix enum constraint introspection

parent 287f946e
......@@ -685,6 +685,7 @@ RpcMethod* Introspector::introspectMethod(const QString& id, const QVariantMap&
method->setReturnType(type);
}
return method;
}
......@@ -1167,11 +1168,11 @@ WrapperType* Introspector::introspectWrapper(const QString& id, const QVariantMa
if (data.contains(name)) {
// Quote values in enums
if (name == "enum" || name == "enums") {
QVariantMap enumConstraints = data.value(name).toMap();
QVariantMap result;
QVariantMap::const_iterator i;
QVariantList enumConstraints = data.value(name).toList();
QVariantList result;
QVariantList::const_iterator i;
for (i = enumConstraints.constBegin(); i != enumConstraints.constEnd(); ++i) {
result.insert(i.key(), quoteValue(i.value().toString(), wrapper));
result << quoteValue(i->toString(), wrapper);
}
wrapper->setConstraint(name, result);
}
......
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