Debugger: Fix QUuid dumper with large numbers and LLDB

Change-Id: I357063022435d461d0b52c14541a4dfae69a1cdb
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
hjk
2016-05-03 23:13:20 +02:00
parent fad08a1e9b
commit 482bbec175
2 changed files with 8 additions and 4 deletions

View File

@@ -1961,7 +1961,8 @@ def qdump__QUrl(d, value):
def qdump__QUuid(d, value): def qdump__QUuid(d, value):
v = value["data4"] v = value["data4"]
d.putValue("{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}" d.putValue("{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}"
% (value["data1"], value["data2"], value["data3"], % (toInteger(value["data1"]) & 0xfffffffff,
value["data2"], value["data3"],
v[0], v[1], v[2], v[3], v[4], v[5], v[6], v[7])) v[0], v[1], v[2], v[3], v[4], v[5], v[6], v[7]))
d.putNumChild(1) d.putNumChild(1)
d.putPlainChildren(value) d.putPlainChildren(value)

View File

@@ -3014,10 +3014,13 @@ void tst_Dumpers::dumper_data()
QTest::newRow("QUuid") QTest::newRow("QUuid")
<< Data("#include <QUuid>", << Data("#include <QUuid>",
"QUuid uuid(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11);\n" "QUuid uuid1(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11);\n"
"unused(&uuid);\n") "QUuid uuid2(0xfffffffeu, 0xfffd, 0xfffc, 0xfb, "
" 0xfa, 0xf9, 0xf8, 0xf7, 0xf6, 0xf5, 0xf4);\n"
"unused(&uuid1, &uuid2);\n")
+ CoreProfile() + CoreProfile()
+ Check("uuid", "{00000001-0002-0003-0405-060708090a0b}", "@QUuid"); + Check("uuid1", "{00000001-0002-0003-0405-060708090a0b}", "@QUuid")
+ Check("uuid2", "{fffffffe-fffd-fffc-fbfa-f9f8f7f6f5f4}", "@QUuid");
QByteArray expected1 = "\"AAA"; QByteArray expected1 = "\"AAA";