[Kde-graphics-devel] Review Request 120920: ksnapshot: Fill SendTo menu async to fix Bug 312495

Gregor Mi codestruct at posteo.org
Sun Dec 14 11:06:03 UTC 2014



> On Dec. 8, 2014, 11:23 p.m., Kevin Funk wrote:
> > ksnapshot.cpp, line 245
> > <https://git.reviewboard.kde.org/r/120920/diff/8/?file=332092#file332092line245>
> >
> >     Unrelated, move to another commit?
> 
> Gregor Mi wrote:
>     I used the kdevelop 4.7 code indenter which moved the 'case' statement on the same level as the 'switch' statement. This is probably not the way it should be, should it? I would revert this change then.
> 
> Kevin Funk wrote:
>     I'm fine with the change, but please just put it into another commit. (Separate formatting changes from actual changes)

Ah, most of the switch/case code at just looked at is formatted as suggested from the kdevelop indenter. Wasn't aware of this style. I'll commit.


- Gregor


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


On Dec. 14, 2014, 10:36 a.m., Gregor Mi wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/120920/
> -----------------------------------------------------------
> 
> (Updated Dec. 14, 2014, 10:36 a.m.)
> 
> 
> Review request for KDE Graphics, KSnapshot, Aaron J. Seigo, Gilles Caulier, and Dominik Haumann.
> 
> 
> Bugs: 312495
>     http://bugs.kde.org/show_bug.cgi?id=312495
> 
> 
> Repository: ksnapshot
> 
> 
> Description
> -------
> 
> Hi, I also feel slightly impaired by Bug 312495 - Very slow "Send to" menu. So here is a fix.
> 
> It consists of the following changes:
>     1. move long-running retrieval of SendTo items to separate method
>     2. fillSendToActionsCache at startup but not yet async
>     3. move code related to SendTo actions to own class and file
>          (this includes the kipi code but KIPI_FOUND was not set in my dev env so thats not tested)
>     4. SendTo menu is built on a separate thread to speed up populating
>     5. delete actions in dtor
>     6. Create main window on stack instead of heap
> 
> The SendTo actions are now created in QThread which is started on startup of ksnapshot.
> If the user opens the SendTo menu too soon there is a message (as single menu item) that says
> that the menu is still being constructed and that he/she should try a moment later.
> 
> 
> Diffs
> -----
> 
>   CMakeLists.txt b8e665610284ae9db644e6925acae3d60e207245 
>   ksnapshot.h 07100a85bbb146501ee77a9cbb9d2655edda4595 
>   ksnapshot.cpp 192a0910553acf9180155ba0f409d7b15d125753 
>   ksnapshotsendtoactions.h PRE-CREATION 
>   ksnapshotsendtoactions.cpp PRE-CREATION 
>   main.cpp e7a1efb2fd8398492b96e6f21f90363d99358e12 
> 
> Diff: https://git.reviewboard.kde.org/r/120920/diff/
> 
> 
> Testing
> -------
> 
> 1)
> - Start ksnapshot (notice that is as fast as before)
> - Immediately open SendTo menu => there is a message that the menu is not ready yet.
> - Try again after 1 second: menu is populated.
> - Close ksnapshot.
> 
> 2)
> - Start ksnapshot. Wait two seconds and then click SendTo menu
>    => menu is populated right away
> - Close it.
> 
> 3)
> Start ksnapshot. Hit the SendTo menu with insanely high button click speed.
>    => No crash observed.
>    
> 4)
> Start ksnapshot and close it immediately.
>    => No crash observed.
> 
> 5) [pending]
> Could no test the kipi code because KIPI_FOUND is not set yet on my environment.
> 
> 
> Thanks,
> 
> Gregor Mi
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-graphics-devel/attachments/20141214/7615e11f/attachment-0001.html>


More information about the Kde-graphics-devel mailing list