Accessible debug stream: don't print details for invalid objects

Print "invalid" instead of the details.

Change-Id: I785a896b680fad9e9bb81769d9e3361542fbaafe
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
bb10
Frederik Gladhorn 2011-11-29 13:25:37 +01:00 committed by Qt by Nokia
parent 0dec6250f7
commit f80d71aceb
1 changed files with 15 additions and 11 deletions

View File

@ -1218,18 +1218,22 @@ Q_GUI_EXPORT QDebug operator<<(QDebug d, const QAccessibleInterface *iface)
}
d.nospace();
d << "QAccessibleInterface(" << hex << (void *) iface << dec;
d << " name=" << iface->text(QAccessible::Name) << " ";
d << "role=" << iface->role() << " ";
if (iface->childCount())
d << "childc=" << iface->childCount() << " ";
if (iface->object()) {
d << "obj=" << iface->object();
}
bool invisible = iface->state() & QAccessible::Invisible;
if (invisible) {
d << "invisible";
if (iface->isValid()) {
d << " name=" << iface->text(QAccessible::Name) << " ";
d << "role=" << iface->role() << " ";
if (iface->childCount())
d << "childc=" << iface->childCount() << " ";
if (iface->object()) {
d << "obj=" << iface->object();
}
bool invisible = iface->state() & QAccessible::Invisible;
if (invisible) {
d << "invisible";
} else {
d << "rect=" << iface->rect();
}
} else {
d << "rect=" << iface->rect();
d << " invalid";
}
d << ")";
return d.space();