Commit c3ce444c authored by hjk's avatar hjk
Browse files

debugger: add dumper for QStringRef



Change-Id: I6a3b732de5b2741ba2f19f012dd59373ce94377c
Reviewed-by: default avatarBojan Petrovic <bojan85@gmail.com>
Reviewed-by: default avatarhjk <qthjk@ovi.com>
parent 0a5f0ba5
......@@ -1477,6 +1477,19 @@ def qdump__QString(d, value):
d.putField("editvalue", encodeString(value, None))
def qdump__QStringRef(d, value):
s = value["m_string"].dereference()
data, size, alloc = qStringData(s)
data += int(value["m_position"])
size = value["m_size"]
s = readRawMemory(data, 2 * size)
d.putValue(s, Hex4EncodedLittleEndian)
d.putNumChild(3)
if d.isExpanded():
with Children(d):
d.putFields(value)
def qdump__QStringList(d, value):
d_ptr = value['d']
begin = d_ptr['begin']
......
......@@ -3676,11 +3676,22 @@ namespace qstring {
dummyStatement(&str, &string, pstring);
}
void testQStringRef()
{
QString str = "Hello";
QStringRef ref(&str, 1, 2);
BREAK_HERE;
// Check ref "el" QString.
// Continue.
dummyStatement(&str, &ref);
}
void testQString()
{
testQString1();
testQString2();
testQString3();
testQStringRef();
testQStringQuotes();
}
......
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