diff options
Diffstat (limited to 'src/qml/debugger/qqmlenginedebugservice.cpp')
-rw-r--r-- | src/qml/debugger/qqmlenginedebugservice.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/qml/debugger/qqmlenginedebugservice.cpp b/src/qml/debugger/qqmlenginedebugservice.cpp index 399cc3e07d..cb533a0459 100644 --- a/src/qml/debugger/qqmlenginedebugservice.cpp +++ b/src/qml/debugger/qqmlenginedebugservice.cpp @@ -169,9 +169,13 @@ QQmlEngineDebugService::propertyData(QObject *obj, int propIdx) return rv; } -QVariant QQmlEngineDebugService::valueContents(const QVariant &value) const +QVariant QQmlEngineDebugService::valueContents(QVariant value) const { - int userType = value.userType(); + // We can't send JS objects across the wire, so transform them to variant + // maps for serialization. + if (value.userType() == qMetaTypeId<QJSValue>()) + value = value.value<QJSValue>().toVariant(); + const int userType = value.userType(); //QObject * is not streamable. //Convert all such instances to a String value |