bugfix: 332596 - crash when exiting unfinished practice

Review Request #119119 - Created July 4, 2014 and submitted

Andreas Xavier

Problem: The bug was that if the qstyled KLineEdit answerEdit held focus when the WrittenPracticeWidget was deleted, then a focus event passed to the deleted KLineEdit would be passed to the QStyleSheet and return an invalid pointer to an already deleted QStyle.

Fix: This patch sets the focus to helpLabel before the object is deleted. It does this by calling modeWidgetDestroyed(), which calls objectDestroyed() before the focus changing event will be invalid.

Replicated the GUI conditions of the bug by hand, before and after the fix.


  • 2
  • 2
  • 2
  • 6
Description From Last Updated
Good debugtool! I will steal this idea for other times. :) But not good to have in production code. You ... Inge Wallin Inge Wallin
This should also be removed before commit. Inge Wallin Inge Wallin
Inge Wallin
Andreas Xavier
Andreas Xavier
Andreas Cord-Landwehr
Andreas Xavier
Review request changed

Status: Closed (submitted)