summaryrefslogtreecommitdiffstats
path: root/examples/widgets/animation/sub-attaq/animationmanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/widgets/animation/sub-attaq/animationmanager.cpp')
-rw-r--r--examples/widgets/animation/sub-attaq/animationmanager.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/widgets/animation/sub-attaq/animationmanager.cpp b/examples/widgets/animation/sub-attaq/animationmanager.cpp
index b6e399967f..a611641613 100644
--- a/examples/widgets/animation/sub-attaq/animationmanager.cpp
+++ b/examples/widgets/animation/sub-attaq/animationmanager.cpp
@@ -56,7 +56,7 @@
#include <QtCore/QDebug>
// the universe's only animation manager
-AnimationManager *AnimationManager::instance = 0;
+AnimationManager *AnimationManager::instance = nullptr;
AnimationManager::AnimationManager()
{
@@ -71,7 +71,7 @@ AnimationManager *AnimationManager::self()
void AnimationManager::registerAnimation(QAbstractAnimation *anim)
{
- QObject::connect(anim, SIGNAL(destroyed(QObject*)), this, SLOT(unregisterAnimation_helper(QObject*)));
+ QObject::connect(anim, &QObject::destroyed, this, &AnimationManager::unregisterAnimation_helper);
animations.append(anim);
}
@@ -82,7 +82,7 @@ void AnimationManager::unregisterAnimation_helper(QObject *obj)
void AnimationManager::unregisterAnimation(QAbstractAnimation *anim)
{
- QObject::disconnect(anim, SIGNAL(destroyed(QObject*)), this, SLOT(unregisterAnimation_helper(QObject*)));
+ QObject::disconnect(anim, &QObject::destroyed, this, &AnimationManager::unregisterAnimation_helper);
animations.removeAll(anim);
}
@@ -93,14 +93,14 @@ void AnimationManager::unregisterAllAnimations()
void AnimationManager::pauseAll()
{
- foreach (QAbstractAnimation* animation, animations) {
+ for (QAbstractAnimation *animation : qAsConst(animations)) {
if (animation->state() == QAbstractAnimation::Running)
animation->pause();
}
}
void AnimationManager::resumeAll()
{
- foreach (QAbstractAnimation* animation, animations) {
+ for (QAbstractAnimation *animation : qAsConst(animations)) {
if (animation->state() == QAbstractAnimation::Paused)
animation->resume();
}