From 0a9aa40dd9865e61f2799a6396ce8dcaa68329c5 Mon Sep 17 00:00:00 2001 From: Thierry Bastian Date: Mon, 7 Dec 2009 16:22:20 +0100 Subject: little imporvements and 1 warning less --- src/declarative/qml/qmlengine.cpp | 2 +- src/declarative/qml/qmlmetaproperty.cpp | 2 +- src/declarative/util/qmlanimation.cpp | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/declarative/qml/qmlengine.cpp b/src/declarative/qml/qmlengine.cpp index bd6d540..429225a 100644 --- a/src/declarative/qml/qmlengine.cpp +++ b/src/declarative/qml/qmlengine.cpp @@ -147,7 +147,7 @@ QmlScriptEngine::QmlScriptEngine(QmlEnginePrivate *priv) newQMetaObject(StaticQtMetaObject::get()); globalObject().setProperty(QLatin1String("Qt"), qtObject); - offlineStoragePath = QDesktopServices::storageLocation(QDesktopServices::DataLocation).replace('/', QDir::separator()) + offlineStoragePath = QDesktopServices::storageLocation(QDesktopServices::DataLocation).replace(QLatin1Char('/'), QDir::separator()) + QDir::separator() + QLatin1String("QML") + QDir::separator() + QLatin1String("OfflineStorage"); qt_add_qmlxmlhttprequest(this); diff --git a/src/declarative/qml/qmlmetaproperty.cpp b/src/declarative/qml/qmlmetaproperty.cpp index a1ea90d..9c7aff8 100644 --- a/src/declarative/qml/qmlmetaproperty.cpp +++ b/src/declarative/qml/qmlmetaproperty.cpp @@ -806,7 +806,7 @@ bool QmlMetaPropertyPrivate::write(QObject *object, const QmlPropertyCache::Data if (value.userType() == QVariant::Double) { double integral; double fractional = modf(value.toDouble(), &integral); - if (qFuzzyCompare(fractional, (double)0.0)) + if (qFuzzyIsNull(fractional)) v.convert(QVariant::Int); } return writeEnumProperty(prop, coreIdx, object, v, flags); diff --git a/src/declarative/util/qmlanimation.cpp b/src/declarative/util/qmlanimation.cpp index 8afe667..a4f67ac 100644 --- a/src/declarative/util/qmlanimation.cpp +++ b/src/declarative/util/qmlanimation.cpp @@ -2064,8 +2064,8 @@ void QmlPropertyAnimation::prepare(QmlMetaProperty &p) d->property = d->userProperty; if (!d->rangeIsSet) { - d->va->setStartValue(QVariant(0.0f)); - d->va->setEndValue(QVariant(1.0f)); + d->va->setStartValue(qreal(0)); + d->va->setEndValue(qreal(1)); d->rangeIsSet = true; } @@ -2227,8 +2227,8 @@ void QmlPropertyAnimation::transition(QmlStateActions &actions, if (data->actions.count()) { if (!d->rangeIsSet) { - d->va->setStartValue(QVariant(0.0f)); - d->va->setEndValue(QVariant(1.0f)); + d->va->setStartValue(qreal(0)); + d->va->setEndValue(qreal(1)); d->rangeIsSet = true; } d->va->setAnimValue(data, QAbstractAnimation::DeleteWhenStopped); -- cgit v0.12