summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2009-10-12 22:42:30 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2009-10-12 22:42:30 (GMT)
commit231604bc063c002240479b69baa8110c2c83e9e1 (patch)
tree6df309ba571b758dd39dca33515a400a53fd369a /src
parent68c69f88d4c3a7b9f24162a4c7708ded7caba90e (diff)
downloadQt-231604bc063c002240479b69baa8110c2c83e9e1.zip
Qt-231604bc063c002240479b69baa8110c2c83e9e1.tar.gz
Qt-231604bc063c002240479b69baa8110c2c83e9e1.tar.bz2
Behavior fix plus basic autotests.
Diffstat (limited to 'src')
-rw-r--r--src/declarative/qml/qmlmetaproperty.cpp1
-rw-r--r--src/declarative/util/qmlanimation.cpp8
2 files changed, 8 insertions, 1 deletions
diff --git a/src/declarative/qml/qmlmetaproperty.cpp b/src/declarative/qml/qmlmetaproperty.cpp
index 8643301..59699ef 100644
--- a/src/declarative/qml/qmlmetaproperty.cpp
+++ b/src/declarative/qml/qmlmetaproperty.cpp
@@ -737,7 +737,6 @@ bool QmlMetaPropertyPrivate::writeEnumProperty(const QMetaProperty &prop, int id
return false;
QVariant v = value;
- uint t = QVariant::Invalid;
if (prop.isEnumType()) {
QMetaEnum menum = prop.enumerator();
if (v.type() == QVariant::String
diff --git a/src/declarative/util/qmlanimation.cpp b/src/declarative/util/qmlanimation.cpp
index 247e64c..9c5708e 100644
--- a/src/declarative/util/qmlanimation.cpp
+++ b/src/declarative/util/qmlanimation.cpp
@@ -1767,8 +1767,13 @@ void QmlPropertyAnimation::transition(QmlStateActions &actions,
int prevInterpolatorType; //for generic
QVariantAnimation::Interpolator interpolator;
bool reverse;
+ bool *wasDeleted;
+ PropertyUpdater() : wasDeleted(0) {}
+ ~PropertyUpdater() { if (wasDeleted) *wasDeleted = true; }
void setValue(qreal v)
{
+ bool deleted = false;
+ wasDeleted = &deleted;
if (reverse) //QVariantAnimation sends us 1->0 when reversed, but we are expecting 0->1
v = 1 - v;
QmlTimeLineValue::setValue(v);
@@ -1793,7 +1798,10 @@ void QmlPropertyAnimation::transition(QmlStateActions &actions,
if (interpolator)
action.property.write(interpolator(action.fromValue.constData(), action.toValue.constData(), v), QmlMetaProperty::BypassInterceptor | QmlMetaProperty::DontRemoveBinding);
}
+ if (deleted)
+ return;
}
+ wasDeleted = 0;
}
};