aboutsummaryrefslogtreecommitdiffstats
path: root/src/templates/qquicklabel.cpp
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@theqtcompany.com>2015-10-28 15:20:41 +0100
committerJ-P Nurmi <jpnurmi@theqtcompany.com>2015-10-29 06:55:02 +0000
commit361a9929a7bfc09d1497923a27be5606b9138dd7 (patch)
tree6d844ac2da2720f81ea844526b813f71aa792a2c /src/templates/qquicklabel.cpp
parentdac9c3f46650ef69a32f09280f3e78f9bba0f77b (diff)
Added QQuickControl::accessibleRole() and etc
* m_accessibleRole was removed * also applied to QQuickLabel, QQuickTextArea and QQuickTextField Change-Id: I4b487f32cccfba0e16b3dba7e39882e8cd7ea616 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Diffstat (limited to 'src/templates/qquicklabel.cpp')
-rw-r--r--src/templates/qquicklabel.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/templates/qquicklabel.cpp b/src/templates/qquicklabel.cpp
index f344a022..2b4b9a12 100644
--- a/src/templates/qquicklabel.cpp
+++ b/src/templates/qquicklabel.cpp
@@ -82,7 +82,6 @@ QQuickLabel::~QQuickLabel()
QQuickLabelPrivate::QQuickLabelPrivate()
: background(Q_NULLPTR), accessibleAttached(Q_NULLPTR)
- , m_accessibleRole(0x00000029) // Accessible.StaticText
{
#ifndef QT_NO_ACCESSIBILITY
QAccessible::installActivationObserver(this);
@@ -136,7 +135,7 @@ void QQuickLabelPrivate::accessibilityActiveChanged(bool active)
Q_Q(QQuickLabel);
accessibleAttached = qobject_cast<QQuickAccessibleAttached *>(qmlAttachedPropertiesObject<QQuickAccessibleAttached>(q, true));
if (accessibleAttached) {
- accessibleAttached->setRole((QAccessible::Role)m_accessibleRole);
+ accessibleAttached->setRole(accessibleRole());
accessibleAttached->setName(text);
} else {
qWarning() << "QQuickLabel: " << q << " QQuickAccessibleAttached object creation failed!";
@@ -145,7 +144,7 @@ void QQuickLabelPrivate::accessibilityActiveChanged(bool active)
QAccessible::Role QQuickLabelPrivate::accessibleRole() const
{
- return QAccessible::Role(m_accessibleRole);
+ return QAccessible::StaticText;
}
#endif