From 482bbec175f606b16247af7c241b390bc2b07b8d Mon Sep 17 00:00:00 2001 From: hjk Date: Tue, 3 May 2016 23:13:20 +0200 Subject: [PATCH] Debugger: Fix QUuid dumper with large numbers and LLDB Change-Id: I357063022435d461d0b52c14541a4dfae69a1cdb Reviewed-by: Christian Stenger --- share/qtcreator/debugger/qttypes.py | 3 ++- tests/auto/debugger/tst_dumpers.cpp | 9 ++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/share/qtcreator/debugger/qttypes.py b/share/qtcreator/debugger/qttypes.py index 27b2797c624..46c2ce44325 100644 --- a/share/qtcreator/debugger/qttypes.py +++ b/share/qtcreator/debugger/qttypes.py @@ -1961,7 +1961,8 @@ def qdump__QUrl(d, value): def qdump__QUuid(d, value): v = value["data4"] 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])) d.putNumChild(1) d.putPlainChildren(value) diff --git a/tests/auto/debugger/tst_dumpers.cpp b/tests/auto/debugger/tst_dumpers.cpp index ca16c84c757..a1b9fac79cb 100644 --- a/tests/auto/debugger/tst_dumpers.cpp +++ b/tests/auto/debugger/tst_dumpers.cpp @@ -3014,10 +3014,13 @@ void tst_Dumpers::dumper_data() QTest::newRow("QUuid") << Data("#include ", - "QUuid uuid(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11);\n" - "unused(&uuid);\n") + "QUuid uuid1(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11);\n" + "QUuid uuid2(0xfffffffeu, 0xfffd, 0xfffc, 0xfb, " + " 0xfa, 0xf9, 0xf8, 0xf7, 0xf6, 0xf5, 0xf4);\n" + "unused(&uuid1, &uuid2);\n") + 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";