summaryrefslogtreecommitdiffstats
path: root/src/corelib/animation
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2009-09-11 09:34:15 (GMT)
committerThierry Bastian <thierry.bastian@nokia.com>2009-09-11 09:35:28 (GMT)
commit26da6385e1d687cc9aef375cc9b5fb4f6fc353d0 (patch)
treef4d7652dafd1f2624851b2447e4a7e7e8c8ecd18 /src/corelib/animation
parented501bfc4a6510b70dc0bba17ab3da9921ab9f9f (diff)
downloadQt-26da6385e1d687cc9aef375cc9b5fb4f6fc353d0.zip
Qt-26da6385e1d687cc9aef375cc9b5fb4f6fc353d0.tar.gz
Qt-26da6385e1d687cc9aef375cc9b5fb4f6fc353d0.tar.bz2
animations now display a warning if they don't have a end value
also improved the autotests
Diffstat (limited to 'src/corelib/animation')
-rw-r--r--src/corelib/animation/qpropertyanimation.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/animation/qpropertyanimation.cpp b/src/corelib/animation/qpropertyanimation.cpp
index d6ded62..861bd9f 100644
--- a/src/corelib/animation/qpropertyanimation.cpp
+++ b/src/corelib/animation/qpropertyanimation.cpp
@@ -273,9 +273,9 @@ void QPropertyAnimation::updateState(QAbstractAnimation::State oldState,
if (oldState == Stopped) {
d->setDefaultStartEndValue(d->targetValue->property(d->propertyName.constData()));
//let's check if we have a start value and an end value
- if (d->direction == Forward && !startValue().isValid() && !d->defaultStartEndValue.isValid())
+ if (!startValue().isValid() && (d->direction == Backward || !d->defaultStartEndValue.isValid()))
qWarning("QPropertyAnimation::updateState: starting an animation without start value");
- if (d->direction == Backward && !endValue().isValid() && !d->defaultStartEndValue.isValid())
+ if (!endValue().isValid() && (d->direction == Forward || !d->defaultStartEndValue.isValid()))
qWarning("QPropertyAnimation::updateState: starting an animation without end value");
}
} else if (hash.value(key) == this) {