src/corelib/animation/qanimationgroup.cpp
changeset 7 f7bc934e204c
parent 3 41300fa6a67c
equal deleted inserted replaced
3:41300fa6a67c 7:f7bc934e204c
     1 /****************************************************************************
     1 /****************************************************************************
     2 **
     2 **
     3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     4 ** All rights reserved.
     4 ** All rights reserved.
     5 ** Contact: Nokia Corporation (qt-info@nokia.com)
     5 ** Contact: Nokia Corporation (qt-info@nokia.com)
     6 **
     6 **
     7 ** This file is part of the QtCore module of the Qt Toolkit.
     7 ** This file is part of the QtCore module of the Qt Toolkit.
     8 **
     8 **
   242     QAbstractAnimationPrivate::get(animation)->group = 0;
   242     QAbstractAnimationPrivate::get(animation)->group = 0;
   243     // ### removing from list before doing setParent to avoid inifinite recursion
   243     // ### removing from list before doing setParent to avoid inifinite recursion
   244     // in ChildRemoved event
   244     // in ChildRemoved event
   245     d->animations.removeAt(index);
   245     d->animations.removeAt(index);
   246     animation->setParent(0);
   246     animation->setParent(0);
   247     d->animationRemovedAt(index);
   247     d->animationRemoved(index, animation);
   248     return animation;
   248     return animation;
   249 }
   249 }
   250 
   250 
   251 /*!
   251 /*!
   252     Removes and deletes all animations in this animation group, and resets the current
   252     Removes and deletes all animations in this animation group, and resets the current
   283     }
   283     }
   284     return QAbstractAnimation::event(event);
   284     return QAbstractAnimation::event(event);
   285 }
   285 }
   286 
   286 
   287 
   287 
   288 void QAnimationGroupPrivate::animationRemovedAt(int index)
   288 void QAnimationGroupPrivate::animationRemoved(int index, QAbstractAnimation *)
   289 {
   289 {
   290     Q_Q(QAnimationGroup);
   290     Q_Q(QAnimationGroup);
   291     Q_UNUSED(index);
   291     Q_UNUSED(index);
   292     if (animations.isEmpty()) {
   292     if (animations.isEmpty()) {
   293         currentTime = 0;
   293         currentTime = 0;