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
a45bfdc4
Commit
a45bfdc4
authored
May 26, 2010
by
hjk
Browse files
debugger: improve QVariant(QString) dumper
(partially cherry picked from commit
dd714e9c
)
parent
69c84c9c
Changes
2
Hide whitespace changes
Inline
Side-by-side
share/qtcreator/gdbmacros/dumper.py
View file @
a45bfdc4
...
...
@@ -838,7 +838,7 @@ class FrameCommand(gdb.Command):
d
.
typeformats
=
typeformats
d
.
formats
=
formats
d
.
useFancy
=
useFancy
d
.
passExceptions
=
"p
assexceptions
"
in
options
d
.
passExceptions
=
"p
e
"
in
options
d
.
autoDerefPointers
=
"autoderef"
in
options
d
.
ns
=
qtNamespace
()
d
.
expandedINames
=
expandedINames
...
...
share/qtcreator/gdbmacros/gdbmacros.py
View file @
a45bfdc4
...
...
@@ -1453,9 +1453,9 @@ def qdump__QUrl(d, item):
def
qdumpHelper__QVariant
(
d
,
value
):
#warn("VARIANT TYPE: %s : " % variantType)
data
=
value
[
"d"
][
"data"
]
variantType
=
int
(
value
[
"d"
][
"type"
])
#warn("VARIANT TYPE: %s : " % variantType)
val
=
None
inner
=
""
innert
=
""
...
...
@@ -1597,15 +1597,18 @@ def qdumpHelper__QVariant(d, value):
def
qdump__QVariant
(
d
,
item
):
val
,
inner
,
innert
=
qdumpHelper__QVariant
(
d
,
item
.
value
)
#warn("VARIANT DATA: '%s' '%s' '%s': " % (val, inner, innert))
if
len
(
inner
):
# Build-in types.
#d.putValue("(%s)" % innert)
d
.
putType
(
"%sQVariant (%s)"
%
(
d
.
ns
,
innert
))
d
.
putNumChild
(
1
)
if
d
.
isExpanded
(
item
):
with
Children
(
d
):
d
.
putItem
(
Item
(
val
,
item
.
iname
,
"data"
,
"data"
))
if
len
(
inner
):
innerType
=
gdb
.
lookup_type
(
inner
)
# FIXME: Why "shared"?
if
innerType
.
sizeof
>
item
.
value
[
"d"
][
"data"
].
type
.
sizeof
:
v
=
item
.
value
[
"d"
][
"data"
][
"shared"
][
"ptr"
]
\
.
cast
(
innerType
.
pointer
()).
dereference
()
else
:
v
=
item
.
value
[
"d"
][
"data"
].
cast
(
innerType
)
d
.
putItemHelper
(
Item
(
v
,
item
.
iname
))
d
.
putType
(
"%sQVariant (%s)"
%
(
d
.
ns
,
innert
),
d
.
currentTypePriority
+
1
)
else
:
# User types.
d_member
=
item
.
value
[
"d"
]
...
...
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