Commit a9834fe1 authored by hjk's avatar hjk
Browse files

Debugger: Finetuning of QVariant dumper



LLDB doesn't like to lookup types in some cases.
Make it work.

Change-Id: I2c95ab4ab7f765ad42bf6bd35c6f790de5fe366e
Reviewed-by: default avatarhjk <hjk121@nokiamail.com>
parent 8cf01f81
......@@ -2083,7 +2083,16 @@ def qdump__QVariant(d, value):
innert = qdumpHelper_QVariants_F[variantType - 75]
data = value["d"]["data"]
inner = d.qtNamespace() + innert
ns = d.qtNamespace()
inner = ns + innert
if d.isLldb:
# Looking up typedefs is problematic.
if innert == "QVariantMap":
inner = "%sQMap<%sQString, %sQVariant>" % (ns, ns, ns)
elif innert == "QVariantHash":
inner = "%sQHash<%sQString, %sQVariant>" % (ns, ns, ns)
elif innert == "QVariantList":
inner = "%sQList<%sQVariant>" % (ns, ns)
innerType = d.lookupType(inner)
if toInteger(value["d"]["is_shared"]):
......
......@@ -3795,6 +3795,7 @@ void tst_Dumpers::dumper_data()
"#endif\n",
"QApplication app(argc, argv);\n"
"QRect r(100, 200, 300, 400);\n"
"QPen pen;\n"
"QRectF rf(100.5, 200.5, 300.5, 400.5);\n"
"QUrl url = QUrl::fromEncoded(\"http://foo@qt-project.org:10/have_fun\");\n"
"QVariant var; // Type 0, invalid\n"
......@@ -3846,7 +3847,7 @@ void tst_Dumpers::dumper_data()
"QVariant var73 = QBitmap(); // 73 QBitmap\n"
"QVariant var74 = QCursor(); // 74 QCursor\n"
"QVariant var75 = QKeySequence(); // 75 QKeySequence\n"
"QVariant var76 = QPen(); // 76 QPen\n"
"QVariant var76 = pen; // 76 QPen\n"
"QVariant var77 = QTextLength(); // 77 QTextLength\n"
"#if QT_VERSION < 0x050000\n"
"QVariant var78 = QTextFormat(); // 78 QTextFormat\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