[klipper] Sync history to disk after each change

Review Request #122382 - Created Feb. 2, 2015 and submitted

Information
Martin Flöser
plasma-workspace
master
343333
fdb1093...
Reviewers
plasma
hein

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

looked at ~/.local/share/klipper/history2.lst in Okteta, changed clipboard and pressed F5 in Okteta. Repeated these steps multiple times.

Martin Flöser
Martin Flöser
Eike Hein
Martin Flöser
Review request changed

Status: Closed (submitted)

Loading...