X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/6c3d9acbc22ea9463ba40ef84c9e8c8419dfacf3..119f7a3f:/src/kitemviews/private/kitemlistviewanimation.cpp diff --git a/src/kitemviews/private/kitemlistviewanimation.cpp b/src/kitemviews/private/kitemlistviewanimation.cpp index e347c5bb1..955eac603 100644 --- a/src/kitemviews/private/kitemlistviewanimation.cpp +++ b/src/kitemviews/private/kitemlistviewanimation.cpp @@ -21,7 +21,7 @@ #include -#include +#include #include #include @@ -172,7 +172,7 @@ void KItemListViewAnimation::start(QGraphicsWidget* widget, AnimationType type, } Q_ASSERT(propertyAnim); - connect(propertyAnim, SIGNAL(finished()), this, SLOT(slotFinished())); + connect(propertyAnim, &QPropertyAnimation::finished, this, &KItemListViewAnimation::slotFinished); m_animation[type].insert(widget, propertyAnim); propertyAnim->start(); @@ -225,13 +225,13 @@ void KItemListViewAnimation::slotFinished() { QPropertyAnimation* finishedAnim = qobject_cast(sender()); for (int type = 0; type < AnimationTypeCount; ++type) { - QHashIterator it(m_animation[type]); + QMutableHashIterator it(m_animation[type]); while (it.hasNext()) { it.next(); QPropertyAnimation* propertyAnim = it.value(); if (propertyAnim == finishedAnim) { QGraphicsWidget* widget = it.key(); - m_animation[type].remove(widget); + it.remove(); finishedAnim->deleteLater(); emit finished(widget, static_cast(type)); @@ -242,4 +242,3 @@ void KItemListViewAnimation::slotFinished() Q_ASSERT(false); } -#include "kitemlistviewanimation.moc"