Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
b1ab5a69
Commit
b1ab5a69
authored
Mar 05, 2010
by
hjk
Browse files
debugger: disable currently broken QAbstractItemModel dumper
parent
89c39ab8
Changes
2
Hide whitespace changes
Inline
Side-by-side
share/qtcreator/gdbmacros/dumper.py
View file @
b1ab5a69
...
...
@@ -606,12 +606,12 @@ class FrameCommand(gdb.Command):
else
:
# A "normal" local variable or parameter.
try
:
addr
=
cleanAddress
(
item
.
value
.
address
)
d
.
beginHash
()
d
.
put
(
'iname="%s",'
%
item
.
iname
)
d
.
put
(
'addr="%s",'
%
addr
)
d
.
safePutItemHelper
(
item
)
d
.
endHash
()
addr
=
cleanAddress
(
item
.
value
.
address
)
d
.
beginHash
()
d
.
put
(
'iname="%s",'
%
item
.
iname
)
d
.
put
(
'addr="%s",'
%
addr
)
d
.
safePutItemHelper
(
item
)
d
.
endHash
()
except
AttributeError
:
# Thrown by cleanAddress with message "'NoneType' object
# has no attribute 'cast'" for optimized-out values.
...
...
share/qtcreator/gdbmacros/gdbmacros.py
View file @
b1ab5a69
...
...
@@ -77,36 +77,36 @@ def qdump__QAbstractItem(d, item):
d
.
endChildren
()
def
qdump__QAbstractItemModel
(
d
,
item
):
rowCount
=
call
(
item
.
value
,
"rowCount()"
)
if
rowCount
<
0
:
return
columnCount
=
call
(
item
.
value
m
,
"columnCount()"
)
if
columnCount
<
0
:
return
d
.
putValue
(
"(%s,%s)"
%
(
rowCount
,
columnCount
))
d
.
putNumChild
(
1
)
if
d
.
isExpanded
(
item
):
d
.
beginChildren
(
1
)
d
.
beginHash
()
d
.
putNumChild
(
1
)
d
.
putName
(
d
.
ns
+
"QObject"
)
d
.
putValue
(
call
(
item
.
value
,
"objectName()"
),
2
)
d
.
putType
(
d
.
ns
+
"QObject"
)
d
.
putField
(
"displayedtype"
,
call
(
item
,
"m.metaObject()->className()"
))
d
.
endHash
()
for
row
in
xrange
(
rowCount
):
for
column
in
xrange
(
columnCount
):
mi
=
call
(
m
,
"index(%s,%s)"
%
(
row
,
column
))
d
.
beginHash
()
d
.
putName
(
"[%s,%s]"
%
(
row
,
column
))
d
.
putValue
(
"m.data(mi, Qt::DisplayRole).toString()"
,
6
)
#d.putNumChild((m.hasChildren(mi) ? 1 : 0)
d
.
putNumChild
(
1
)
#m.rowCount(mi) * m.columnCount(mi))
d
.
putType
(
d
.
ns
+
"QAbstractItem"
)
d
.
endHash
()
d
.
endChildren
()
#
def qdump__QAbstractItemModel(d, item):
#
# FIXME: This does not get the default argument right and ends up
#
# returning 'None'.
#
rowCount = call(item.value, "rowCount()")
#
columnCount = call(item.value, "columnCount()")
#
d.putValue("(%s,%s)" % (rowCount,
columnCount
))
#
#if columnCount < 0 or rowCount < 0:
# # d.putNumChild(0)
#
# return
#
d.putNumChild(1)
#
if d.isExpanded(item):
#
d.beginChildren(1)
#
d.beginHash()
#
d.putNumChild(1)
#
d.putName(d.ns + "QObject")
#
d.putValue(call(item.value, "objectName()"), 2)
#
d.putType(d.ns + "QObject")
#
d.putField("displayedtype", call(item, "m.metaObject()->className()"))
#
d.endHash()
#
for row in xrange(rowCount):
#
for column in xrange(columnCount):
#
mi = call(m, "index(%s,%s)" % (row, column))
#
d.beginHash()
#
d.putName("[%s,%s]" % (row, column))
#
d.putValue("m.data(mi, Qt::DisplayRole).toString()", 6)
#
#d.putNumChild((m.hasChildren(mi) ? 1 : 0)
#
d.putNumChild(1) #m.rowCount(mi) * m.columnCount(mi))
#
d.putType(d.ns + "QAbstractItem")
#
d.endHash()
#
d.endChildren()
def
qdump__QDateTime
(
d
,
item
):
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment