summaryrefslogtreecommitdiffstats
path: root/src/gui/accessible
diff options
context:
space:
mode:
authorJan Arve Saether <jan-arve.saether@digia.com>2013-04-10 12:03:39 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-04-11 10:09:44 +0200
commit3a3e9b74ebdeef6a1bfcf87a47a23d12ad471105 (patch)
treec3a3ffa626cb075c125a9edf38e2977aab66d9f1 /src/gui/accessible
parent0b12cf613f855278c6fb6fefbdcd05ff6948a5e0 (diff)
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>
Diffstat (limited to 'src/gui/accessible')
-rw-r--r--src/gui/accessible/qaccessible.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/accessible/qaccessible.cpp b/src/gui/accessible/qaccessible.cpp
index 7487aabde5..4fd595ed5a 100644
--- a/src/gui/accessible/qaccessible.cpp
+++ b/src/gui/accessible/qaccessible.cpp
@@ -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;