Review Request 119119: bugfix: 332596 - crash when exiting unfinished practice

Inge Wallin inge at lysator.liu.se
Sun Jul 6 08:37:25 UTC 2014


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/119119/#review61678
-----------------------------------------------------------



src/practice/abstractwidget.h
<https://git.reviewboard.kde.org/r/119119/#comment42923>

    Good debugtool!  I will steal this idea for other times.  :)
    
    But not good to have in production code.  You must delete this before committing.



src/practice/guifrontend.h
<https://git.reviewboard.kde.org/r/119119/#comment42924>

    This should also be removed before commit.



src/practice/practicemainwindow.cpp
<https://git.reviewboard.kde.org/r/119119/#comment42925>

    I think the comment should be "m_floatingToolBar is a child of this class and will be deleted automatically".
    
    Or actually just remove this line. There is no need to set it to zero in the destructor because it will never be used again.



src/practice/practicemainwindow.cpp
<https://git.reviewboard.kde.org/r/119119/#comment42926>

    As usual, comment out the kDebugs before committing.


The fix itself looks good but there is a lot of stuff that you used in the debugging that should be disabled or removed before commit.

- Inge Wallin


On July 4, 2014, 8:14 p.m., Andreas Xavier wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/119119/
> -----------------------------------------------------------
> 
> (Updated July 4, 2014, 8:14 p.m.)
> 
> 
> Review request for KDE Edu.
> 
> 
> Bugs: 332596
>     http://bugs.kde.org/show_bug.cgi?id=332596
> 
> 
> Repository: parley
> 
> 
> Description
> -------
> 
> 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. 
> 
> 
> Diffs
> -----
> 
>   src/parleymainwindow.cpp 7c688a1 
>   src/practice/abstractwidget.h e9ef394 
>   src/practice/guifrontend.h 60e6fdc 
>   src/practice/guifrontend.cpp 99fc015 
>   src/practice/practicemainwindow.cpp 31349aa 
>   src/practice/writtenpracticewidget.h 9b25987 
>   src/practice/writtenpracticewidget.cpp f20ac6d 
> 
> Diff: https://git.reviewboard.kde.org/r/119119/diff/
> 
> 
> Testing
> -------
> 
> Replicated the GUI conditions of the bug by hand, before and after the fix.
> 
> 
> Thanks,
> 
> Andreas Xavier
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-edu/attachments/20140706/26fbee84/attachment-0001.html>


More information about the kde-edu mailing list