Commit c214bfff authored by Wouter's avatar Wouter

Add some debug statements

parent f5dadb67
......@@ -317,7 +317,7 @@ void Introspector::readData(const QVariantMap& data, const Introspector::JsonIte
// If it's a supported type, mark it for processing. Anything else: just recurse to children
if (newType != None) {
qDebug() << tr("Processing type %1").arg(id);
qDebug() << tr("Processing item %1 with type %2").arg(id, type);
currentItem.type = newType;
currentItem.id = id;
currentItem.path = path;
......@@ -570,10 +570,13 @@ Notification* Introspector::introspectNotification(const QString& id, const QVar
QVariantList parameters = data.value("params").toList();
QVariantList::ConstIterator pi;
qDebug() << tr("Notification parameter count: %1").arg(parameters.count());
for (pi = parameters.constBegin(); pi != parameters.constEnd(); ++pi) {
QVariantMap parameterMap = (*pi).toMap();
QString name = parameterMap.value("name").toString();
QString innerId = makeIdentifier(id) + "_" + capitalize(name);
qDebug() << tr("Scanning parameter %1 as type %2").arg(name, innerId);
Type *type = internalType(innerId, parameterMap, containerClass);
Q_ASSERT(type);
......@@ -795,6 +798,7 @@ Class *Introspector::introspectObject(const QString& id, const QVariantMap& data
QVariantMap::const_iterator i;
for (i = properties.constBegin(); i != properties.constEnd(); ++i) {
QVariantMap memberData = i.value().toMap();
qDebug() << tr("Introspecting property %1 for object type %2").arg(i.key()).arg(id);
Property *member = introspectProperty(i.key(), memberData, data, result);
if (!member) {
// Introspection of property failed - skip item
......@@ -802,14 +806,13 @@ Class *Introspector::introspectObject(const QString& id, const QVariantMap& data
continue;
}
qDebug() << tr("Adding member %1 to %2 (type %3)").arg(i.key()).arg(id).arg(member->memberKind());
result->addMember(member);
if (!member->defaultValue().isEmpty()) {
ctor->addInitializer(member, member->defaultValue());
}
}
// We always return true: we don't support repeatedly introspecting members.
// If something fails, it probably always fails.
return result;
}
......@@ -860,7 +863,7 @@ Property *Introspector::introspectProperty(const QString& id, const QVariantMap&
}
}
qWarning(tr("Property %1::%2 as %1::%3.").arg(parent->fullName(), id, finalId).toLocal8Bit());
qDebug() << tr("Property %1::%2 as %1::%3.").arg(parent->fullName(), id, finalId);
// Add anonymous types as inner class
if (baseType->isAnonymous()) {
......
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