diff options
Diffstat (limited to 'src/declarative/debugger/qmldebug.cpp')
-rw-r--r-- | src/declarative/debugger/qmldebug.cpp | 42 |
1 files changed, 26 insertions, 16 deletions
diff --git a/src/declarative/debugger/qmldebug.cpp b/src/declarative/debugger/qmldebug.cpp index ebad10f..b06a250 100644 --- a/src/declarative/debugger/qmldebug.cpp +++ b/src/declarative/debugger/qmldebug.cpp @@ -150,6 +150,15 @@ void QmlEngineDebugPrivate::decode(QDataStream &ds, QmlDebugObjectReference &o, if (simple) return; + int childCount; + bool recur; + ds >> childCount >> recur; + + for (int ii = 0; ii < childCount; ++ii) { + o.m_children.append(QmlDebugObjectReference()); + decode(ds, o.m_children.last(), !recur); + } + int propCount; ds >> propCount; @@ -162,25 +171,26 @@ void QmlEngineDebugPrivate::decode(QDataStream &ds, QmlDebugObjectReference &o, prop.m_binding = data.binding; prop.m_hasNotifySignal = data.hasNotifySignal; prop.m_valueTypeName = data.valueTypeName; - if (data.type == QmlEngineDebugServer::QmlObjectProperty::Basic - || data.type == QmlEngineDebugServer::QmlObjectProperty::List) { - prop.m_value = data.value; - } else if (data.type == QmlEngineDebugServer::QmlObjectProperty::Object) { - QmlDebugObjectReference obj; - obj.m_debugId = prop.m_value.toInt(); - prop.m_value = qVariantFromValue(obj); + switch (data.type) { + case QmlEngineDebugServer::QmlObjectProperty::Basic: + case QmlEngineDebugServer::QmlObjectProperty::List: + case QmlEngineDebugServer::QmlObjectProperty::SignalProperty: + { + prop.m_value = data.value; + break; + } + case QmlEngineDebugServer::QmlObjectProperty::Object: + { + QmlDebugObjectReference obj; + obj.m_debugId = prop.m_value.toInt(); + prop.m_value = qVariantFromValue(obj); + break; + } + case QmlEngineDebugServer::QmlObjectProperty::Unknown: + break; } o.m_properties << prop; } - - int childCount; - bool recur; - ds >> childCount >> recur; - - for (int ii = 0; ii < childCount; ++ii) { - o.m_children.append(QmlDebugObjectReference()); - decode(ds, o.m_children.last(), !recur); - } } void QmlEngineDebugPrivate::decode(QDataStream &ds, QmlDebugContextReference &c) |