Skip to content
GitLab
Menu
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
969fc516
Commit
969fc516
authored
Apr 09, 2010
by
Christiaan Janssen
Browse files
QmlInspector: Object tree shows item's ID if available
parent
36177b15
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/plugins/qmlinspector/components/objecttree.cpp
View file @
969fc516
...
...
@@ -140,7 +140,10 @@ void ObjectTree::buildTree(const QDeclarativeDebugObjectReference &obj, QTreeWid
clear
();
QTreeWidgetItem
*
item
=
parent
?
new
QTreeWidgetItem
(
parent
)
:
new
QTreeWidgetItem
(
this
);
item
->
setText
(
0
,
obj
.
className
());
if
(
obj
.
idString
().
isEmpty
())
item
->
setText
(
0
,
obj
.
className
());
else
item
->
setText
(
0
,
obj
.
idString
());
item
->
setData
(
0
,
Qt
::
UserRole
,
qVariantFromValue
(
obj
));
if
(
parent
&&
obj
.
contextDebugId
()
>=
0
...
...
@@ -157,7 +160,9 @@ void ObjectTree::buildTree(const QDeclarativeDebugObjectReference &obj, QTreeWid
}
if
(
obj
.
contextDebugId
()
<
0
)
{
item
->
setForeground
(
0
,
Qt
::
lightGray
);
}
for
(
int
ii
=
0
;
ii
<
obj
.
children
().
count
();
++
ii
)
buildTree
(
obj
.
children
().
at
(
ii
),
item
);
...
...
@@ -180,7 +185,7 @@ void ObjectTree::dump(const QDeclarativeDebugObjectReference &obj, int ind)
{
QByteArray
indent
(
ind
*
4
,
' '
);
qWarning
().
nospace
()
<<
indent
.
constData
()
<<
qPrintable
(
obj
.
className
())
<<
" "
<<
qPrintable
(
obj
.
name
())
<<
" "
<<
" "
<<
qPrintable
(
obj
.
idString
())
<<
" "
<<
obj
.
debugId
();
for
(
int
ii
=
0
;
ii
<
obj
.
children
().
count
();
++
ii
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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