aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAurindam Jana <aurindam.jana@nokia.com>2012-02-17 11:09:31 +0100
committerQt by Nokia <qt-info@nokia.com>2012-02-21 01:21:41 +0100
commit2d72f97328f3d379476034549a26f1002c0b5fbc (patch)
tree7b61596bdb5f338b1e89c49069ac00502c27f369 /src
parent17307fcf18e34e6fce55c17d54c425beaac78f0d (diff)
DeclarativeEngineDebugService: Fix Crash
Iterate through contents of QVariantMap to convert QObjects to streamable type. Change-Id: I2cb64a84aef674904de43f9a0c0fee539b87a59a Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
Diffstat (limited to 'src')
-rw-r--r--src/declarative/debugger/qdeclarativeenginedebugservice.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/declarative/debugger/qdeclarativeenginedebugservice.cpp b/src/declarative/debugger/qdeclarativeenginedebugservice.cpp
index cd500e1ad6..4943959c33 100644
--- a/src/declarative/debugger/qdeclarativeenginedebugservice.cpp
+++ b/src/declarative/debugger/qdeclarativeenginedebugservice.cpp
@@ -176,6 +176,9 @@ QVariant QDeclarativeEngineDebugService::valueContents(const QVariant &value) co
{
int userType = value.userType();
+ //QObject * is not streamable.
+ //Convert all such instances to a String value
+
if (value.type() == QVariant::List) {
QVariantList contents;
QVariantList list = value.toList();
@@ -185,6 +188,16 @@ QVariant QDeclarativeEngineDebugService::valueContents(const QVariant &value) co
return contents;
}
+ if (value.type() == QVariant::Map) {
+ QVariantMap contents;
+ QMapIterator<QString, QVariant> i(value.toMap());
+ while (i.hasNext()) {
+ i.next();
+ contents.insert(i.key(), valueContents(i.value()));
+ }
+ return contents;
+ }
+
if (QDeclarativeValueTypeFactory::isValueType(userType))
return value;