diff options
Diffstat (limited to 'src/declarative')
-rw-r--r-- | src/declarative/qml/qmlmetaproperty.cpp | 1 | ||||
-rw-r--r-- | src/declarative/util/qmlanimation.cpp | 8 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/declarative/qml/qmlmetaproperty.cpp b/src/declarative/qml/qmlmetaproperty.cpp index 79022e7..86116c7 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 ed5018d..a8de8d5 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; } }; |