Do not show the warning if queryAI() returns an invalid interface.
We should only warn about missing a11y plugins if iface is 0, since we obviously have the plugin otherwise. This got triggered by that a visible widget got destructed, which in turn called hide(), which ultimately ended up calling QAccessible::updateAccessibility(QAccessible::ObjectHide). When QAccessibleEvent::accessibleInterface() then called queryAccessibleInterface(), QAI::isValid() would return false because the widget was in its destructor. Change-Id: If655e00e7bb3737a39e24e26dbd1e23edd515bf5 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>bb10
parent
0b12cf613f
commit
3a3e9b74eb
|
|
@ -1507,7 +1507,7 @@ QAccessibleInterface *QAccessibleEvent::accessibleInterface() const
|
|||
QAccessibleInterface *iface = QAccessible::queryAccessibleInterface(m_object);
|
||||
if (!iface || !iface->isValid()) {
|
||||
static bool hasWarned = false;
|
||||
if (!hasWarned) {
|
||||
if (!iface && !hasWarned) {
|
||||
qWarning() << "Problem creating accessible interface for: " << m_object << endl
|
||||
<< "Make sure to deploy Qt with accessibility plugins.";
|
||||
hasWarned = true;
|
||||
|
|
|
|||
Loading…
Reference in New Issue