aboutsummaryrefslogtreecommitdiffstats
path: root/src/templates/qquickcontrol.cpp
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@theqtcompany.com>2015-11-20 14:26:47 +0100
committerJ-P Nurmi <jpnurmi@theqtcompany.com>2015-11-20 17:23:42 +0000
commit67398f037ebf9b36b88e870998eea5918832db2c (patch)
tree5e16e2d1dca676dc865aafe04bdc1c86e92d929a /src/templates/qquickcontrol.cpp
parent6ca831b18f361924cab39b65d1a1e8b31e60b3fc (diff)
Fix accessibility initialization
If accessibility is already enabled at construction time, QQuickControl does not get a notification of accessibility activation change. This patch fixes the issue that the attached property object was not created at all, by calling accessibilityActiveChange(true) when appropriate at component completion. Change-Id: I5d763d66c97a540687b217b8ae453d073f6bfdb4 Task-number: QTBUG-49361 Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
Diffstat (limited to 'src/templates/qquickcontrol.cpp')
-rw-r--r--src/templates/qquickcontrol.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/templates/qquickcontrol.cpp b/src/templates/qquickcontrol.cpp
index c8b5287b..5f5e105e 100644
--- a/src/templates/qquickcontrol.cpp
+++ b/src/templates/qquickcontrol.cpp
@@ -700,6 +700,16 @@ void QQuickControl::setContentItem(QQuickItem *item)
}
}
+void QQuickControl::componentComplete()
+{
+ Q_D(QQuickControl);
+ QQuickItem::componentComplete();
+#ifndef QT_NO_ACCESSIBILITY
+ if (!d->accessibleAttached && QAccessible::isActive())
+ accessibilityActiveChanged(true);
+#endif
+}
+
void QQuickControl::mousePressEvent(QMouseEvent *event)
{
event->accept();