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

Martin Gräßlin mgraesslin at kde.org
Mon Feb 2 15:12:04 UTC 2015


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

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.cpp d49c165759f8171931167687c3b36b3a9d7dee07 
  klipper/CMakeLists.txt a08f062480b15f32f049e2d0d0e311dbe2964c02 
  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/20150202/beb18e75/attachment.html>


More information about the Plasma-devel mailing list