Review Request 122382: [klipper] Sync history to disk after each change

Eike Hein hein at kde.org
Mon Feb 16 13:48:08 UTC 2015


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


This came about partly due to my loud complaining that I was losing clipboard data when plasmashell died. I too think that Klipper should not be running in-process with plasmashell ideally - in my view the primary mission of Klipper is to persist clipboard state so it remains available when other things go away, and I think it's best-equipped to accomplish that mission if it's as stand-alone as possible, extending its coverage from "the app goes away" to "the shell goes away".

But that said, Klipper saving its history quickly is orthogonal to that, since it could also be argued for even in a standalone design. This does seem like a step into the right direction, that as a bonus also mitigates the fallout from being bundled with plasmashell

- Eike Hein


On Feb. 16, 2015, 9:12 a.m., Martin Gräßlin wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/122382/
> -----------------------------------------------------------
> 
> (Updated Feb. 16, 2015, 9:12 a.m.)
> 
> 
> Review request for Plasma and Eike Hein.
> 
> 
> Bugs: 343333
>     https://bugs.kde.org/show_bug.cgi?id=343333
> 
> 
> Repository: plasma-workspace
> 
> 
> Description
> -------
> 
> By invoking saveHistory after each change we ensure that the clipboard
> doesn't lose data in case klipper (or in dataengine mode plasmashell)
> crashes.
> 
> To not cause stalls, the saving is performed in a thread using
> QtConcurrentRun. As klipper itself is not thread save a Mutex is
> used to lock changes in the HistoryModel.
> 
> BUG: 343333
> FIXED-IN: 5.3.0
> 
> 
> Diffs
> -----
> 
>   klipper/klipper.h 8bb4286f39bb9855602dbe093be90e7a128c7c24 
>   klipper/klipper.cpp 6b6d610f2ea4eda962530e2024b1b0a4da06cf7f 
>   klipper/CMakeLists.txt 099cb712774c78faf61029e2b1c5706320010ddd 
>   klipper/historymodel.h 78f955f0ec4b8f27dbca0573b68691be6a30e3be 
>   klipper/historymodel.cpp 51860f6c3aca1022a2b721c27c859fc721915353 
> 
> Diff: https://git.reviewboard.kde.org/r/122382/diff/
> 
> 
> Testing
> -------
> 
> looked at ~/.local/share/klipper/history2.lst in Okteta, changed clipboard and pressed F5 in Okteta. Repeated these steps multiple times.
> 
> 
> Thanks,
> 
> Martin Gräßlin
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20150216/5f29ca2b/attachment.html>


More information about the Plasma-devel mailing list