Some actions were set to not-visible in order to not show them in
the popup if not in standalone mode. This has the side effect of
global shortcuts no longer working as global shortcuts do not
trigger for not visible actions.
To fullfill both needs the check is now done to only add the actions
to the popup if it's in standalone mode, but the visibility is not
changed.
BUG: 345945
FIXED-IN: 5.3.1
REVIEW: 123727
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.
To not overload the system the save operations are delayed and queued.
Each save is delayed by five seconds since the last clipboard change.
So if the clipboard is changed multiple times in a short interval it
doesn't get synced to the disk till the interaction has settled.
BUG: 343333
FIXED-IN: 5.3.0
REVIEW: 122382
As Prison no longer provides a QWidget based API, we need to do the
mapping to a QWidget ourself.
Note: for the plasmoid I'm considering switching to a non-widget based
solution.
REVIEW: 122386
We don't want to show e.g. the Quit button in the popup dialog when
Klipper is part of plasmashell. It would quit plasma. Not the best idea.
The menu now only shows the history items , all other options should be
used from the UI.
The ClipboardJob does no longer set the result directly when editing
is invoked, but instead connects to a new signal emitted from Klipper.
As soon as editing finished the result gets emitted.
This is useful to block the UI for further editing while an entry
gets edited.
Klipper class needs to be splitted in a better way, but as a first step
just disable parts based on mode. E.g. we don't want to export the
klipper dbus interface when executed as a data engine.
The slot to show barcode for top most item is turned into a method
taking the history item. The connection is changed to a lambda slot
passing the first item to this new method.
The slot is turned into a method taking a HistoryItem. The connect is
replaced by a variant using a lambda which delegates to the changed
method with the top item as argument.
History doesn't use the KlipperPopup at all, it just creates it and
provides it through the ::popup() method. This can also be done by
Klipper directly turning History in a data only class.
This ports the workarounds using query pointer from XLib to XCB. At the
same time the build system is adjusted to only link against XCB and
Qt5::X11Extras if we are building for X11 and the define is taken from
config-X11.h instead of setting a define through CMakeLists.txt.
REVIEW: 118637
Thanks to Esben for all the work on Klipper so far. I'll do my best to
keep Klipper as the excelent tool as it is even after switching to a
new windowing system.
This is the beginning of revision history for this module. If you
want to look at revision history older than this, please refer to the
techbase wiki for how to use Git history grafting. At the time of
writing, this wiki is located here:
http://community.kde.org/Frameworks/GitOldHistory
If you have already performed the grafting and you don't see any
history beyond this commit, try running "git log" with the "--follow"
argument.
Branched from the monolithic repo kde-workspace, frameworks branch, at commit
049113e719dd2fc4446d054fa1a3aada330094f0