diff options
author | Frederik Gladhorn <frederik.gladhorn@nokia.com> | 2011-11-29 13:25:37 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-11-29 18:47:14 +0100 |
commit | f80d71aceb42b5798e80d95521d9512351d0be75 (patch) | |
tree | 05c24837e21e55d5ba1d319c83f2fd2f15e77bd6 /src | |
parent | 0dec6250f7538c79c4698c3952a46105bc264e4e (diff) |
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>
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/accessible/qaccessible.cpp | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/src/gui/accessible/qaccessible.cpp b/src/gui/accessible/qaccessible.cpp index 057d97a30b..6553ebb6b1 100644 --- a/src/gui/accessible/qaccessible.cpp +++ b/src/gui/accessible/qaccessible.cpp @@ -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(); |