summaryrefslogtreecommitdiffstats
path: root/src/declarative/util/qmlspringfollow.cpp
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2009-12-04 10:50:52 (GMT)
committerThierry Bastian <thierry.bastian@nokia.com>2009-12-04 11:14:21 (GMT)
commitee9aee5d85345880d8269c02cfd3c2d86e89c9d3 (patch)
treeceefa5b01d9f13ad0efc2a327a89d6a4cbb4f40b /src/declarative/util/qmlspringfollow.cpp
parent13bafe57db6a94051f45e6d98e58ffc38041d5bc (diff)
downloadQt-ee9aee5d85345880d8269c02cfd3c2d86e89c9d3.zip
Qt-ee9aee5d85345880d8269c02cfd3c2d86e89c9d3.tar.gz
Qt-ee9aee5d85345880d8269c02cfd3c2d86e89c9d3.tar.bz2
Use QVariant::toReal() instead of QVariant::toDouble()
This avoids conversions from flat to double en embedded.
Diffstat (limited to 'src/declarative/util/qmlspringfollow.cpp')
-rw-r--r--src/declarative/util/qmlspringfollow.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/declarative/util/qmlspringfollow.cpp b/src/declarative/util/qmlspringfollow.cpp
index 29dcf91..764d7f9 100644
--- a/src/declarative/util/qmlspringfollow.cpp
+++ b/src/declarative/util/qmlspringfollow.cpp
@@ -200,7 +200,7 @@ void QmlSpringFollowPrivate::start()
property.write(currentValue);
} else if (sourceValue != currentValue && clock.state() != QAbstractAnimation::Running) {
lastTime = 0;
- currentValue = property.read().toDouble();
+ currentValue = property.read().toReal();
clock.start(); // infinity??
emit q->syncChanged();
}
@@ -258,7 +258,7 @@ void QmlSpringFollow::setTarget(const QmlMetaProperty &property)
{
Q_D(QmlSpringFollow);
d->property = property;
- d->currentValue = property.read().toDouble();
+ d->currentValue = property.read().toReal();
}
qreal QmlSpringFollow::sourceValue() const