ProgressManager: Fix runtime warning

Fix "QPropertyAnimation::updateState (%s): Changing state
of an animation without target" warning.

This apparently happens when the animation is still running, but
the FutureProgress widget has already been killed. Avoid this
by setting the widget as the parent of the animation.
This commit is contained in:
Kai Koehne
2011-01-12 10:04:55 +01:00
parent 6dae14c65c
commit f21b1430f8

View File

@@ -337,7 +337,7 @@ bool FutureProgress::hasError() const
void FutureProgress::fadeAway()
{
d->m_faderWidget->raise();
QSequentialAnimationGroup *group = new QSequentialAnimationGroup;
QSequentialAnimationGroup *group = new QSequentialAnimationGroup(this);
QPropertyAnimation *animation = new QPropertyAnimation(d->m_faderWidget, "opacity");
animation->setDuration(600);
animation->setEndValue(1.0);