aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorRoger Maclean <rmaclean@qnx.com>2013-12-05 11:17:01 -0500
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-12-06 09:34:06 +0100
commitb3d881f4defa836446410febbdabd1e714001a3f (patch)
treed9c45c5f68e731ff12f3f8eda66913f5eaf8aaa9 /src/plugins
parent2c9de1c0f5e541e676274cd575cc4fbf4ac91c2e (diff)
Accessibility: Don't convert double values to ints when adjusting sliders.
In QQmlAccessible::doAction the code was converting the current value of sliders, spinboxes etc into an int. As the value is (or can be) a double this will often not have the right effect. Change-Id: I1d131551ab87af626a8d030bebd8099173ff015d Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/accessible/shared/qqmlaccessible.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/accessible/shared/qqmlaccessible.cpp b/src/plugins/accessible/shared/qqmlaccessible.cpp
index d08f9bdb2c..ecf4e56acf 100644
--- a/src/plugins/accessible/shared/qqmlaccessible.cpp
+++ b/src/plugins/accessible/shared/qqmlaccessible.cpp
@@ -185,7 +185,7 @@ void QQmlAccessible::doAction(const QString &actionName)
// use the "stepSize" property on the item
if (QAccessibleValueInterface *valueIface = valueInterface()) {
QVariant valueV = valueIface->currentValue();
- qreal newValue = valueV.toInt();
+ qreal newValue = valueV.toReal();
QVariant stepSizeV = object()->property("stepSize");
qreal stepSize = stepSizeV.isValid() ? stepSizeV.toReal() : qreal(1.0);