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

Gregor Mi codestruct at posteo.org
Fri Dec 5 12:35:21 UTC 2014



> On Dec. 3, 2014, 7:34 p.m., Kevin Funk wrote:
> > Well, and please also test with KIPI_FOUND set -- Why is that not set for you?
> > 
> > Requires:
> > libkipi-dev - KDE Image Plugin Interface library -- development files
> 
> Gregor Mi wrote:
>     I am currently on the frameworks branch. As said, I wonder why KIPI_FOUND is not set although I see the following cmake output:
>     ...
>     -- The following OPTIONAL packages have been found:
>     
>         KF5Kipi
>         X11
>         XCB , X protocol C-language Binding , http://xcb.freedesktop.org
>         PkgConfig
>         X11_XCB , Xlib/XCB interface library , http://xcb.freedesktop.org
>         ...
>     
>     build/config-ksnapshot.h contains /* #undef KIPI_FOUND */
>     I did ./kdesrc-build libkipi and libkipi-dev is installed. I use KDE 4.14.3 as underlying desktop.
>     I currently do not fully understand the mechanism between the given cmake output and the content of the generated config-ksnapshot.h. I think they should be somehow related.
> 
> Kevin Funk wrote:
>     Ah, you're on framewors... => Please update the branch on the review-request.
>     
>     Regarding your issue: That's just been fixed:
>     
>     commit b9fcc3afc72cf7416b0a0e43cfea39ad3c7fc21a
>     Author: Hrvoje Senjan <hrvoje.senjan at gmail.com>
>     Date:   Thu Dec 4 04:11:55 2014 +0100
>     
>         Make KIPI_FOUND correctly set
>         
>         Needs to be set before config-ksnapshot.h is configured
> 
> Gregor Mi wrote:
>     Compiles.
> 
> Gregor Mi wrote:
>     As for testing: The compilation works but I could not test the runtime yet because the kipi plugin list gets not filled yet.
>     
>     My current test setup to see if kipi works at all is:
>     
>     1. compile the current frameworks branch with kdesrcbuild
>     2. set KF5 env variables
>     3. run `$ kbuildsycoca5 --noincremental` as indicated here: https://techbase.kde.org/Projects/Digikam/CodingSprint2014#Libkipi
>     4. run ksnapshot
>     5. get this warnings (I don't know if this is normal when running on KDE 4.x):
>     ```
>     ksnapshot(16964)/default KSycocaPrivate::checkDatabase: Couldn't start kded5 from org.kde.kded5.service: QDBusError("org.freedesktop.DBus.Error.ServiceUnknown", "The name org.kde.kded5 was not provided by any .service files") , falling back to running kbuildsycoca5
>     ksnapshot(16964)/kf5.kservice.sycoca KSycocaPrivate::openDatabase: Trying to open ksycoca from "/home/gregor/.cache5/ksycoca5"
>     ```
>     5. click the SendTo menu (same message in step 5)
>     6. opening menu contains no kipi plugin 
>     
>     Is there a simple test for kipi that can be run to detect abnormal runtime settings?

forgot to mention two steps between 1. and 2.:
1a) run `$ ./kdesrc-build libkipi`
1b) run `$ ./kdesrc-build kipi-plugins`


- Gregor


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


On Dec. 5, 2014, 12:31 p.m., Gregor Mi wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/120920/
> -----------------------------------------------------------
> 
> (Updated Dec. 5, 2014, 12:31 p.m.)
> 
> 
> Review request for KDE Graphics, KSnapshot, Aaron J. Seigo, 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
> -----
> 
>   ksnapshot.h 07100a85bbb146501ee77a9cbb9d2655edda4595 
>   ksnapshot.cpp 192a0910553acf9180155ba0f409d7b15d125753 
>   ksnapshotsendtoactions.h PRE-CREATION 
>   ksnapshotsendtoactions.cpp PRE-CREATION 
>   main.cpp e7a1efb2fd8398492b96e6f21f90363d99358e12 
>   .reviewboardrc PRE-CREATION 
>   CMakeLists.txt b8e665610284ae9db644e6925acae3d60e207245 
> 
> 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/20141205/a2b783c9/attachment.html>


More information about the Kde-graphics-devel mailing list