Warn about accessibility interface creation failure only once

Change-Id: I0555d7d2417149f0eec54b228b842a61d0d08f85
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
This commit is contained in:
Frederik Gladhorn 2013-03-14 11:39:16 +01:00 committed by The Qt Project
parent 36a5873fac
commit d3d63bb4bc

View File

@ -1350,7 +1350,12 @@ QAccessibleInterface *QAccessibleEvent::accessibleInterface() const
{
QAccessibleInterface *iface = QAccessible::queryAccessibleInterface(m_object);
if (!iface) {
qWarning() << "Cannot create accessible interface for object: " << m_object;
static bool hasWarned = false;
if (!hasWarned) {
qWarning() << "Problem creating accessible interface for: " << m_object << endl
<< "Make sure to deploy Qt with accessibility plugins.";
hasWarned = true;
}
return 0;
}