The crash was caused by a null pointer dereference when, e.g.,
minimizing Dolphin. The root cause was that
KStandardItemListWidget::closeRoleEditor() was called twice: once when
the role editor loses focus, and once again when the window is resized.
After m_roleEditor was set to 0, the second call dereferenced this null
pointer. I think the best solution is to disconnect from the role
editor's signals when the editor is not needed any more by the
KStandardItemListWidget.
BUG: 304524
FIXED-IN: 4.9.1
if (current.isEmpty() || !parent || current != "text") {
if (m_roleEditor) {
emit roleEditingCanceled(index(), current, data().value(current));
if (current.isEmpty() || !parent || current != "text") {
if (m_roleEditor) {
emit roleEditingCanceled(index(), current, data().value(current));
+
+ disconnect(m_roleEditor, SIGNAL(roleEditingCanceled(int,QByteArray,QVariant)),
+ this, SLOT(slotRoleEditingCanceled(int,QByteArray,QVariant)));
+ disconnect(m_roleEditor, SIGNAL(roleEditingFinished(int,QByteArray,QVariant)),
+ this, SLOT(slotRoleEditingFinished(int,QByteArray,QVariant)));
m_roleEditor->deleteLater();
m_roleEditor = 0;
}
m_roleEditor->deleteLater();
m_roleEditor = 0;
}
// to transfer the keyboard focus back to the KItemListContainer.
scene()->views()[0]->parentWidget()->setFocus();
}
// to transfer the keyboard focus back to the KItemListContainer.
scene()->views()[0]->parentWidget()->setFocus();
}
+
+ disconnect(m_roleEditor, SIGNAL(roleEditingCanceled(int,QByteArray,QVariant)),
+ this, SLOT(slotRoleEditingCanceled(int,QByteArray,QVariant)));
+ disconnect(m_roleEditor, SIGNAL(roleEditingFinished(int,QByteArray,QVariant)),
+ this, SLOT(slotRoleEditingFinished(int,QByteArray,QVariant)));
m_roleEditor->deleteLater();
m_roleEditor = 0;
}
m_roleEditor->deleteLater();
m_roleEditor = 0;
}