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
e8eea80c
Commit
e8eea80c
authored
Aug 17, 2010
by
hjk
Browse files
debugger: next attempt at robustly recognizing QObjects
parent
102cc6dc
Changes
1
Hide whitespace changes
Inline
Side-by-side
share/qtcreator/gdbmacros/dumper.py
View file @
e8eea80c
...
...
@@ -1351,20 +1351,6 @@ class Dumper:
type
=
value
.
type
typedefStrippedType
=
stripTypedefs
(
type
)
nsStrippedType
=
self
.
stripNamespaceFromType
(
typedefStrippedType
)
\
.
replace
(
"::"
,
"__"
)
# Is this derived from QObject?
hasMetaObject
=
False
try
:
if
value
.
type
.
code
!=
gdb
.
TYPE_CODE_PTR
:
mo
=
item
.
value
[
'staticMetaObject'
]
hasMetaObject
=
True
except
:
pass
#warn(" STRIPPED: %s" % nsStrippedType)
#warn(" DUMPERS: %s" % (nsStrippedType in qqDumpers))
if
isSimpleType
(
typedefStrippedType
):
#warn("IS SIMPLE: %s " % type)
...
...
@@ -1372,8 +1358,22 @@ class Dumper:
self
.
putType
(
item
.
value
.
type
)
self
.
putValue
(
value
)
self
.
putNumChild
(
0
)
return
# Is this derived from QObject?
hasMetaObject
=
False
for
field
in
typedefStrippedType
.
strip_typedefs
().
fields
():
if
field
.
name
==
"staticMetaObject"
:
hasMetaObject
=
True
break
nsStrippedType
=
self
.
stripNamespaceFromType
(
typedefStrippedType
)
\
.
replace
(
"::"
,
"__"
)
#warn(" STRIPPED: %s" % nsStrippedType)
#warn(" DUMPERS: %s" % (nsStrippedType in qqDumpers))
el
if
self
.
useFancy
\
if
self
.
useFancy
\
and
((
format
is
None
)
or
(
format
>=
1
))
\
and
((
nsStrippedType
in
qqDumpers
)
or
hasMetaObject
):
#warn("IS DUMPABLE: %s " % type)
...
...
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