equal
deleted
inserted
replaced
60 return instance; |
60 return instance; |
61 } |
61 } |
62 |
62 |
63 void AnimationManager::registerAnimation(QAbstractAnimation *anim) |
63 void AnimationManager::registerAnimation(QAbstractAnimation *anim) |
64 { |
64 { |
|
65 QObject::connect(anim, SIGNAL(destroyed(QObject*)), this, SLOT(unregisterAnimation_helper(QObject*))); |
65 animations.append(anim); |
66 animations.append(anim); |
|
67 } |
|
68 |
|
69 void AnimationManager::unregisterAnimation_helper(QObject *obj) |
|
70 { |
|
71 unregisterAnimation(static_cast<QAbstractAnimation*>(obj)); |
66 } |
72 } |
67 |
73 |
68 void AnimationManager::unregisterAnimation(QAbstractAnimation *anim) |
74 void AnimationManager::unregisterAnimation(QAbstractAnimation *anim) |
69 { |
75 { |
|
76 QObject::disconnect(anim, SIGNAL(destroyed(QObject*)), this, SLOT(unregisterAnimation_helper(QObject*))); |
70 animations.removeAll(anim); |
77 animations.removeAll(anim); |
71 } |
78 } |
72 |
79 |
73 void AnimationManager::unregisterAllAnimations() |
80 void AnimationManager::unregisterAllAnimations() |
74 { |
81 { |