OSDN Git Service

debugger: even more hacks to display QVariant with custom type and template
authorhjk <qtc-committer@nokia.com>
Fri, 19 Nov 2010 14:11:19 +0000 (15:11 +0100)
committerhjk <qtc-committer@nokia.com>
Fri, 19 Nov 2010 14:11:19 +0000 (15:11 +0100)
share/qtcreator/gdbmacros/gdbmacros.py

index 4d21606..f107834 100644 (file)
@@ -1887,6 +1887,7 @@ def qdump__QVariant(d, item):
         "('%sQVariant::Type')%d" % (d.ns, d_member["type"])))
     type = type[type.find('"') + 1 : type.rfind('"')]
     type = type.replace("Q", d.ns + "Q") # HACK!
+    type = type.replace("uint", "unsigned int") # HACK!
     type = type.replace("COMMA", ",") # HACK!
     #warn("TYPE: %s" % type)
     data = call(item.value, "constData")
@@ -1896,7 +1897,6 @@ def qdump__QVariant(d, item):
     d.putNumChild(1)
     if d.isExpanded(item):
         with Children(d):
-            # This fails for templated and namepspaced types.
             tdata = data.cast(lookupType(type).pointer()).dereference()
             #warn("TDATA: %s" % tdata)
             d.putSubItem(Item(tdata, item.iname, "data", "data"))