From 2d72f97328f3d379476034549a26f1002c0b5fbc Mon Sep 17 00:00:00 2001 From: Aurindam Jana Date: Fri, 17 Feb 2012 11:09:31 +0100 Subject: DeclarativeEngineDebugService: Fix Crash Iterate through contents of QVariantMap to convert QObjects to streamable type. Change-Id: I2cb64a84aef674904de43f9a0c0fee539b87a59a Reviewed-by: Kai Koehne --- .../qdeclarativeenginedebug/tst_qdeclarativeenginedebug.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tests/auto') diff --git a/tests/auto/declarative/debugger/qdeclarativeenginedebug/tst_qdeclarativeenginedebug.cpp b/tests/auto/declarative/debugger/qdeclarativeenginedebug/tst_qdeclarativeenginedebug.cpp index 098ac90ca5..246ba6080a 100644 --- a/tests/auto/declarative/debugger/qdeclarativeenginedebug/tst_qdeclarativeenginedebug.cpp +++ b/tests/auto/declarative/debugger/qdeclarativeenginedebug/tst_qdeclarativeenginedebug.cpp @@ -317,11 +317,15 @@ void tst_QDeclarativeEngineDebug::initTestCase() "}" "property variant varObj\n" "property variant varObjList: []\n" + "property variant varObjMap\n" "Component.onCompleted: {\n" "varObj = blueRect;\n" "var list = varObjList;\n" "list[0] = blueRect;\n" "varObjList = list;\n" + "var map = new Object;\n" + "map.rect = blueRect;\n" + "varObjMap = map;\n" "}\n" "NonScriptPropertyElement {\n" "}\n" @@ -852,6 +856,9 @@ void tst_QDeclarativeEngineDebug::queryExpressionResult_data() QTest::newRow("bad expr") << "aeaef" << qVariantFromValue(QString("")); QTest::newRow("QObject*") << "varObj" << qVariantFromValue(QString("")); QTest::newRow("list of QObject*") << "varObjList" << qVariantFromValue(QString("")); + QVariantMap map; + map.insert(QLatin1String("rect"), QVariant(QLatin1String(""))); + QTest::newRow("varObjMap") << "varObjMap" << qVariantFromValue(map); } void tst_QDeclarativeEngineDebug::tst_QDeclarativeDebugFileReference() -- cgit v1.2.3