kutils: ensure startup notification events are processed from KEMailDialog::showEvent()

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2022-10-26 07:12:34 +03:00
parent b2597e71e5
commit 252c2b96d5

View file

@ -173,6 +173,9 @@ bool KEMailDialog::setAttach(const QStringList &attach)
void KEMailDialog::showEvent(QShowEvent *event)
{
KDialog::showEvent(event);
qApp->processEvents();
// NOTE: delayed until show so that startup notification is done, cursor is not grabbed and
// the password dialog is interactable via mouse
const bool isuserempty = d->ui.userlineedit->text().isEmpty();
@ -188,8 +191,6 @@ void KEMailDialog::showEvent(QShowEvent *event)
d->ui.passlineedit->setText(kemailsettings->getSetting(KEMailSettings::OutServerPass));
}
delete kemailsettings;
KDialog::showEvent(event);
}
void KEMailDialog::slotButtonClicked(int button)