summaryrefslogtreecommitdiffstats
path: root/tests/auto
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 /tests/auto
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 'tests/auto')
-rw-r--r--tests/auto/declarative/debugger/qdeclarativeenginedebug/tst_qdeclarativeenginedebug.cpp7
1 files changed, 7 insertions, 0 deletions
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("<undefined>"));
QTest::newRow("QObject*") << "varObj" << qVariantFromValue(QString("<unnamed object>"));
QTest::newRow("list of QObject*") << "varObjList" << qVariantFromValue(QString("<unknown value>"));
+ QVariantMap map;
+ map.insert(QLatin1String("rect"), QVariant(QLatin1String("<unnamed object>")));
+ QTest::newRow("varObjMap") << "varObjMap" << qVariantFromValue(map);
}
void tst_QDeclarativeEngineDebug::tst_QDeclarativeDebugFileReference()