Review Request 112234: Save krunner dialog size when manually resized

Thomas Lübking thomas.luebking at gmail.com
Sat Aug 24 11:00:08 BST 2013


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/112234/#review38463
-----------------------------------------------------------


To encouter the destructor, the object has to be really destroyed (deleted) at some point, and not just cleaned up by the system releasing all memory.

If there's no

   QWidget *window = new FancyWidget;
   ret = a.exec();
   delete window;
   return ret;

but just

   QWidget *window = new FancyWidget;
   return a.exec();

There's (likely) no destructor call for "window" ever.
Depending on how the application quits, one can hook on aboutToQuit() instead.


krunner/interfaces/default/interface.cpp
<http://git.reviewboard.kde.org/r/112234/#comment28472>

    have a "QTimer *m_sizeSaveTimer" member instead and ->start(1000) it unconditionally?
    
    Spares you m_sizeSavePending alignment/management, re-creating/binding the timer and pushes the timeout forward.


- Thomas Lübking


On Aug. 24, 2013, 9:42 a.m., Harald Hvaal wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/112234/
> -----------------------------------------------------------
> 
> (Updated Aug. 24, 2013, 9:42 a.m.)
> 
> 
> Review request for kde-workspace.
> 
> 
> Description
> -------
> 
> This size was previously only saved on destruction, which not once has worked, whether I shut down the computer or log out normally. Now it will save (after 1 sec) after manually resizing the dialog.
> 
> 
> Diffs
> -----
> 
>   krunner/interfaces/default/interface.h a0367a55043aa18229200ca191e2fab1ecb4a32f 
>   krunner/interfaces/default/interface.cpp 505e0aa6c02233fba0ff7ae9ce1133e8c7542104 
> 
> Diff: http://git.reviewboard.kde.org/r/112234/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Harald Hvaal
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20130824/c9dabebc/attachment.htm>


More information about the kde-core-devel mailing list