Currently we are very inconsistent with how we handle our various X11 dependencies.
Some places check whether specific sub-libraries are found and disable parts of the code accordingly.
Sometimes this is controlled by whether X11 is found at all, sometimes it depends on the sublibrary being present.
Some of this is obviously broken, e.g. in one like we check whether X11 is there and then use it unconditionally a few lines down.
Instead of the current system of optional deps and deps being conditional on other deps I propose that we introduce an explicit build option that controls the X11 support.
If on (the default) then all X11 libs are required.
If off then no X11 libs are searched for. Currently this results in a broken build since some places use X11 stuff unconditionally, but it gives us an easier way to test and fix those cases.
Instead of having Qt::red hardwired for the text colour.
New function KlipperPopup::showStatus() to implement setting
the filter line edit colours and showing the status.
Show an explicit error for an invalid regular expression.
Simplify filter regexp generation, add comment regarding case sensitivity.
No need to have single use strings as member variables.
I18N:
Clipboard history item actions are added to the menu by
KlipperPopup::rebuild() or PopupProxy::tryInsertItem().
The actions are removed from the menu again at the start
of KlipperPopup::rebuild(), but were never deleted.
The current shortcuts could conceivably override app shortcuts, since
they don't use the Meta key. The following changes are made:
Automatic Action Popup Menu: Ctrl+Alt+X -> Meta+Ctrl+X
Manually Invoke Action on Current Clipboard: Ctrl+Alt+R -> Meta+Ctrl+R
These are safe to change in the code rather than adding a new one and
keeping the old ones around for compatibility's sake because
KGlobalAccel::setGlobalShortcut by default preserves old shortcuts
when they are changed, and we aren't overriding that behavior here. So
only new installs will get the new shortcuts and existing user installs
will be untouched.
Caused by the context menu and the associated widget being set to the
same object, leading to an access after destruction.
Application: Klipper (klipper), signal: Segmentation fault
Content of s_kcrashErrorMessage: std::unique_ptr<char []> = {get() = 0x0}
#8 QObject::disconnect (member=0x0, ...)
#9 KStatusNotifierItem::~KStatusNotifierItem () at knotifications/src/kstatusnotifieritem.cpp:71
#10 KlipperTray::~KlipperTray () at plasma-workspace/klipper/tray.h:13
So that the "Apply" and "Defaults" buttons work properly.
Mostly this involves just setting appropriate object names
for the GUI controls, with some special handling for the
radio button sets.
This is the remaining part of the Klipper configuration dialogue,
the "Actions Configuration" page. Now that the options have been
moved to the "Popup" page, this is a simple tree view with action
buttons. The explanations and help links have been moved to the
"Edit Action" page, because that is where they are most applicable.
The "Action Properties" dialogue uses a QFormLayout, and includes
explanation text for the "Automatic" check box and the regexp help link.
Instead of editing in place, the "Edit" button opens a further dialogue
to edit the current entry. This is more discoverable and should be easier
on small displays than editing in place, although a double click is still
accepted. This dialogue has explanation text for substitutions.
The icon for a command can be set explicitly, for those cases where the
automatic detection (from the first word of the command) does not work.
Confirmation is requested when deleting a command or an action.
GUI:
I18N:
We can only access the QWidget's QWindow after it's been shown,
otherwise it's nullptr.
*8 QObject::installEventFilter(QObject*) (this=0x0, obj=0x561e5d7c6420) at qtbase/src/corelib/kernel/qobject.cpp:2218
*9 0x00007efbc06170dd in Klipper::showPopupMenu(QMenu*) (this=0x561e5d7c6420, menu=0x561e5fbb7c90) at plasma-workspace/klipper/klipper.cpp:407
When Plasma does not have focus on Wayland, we can't avoid Qt creating a xdg_toplevel.
It will get a decoration by default by KWin. Setting the flag avoids this.
CCBUG:436249
On Wayland if Plasma had no focus when the shortcut was invoked
- the menu window is created as toplevel because it has no parent and
there is no current focusWindow
- the application can't know the currrent cursor position
We use a newly introduced request on plasma_surface to open under the cursor.
As it can only be called before mapping a buffer to a surface, the menu is hidden
before being shown again.
BUG:436249
FIXED-IN:5.25
With the check box options previously on the "Actions" page, plus the
"Advanced" button (renamed to "Excluded Windows" to better reflect its
function), a shadow of the enable option (as on the system tray
popup menu) and the popup time (originally on the "General" page).
This brings all of the popup menu configuration options together,
and allows more space for the list on the "Actions" page.
Consistent wording referring to the menu throughout.
Add a message to point the user towards the next page for
configuring the actions.
Add some explanation text to the "Exclusions" list dialogue to explain
its function.
Currently, every time adding a new item, `beginInsertRows` and
`endInsertRows` are called, which is not efficient. Use `beginResetModel`
and `endResetModel` before and after loading history items to avoid
frequently emitting inserted signals.
CCBUG: 450989