summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2009-12-07 15:22:20 (GMT)
committerThierry Bastian <thierry.bastian@nokia.com>2009-12-07 15:22:20 (GMT)
commit0a9aa40dd9865e61f2799a6396ce8dcaa68329c5 (patch)
tree344836bfd78f247d28149f13ef658f77e954cc8a
parent569dfab376d9f63422791566d1888618934ffdc3 (diff)
downloadQt-0a9aa40dd9865e61f2799a6396ce8dcaa68329c5.zip
Qt-0a9aa40dd9865e61f2799a6396ce8dcaa68329c5.tar.gz
Qt-0a9aa40dd9865e61f2799a6396ce8dcaa68329c5.tar.bz2
little imporvements and 1 warning less
-rw-r--r--src/declarative/qml/qmlengine.cpp2
-rw-r--r--src/declarative/qml/qmlmetaproperty.cpp2
-rw-r--r--src/declarative/util/qmlanimation.cpp8
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);