Add QDebug operator<< for QAccessibleEvent

(Keep it internal)

Change-Id: I9e99ccbd16cc595d2aff97a26181e8d8c3d9d7ae
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
This commit is contained in:
Jan-Arve Saether 2012-04-24 09:45:43 +02:00 committed by Qt by Nokia
parent 33a4e3b470
commit 739579d15a
2 changed files with 17 additions and 0 deletions

View File

@ -1242,6 +1242,22 @@ Q_GUI_EXPORT QDebug operator<<(QDebug d, const QAccessibleInterface *iface)
d << ")";
return d.space();
}
/*! \internal */
QDebug operator<<(QDebug d, const QAccessibleEvent &ev)
{
if (!&ev) {
d << "QAccessibleEvent(null)";
return d;
}
d.nospace() << "QAccessibleEvent(object=" << hex << ev.object();
d.nospace() << dec;
d.nospace() << "child=" << ev.child();
d << " event=" << qAccessibleEventString(ev.type());
d.nospace() << ")";
return d.space();
}
#endif
QT_END_NAMESPACE

View File

@ -621,6 +621,7 @@ Q_GUI_EXPORT const char *qAccessibleEventString(QAccessible::Event event);
#ifndef QT_NO_DEBUG_STREAM
Q_GUI_EXPORT QDebug operator<<(QDebug d, const QAccessibleInterface *iface);
Q_GUI_EXPORT QDebug operator<<(QDebug d, const QAccessibleEvent &ev);
#endif
#endif // QT_NO_ACCESSIBILITY