Commit d294d4ba authored by Volker Krause's avatar Volker Krause
Browse files

Dump primitive types in lists correctly as well

parent 576c4fdc
......@@ -65,8 +65,12 @@ static void dumpGadget(const void *gadget, const QMetaObject *mo, const char* in
QByteArray childIndent(indent);
childIndent.append(" ");
for (const QVariant &v : iterable) {
std::cout << indent << " [" << idx++ << "]:" << std::endl;
dumpGadget(v.constData(), QMetaType::metaObjectForType(v.userType()), childIndent.constData());
if (QMetaType::metaObjectForType(v.userType())) {
std::cout << indent << " [" << idx++ << "]:" << std::endl;
dumpGadget(v.constData(), QMetaType::metaObjectForType(v.userType()), childIndent.constData());
} else {
std::cout << indent << " [" << idx++ << "]: " << qPrintable(v.toString()) << std::endl;
}
}
}
}
......
Supports Markdown
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