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
Tobias Hunger
qt-creator
Commits
34e06215
Commit
34e06215
authored
Sep 28, 2010
by
hjk
Browse files
debugger: python dumpers for QTextCursor and QTextDocument
parent
1c56c56c
Changes
2
Hide whitespace changes
Inline
Side-by-side
share/qtcreator/gdbmacros/dumper.py
View file @
34e06215
...
...
@@ -1480,12 +1480,12 @@ class Dumper:
#warn("IS DUMPABLE: %s " % type)
#self.putAddress(value.address)
self
.
putType
(
realtype
)
if
isQObjectDerived
:
if
nsStrippedType
in
qqDumpers
:
qqDumpers
[
nsStrippedType
](
self
,
item
)
elif
isQObjectDerived
:
# value has references stripped off item.value.
item1
=
Item
(
value
,
item
.
iname
)
qdump__QObject
(
self
,
item1
)
else
:
qqDumpers
[
nsStrippedType
](
self
,
item
)
#warn(" RESULT: %s " % self.output)
return
...
...
share/qtcreator/gdbmacros/gdbmacros.py
View file @
34e06215
...
...
@@ -1651,6 +1651,29 @@ def qdump__QTextCodec(d, item):
d
.
putCallItem
(
"mibEnum"
,
item
,
"mibEnum()"
)
def
qdump__QTextCursor
(
d
,
item
):
p
=
item
.
value
[
"d"
][
"d"
].
dereference
()
d
.
putValue
(
p
[
"position"
])
d
.
putNumChild
(
1
)
if
d
.
isExpanded
(
item
):
with
Children
(
d
):
d
.
putIntItem
(
"position"
,
p
[
"position"
])
d
.
putIntItem
(
"anchor"
,
p
[
"anchor"
])
d
.
putCallItem
(
"selected"
,
item
,
"selectedText()"
)
def
qdump__QTextDocument
(
d
,
item
):
d
.
putValue
(
" "
)
d
.
putNumChild
(
1
)
if
d
.
isExpanded
(
item
):
with
Children
(
d
):
d
.
putCallItem
(
"blockCount"
,
item
,
"blockCount()"
)
d
.
putCallItem
(
"characterCount"
,
item
,
"characterCount()"
)
d
.
putCallItem
(
"lineCount"
,
item
,
"lineCount()"
)
d
.
putCallItem
(
"revision"
,
item
,
"revision()"
)
d
.
putCallItem
(
"toPlainText"
,
item
,
"toPlainText()"
)
def
qdump__QUrl
(
d
,
item
):
data
=
item
.
value
[
"d"
].
dereference
()
d
.
putStringValue
(
data
[
"encodedOriginal"
])
...
...
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