Commit 7f4c60e2 authored by Christoph Cullmann's avatar Christoph Cullmann 🐮
Browse files

avoid crash on session rename

delay update of list out of signal/slot chain

BUG: 443267
parent 495b6230
Pipeline #84759 passed with stage
in 5 minutes and 59 seconds
......@@ -202,14 +202,15 @@ void KateSessionManageDialog::editDone()
{
m_editByUser = nullptr;
disconnect(m_sessionList, &QTreeWidget::itemChanged, this, &KateSessionManageDialog::editApply);
updateSessionList();
// avoid crash, see bug 142127
QTimer::singleShot(0, this, &KateSessionManageDialog::updateSessionList);
m_sessionList->setFocus();
m_newButton->setEnabled(true);
m_dontAskCheckBox->setEnabled(true);
m_closeButton->setEnabled(true);
m_filterBox->setEnabled(true);
m_sessionList->setFocus();
}
void KateSessionManageDialog::editApply()
......@@ -435,7 +436,8 @@ bool KateSessionManageDialog::eventFilter(QObject *object, QEvent *event)
} else if (object == m_filterBox) {
// Catch Return key to avoid to finish the dialog
if (event->type() == QEvent::KeyPress && (ke->key() == Qt::Key_Return || ke->key() == Qt::Key_Enter)) {
updateSessionList();
// avoid crash, see bug 142127
QTimer::singleShot(0, this, &KateSessionManageDialog::updateSessionList);
m_sessionList->setFocus();
return true;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment