diff --git a/src/plugins/platforms/cocoa/qcocoaaccessibility.mm b/src/plugins/platforms/cocoa/qcocoaaccessibility.mm index ca660488b9..aff5ec0f78 100644 --- a/src/plugins/platforms/cocoa/qcocoaaccessibility.mm +++ b/src/plugins/platforms/cocoa/qcocoaaccessibility.mm @@ -343,7 +343,7 @@ id getValueAttribute(QAccessibleInterface *interface) } if (QAccessibleValueInterface *valueInterface = interface->valueInterface()) { - return QCFString::toNSString(QString::number(valueInterface->currentValue().toDouble())); + return QCFString::toNSString(valueInterface->currentValue().toString()); } if (interface->state().checkable) { diff --git a/src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.cpp b/src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.cpp index f6ba03151d..70445f1e27 100644 --- a/src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.cpp +++ b/src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.cpp @@ -1039,7 +1039,7 @@ HRESULT STDMETHODCALLTYPE QWindowsMsaaAccessible::get_accValue(VARIANT varID, BS QString value; if (accessible->valueInterface()) { - value = QString::number(accessible->valueInterface()->currentValue().toDouble()); + value = accessible->valueInterface()->currentValue().toString(); } else { value = accessible->text(QAccessible::Value); } diff --git a/src/widgets/accessible/rangecontrols.cpp b/src/widgets/accessible/rangecontrols.cpp index 26e32d682b..d4dc74ea69 100644 --- a/src/widgets/accessible/rangecontrols.cpp +++ b/src/widgets/accessible/rangecontrols.cpp @@ -89,15 +89,7 @@ void *QAccessibleAbstractSpinBox::interface_cast(QAccessible::InterfaceType t) QVariant QAccessibleAbstractSpinBox::currentValue() const { - QVariant result = abstractSpinBox()->property("value"); - QVariant::Type type = result.type(); - - // IA2 only allows numeric types - if (type == QVariant::Int || type == QVariant::UInt || type == QVariant::LongLong - || type == QVariant::ULongLong || type == QVariant::Double) - return result; - - return QVariant(); + return abstractSpinBox()->property("value"); } void QAccessibleAbstractSpinBox::setCurrentValue(const QVariant &value)