diff options
author | Tobias Hunger <tobias.hunger@qt.io> | 2019-04-16 16:32:08 +0200 |
---|---|---|
committer | Tobias Hunger <tobias.hunger@qt.io> | 2019-04-16 16:32:08 +0200 |
commit | 6630937e63ae5797487b86743a7733c8ae5cc42c (patch) | |
tree | 3d53dacf6430f9099e1fb20835881205de674961 /examples/widgets/animation/sub-attaq/animationmanager.cpp | |
parent | 37ed6dae00640f9cc980ffda05347c12a7eb5d7e (diff) | |
parent | c7af193d2e49e9f10b86262e63d8d13abf72b5cf (diff) |
Merge commit 'dev' into 'wip/cmake-merge'
Change-Id: I176c40d031be26a1dd1cf08843e448a660598783
Diffstat (limited to 'examples/widgets/animation/sub-attaq/animationmanager.cpp')
-rw-r--r-- | examples/widgets/animation/sub-attaq/animationmanager.cpp | 10 |
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(); } |