Commit 997aa2e0 authored by hjk's avatar hjk
Browse files

Debugger: Fix display of default-initialized QStringRef



Change-Id: I3986541bb23bb7647f2a36798577a1e489fdc90b
Reviewed-by: default avatarhjk <hjk121@nokiamail.com>
parent 79c8a8fb
......@@ -1738,6 +1738,10 @@ def qdump__QString(d, value):
def qdump__QStringRef(d, value):
if isNull(value["m_string"]):
d.putValue("(null)");
d.putNumChild(0)
return
s = value["m_string"].dereference()
data, size, alloc = d.stringData(s)
data += 2 * int(value["m_position"])
......
......@@ -3113,9 +3113,12 @@ void tst_Dumpers::dumper_data()
QTest::newRow("QStringRef1")
<< Data("#include <QStringRef>\n",
"QString str = \"Hello\";\n"
"QStringRef ref(&str, 1, 2);")
"QStringRef ref1(&str, 1, 2);\n"
"QStringRef ref2;\n"
"unused(&ref1, &ref2);\n")
% CoreProfile()
% Check("ref", "\"el\"", "@QStringRef");
% Check("ref1", "\"el\"", "@QStringRef")
% Check("ref2", "(null)", "@QStringRef");
QTest::newRow("QStringList")
<< Data("#include <QStringList>\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