From 0a3805a175662cf69dbef9fc490abee7ebfba145 Mon Sep 17 00:00:00 2001 From: hjk Date: Fri, 13 Aug 2010 11:49:07 +0200 Subject: [PATCH] debugger: show parents and children only for QObject itself --- share/qtcreator/gdbmacros/gdbmacros.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/share/qtcreator/gdbmacros/gdbmacros.py b/share/qtcreator/gdbmacros/gdbmacros.py index 15cc5ac858a..6752b671691 100644 --- a/share/qtcreator/gdbmacros/gdbmacros.py +++ b/share/qtcreator/gdbmacros/gdbmacros.py @@ -606,7 +606,6 @@ def qdump__QObject(d, item): #warn("OBJECTNAME: %s " % objectName) #warn("D_PTR: %s " % d_ptr) mo = d_ptr["metaObject"] - type = d.stripNamespaceFromType(item.value.type) if isNull(mo): mo = staticMetaObject #warn("MO: %s " % mo) @@ -627,8 +626,9 @@ def qdump__QObject(d, item): with Children(d): d.putFields(item) # Parent and children. - d.putItem(Item(d_ptr["parent"], item.iname, "parent", "parent")) - d.putItem(Item(d_ptr["children"], item.iname, "children", "children")) + if stripClassTag(str(item.value.type)) == d.ns + "QObject": + d.putItem(Item(d_ptr["parent"], item.iname, "parent", "parent")) + d.putItem(Item(d_ptr["children"], item.iname, "children", "children")) # Properties. with SubItem(d):