parley
The bug was as follows. When a WrittenPracticeWidget using a KLineEdit styled with a qStyleSheet that has focus is deleted this triggers a focus changing event, but the QStyleSheet returns a style that has already been deleted and causes a crash when the invalid style is applied.
The obvious solution of responding to the destroyed() event doesn't work , because the destroyed() event happens after the crash.
In order to fix this bug, I transistion focus away from the KLineEdit before the focus change preceding deletion. The virtual function, WrittenPracticeWidget::objectDestroyed, avoids having a practice mode switch statement as large as this comment at each delete event.
Transitioning to helpLabel was chosen arbitrarily.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:15:56 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.