diff --git a/share/qtcreator/debugger/misctypes.py b/share/qtcreator/debugger/misctypes.py index 5b0aa0b30c2..0b7662660b7 100644 --- a/share/qtcreator/debugger/misctypes.py +++ b/share/qtcreator/debugger/misctypes.py @@ -406,31 +406,6 @@ def qdump__QtcDumperTest_List(d, value): d.putFields(value) #d.putPlainChildren(value) -def qdump__QtcDumperTest_List__NodeX(d, value): - typename = value.type.unqualified().name - pos0 = typename.find('<') - pos1 = typename.find('>') - tName = typename[pos0+1:pos1] - d.putBetterType('QtcDumperTest_List<' + tName + '>::Node') - d.putNumChild(1) - if d.isExpanded(): - obj_type = d.lookupType(tName) - with Children(d): - d.putSubItem("this", value.cast(obj_type)) - d.putFields(value) - #d.putPlainChildren(value) - -def qdump__QtcDumperTest_List(d, value): - innerType = value.type[0] - d.putNumChild(1) - p = value['root'] - if d.isExpanded(): - with Children(d): - d.putSubItem("[p]", p) - d.putSubItem("[root]", value["root"].cast(innerType)) - d.putFields(value) - #d.putPlainChildren(value) - def qdump__QtcDumperTest_String(d, value): with Children(d): first = d.hexdecode(d.putSubItem('first', value['first']).value) diff --git a/tests/auto/debugger/tst_dumpers.cpp b/tests/auto/debugger/tst_dumpers.cpp index e7e833796a4..46956dea7fd 100644 --- a/tests/auto/debugger/tst_dumpers.cpp +++ b/tests/auto/debugger/tst_dumpers.cpp @@ -6834,6 +6834,55 @@ void tst_Dumpers::dumper_data() + Check("s.storage_.@1.size_", "4", "int"); + QTest::newRow("Internal4") + << Data("template\n" + "struct QtcDumperTest_List\n" + "{\n" + " struct Node\n" + " {\n" + " virtual ~Node() {}\n" + " Node *prev = nullptr;\n" + " Node *next = nullptr;\n" + " };\n\n" + " QtcDumperTest_List()\n" + " {\n" + " root.prev = &root;\n" + " root.next = &root;\n" + " }\n\n" + " void insert(Node *n)\n" + " {\n" + " if (n->next)\n" + " return;\n" + " Node *r = root.prev;\n" + " Node *node = r->next;\n" + " n->next = node;\n" + " node->prev = n;\n" + " r->next = n;\n" + " n->prev = r;\n" + " }\n" + " Node root;\n" + "};\n\n" + "struct Base\n" + "{\n" + " virtual ~Base() {}\n" + " int foo = 42;\n" + "};\n\n" + "struct Derived : Base, QtcDumperTest_List::Node\n" + "{\n" + " int baz = 84;\n" + "};\n\n", + "Derived d1, d2; unused(&d1, &d2);\n" + "QtcDumperTest_List list; unused(&list);\n" + "list.insert(&d1);\n" + "list.insert(&d2);\n") + + Cxx11Profile() + + Check("d1.@1.foo", "42", "int") + + Check("d1.baz", "84", "int") + + Check("d2.@1.foo", "42", "int") + + Check("d2.baz", "84", "int") + //+ Check("list.1.baz", "15", "int") + ; + QTest::newRow("BufArray") << Data("#include \n" "static int c = 0;\n"