Commit fafc00da authored by hjk's avatar hjk

Debugger: Fix QVariantMap/QVariantHash dumper with Qt 5

Change-Id: I71358adc8c01dd1261627f35d0f35500e8b34989
Reviewed-by: default avatarhjk <hjk121@nokiamail.com>
parent 6f6999be
......@@ -1806,13 +1806,13 @@ def qdumpHelper__QVariant(d, value):
innert = inner
elif variantType == 8: # QVariant::VariantMap
inner = d.ns + "QMap<" + d.ns + "QString," + d.ns + "QVariant>"
innert = d.ns + "QVariantMap"
innert = "QVariantMap"
elif variantType == 9: # QVariant::VariantList
inner = d.ns + "QList<" + d.ns + "QVariant>"
innert = d.ns + "QVariantList"
innert = "QVariantList"
elif variantType == 28: # QVariant::VariantHash
inner = d.ns + "QHash<" + d.ns + "QString," + d.ns + "QVariant>"
innert = d.ns + "QVariantHash"
innert = "QVariantHash"
elif variantType <= 86:
inner = d.ns + qdumpHelper_QVariants_C[variantType - 64]
......
......@@ -3570,6 +3570,43 @@ void tst_Dumpers::dumper_data()
% Check("vm.5.key", Value5("\"f\""), "@QString")
% Check("vm.5.value", Value5("\"2Some String\""), "@QVariant (QString)");
QTest::newRow("QVariantHash1")
<< Data("#include <QVariant>\n",
"QVariantHash h;\n"
"h[\"one\"] = \"vone\";\n"
"QVariant v = h;\n"
"unused(&v);\n")
% CoreProfile()
% GdbOnly()
% Check("v", "<1 items>", "@QVariant (QVariantHash)")
% Check("v.0", "[0]", "", "@QHashNode<@QString, @QVariant>")
% Check("v.0.key", "\"one\"", "@QString")
% Check("v.0.value", "\"vone\"", "@QVariant (QString)");
QTest::newRow("QVariantMap1")
<< Data("#include <QVariant>\n",
"QVariantMap h;\n"
"h[\"one\"] = \"vone\";\n"
"QVariant v = h;\n"
"unused(&v);\n")
% CoreProfile()
% GdbOnly()
% Check("v", "<1 items>", "@QVariant (QVariantMap)")
% Check("v.0", "[0]", "", "@QMapNode<@QString, @QVariant>")
% Check("v.0.key", "\"one\"", "@QString")
% Check("v.0.value", "\"vone\"", "@QVariant (QString)");
QTest::newRow("QVariantList1")
<< Data("#include <QVariant>\n",
"QVariantList h;\n"
"h.append(\"one\");\n"
"QVariant v = h;\n"
"unused(&v);\n")
% CoreProfile()
% GdbOnly()
% Check("v", "<1 items>", "@QVariant (QVariantList)")
% Check("v.0", "[0]", "\"one\"", "@QVariant (QString)");
QTest::newRow("QVectorIntBig")
<< Data("#include <QVector>\n",
"QVector<int> vec(10000);\n"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment