]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/kitemviews/private/kitemlistviewanimation.cpp
Port to QDebug*. KVBox--
[dolphin.git] / src / kitemviews / private / kitemlistviewanimation.cpp
index e347c5bb113a97c7fa4eb2ec4c1f308d2dcffdb9..955eac6034110a313e92b176c1722a52caf0229e 100644 (file)
@@ -21,7 +21,7 @@
 
 #include <kitemviews/kitemlistview.h>
 
-#include <KDebug>
+#include <QDebug>
 #include <KGlobalSettings>
 
 #include <QGraphicsWidget>
@@ -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<QPropertyAnimation*>(sender());
     for (int type = 0; type < AnimationTypeCount; ++type) {
-        QHashIterator<QGraphicsWidget*, QPropertyAnimation*> it(m_animation[type]);
+        QMutableHashIterator<QGraphicsWidget*, QPropertyAnimation*> 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<AnimationType>(type));
@@ -242,4 +242,3 @@ void KItemListViewAnimation::slotFinished()
     Q_ASSERT(false);
 }
 
-#include "kitemlistviewanimation.moc"