]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Use deleteLater() to delete the selection toggle in KItemListWidget
authorFrank Reininghaus <frank78ac@googlemail.com>
Sun, 9 Nov 2014 17:08:29 +0000 (18:08 +0100)
committerFrank Reininghaus <frank78ac@googlemail.com>
Sun, 9 Nov 2014 17:08:29 +0000 (18:08 +0100)
This patch should make a crash with a backtrace as provided in the bug
report impossible. I'm not sure if this would really prevent the crash
- it looks like the actual cause of the problem could be in
QGraphicsView or anywhere else, but it's hard to tell because the bug
was reported just once and does not seem reproducible. But I'm pretty
sure that this change doesn't make anything worse.

BUG: 334785
REVIEW: 121087

src/kitemviews/kitemlistwidget.cpp

index e7d2951b9fa518866972ba0af9754203f6a0bb2c..46b75588f3ef299aea633a51db06f20ed5814ae0 100644 (file)
@@ -474,7 +474,7 @@ qreal KItemListWidget::hoverOpacity() const
 void KItemListWidget::slotHoverAnimationFinished()
 {
     if (!m_hovered) {
 void KItemListWidget::slotHoverAnimationFinished()
 {
     if (!m_hovered) {
-        delete m_selectionToggle;
+        m_selectionToggle->deleteLater();
         m_selectionToggle = 0;
     }
 }
         m_selectionToggle = 0;
     }
 }