Skip to content

kcms/mouse: One byte at a time

ivan tkachenko requested to merge work/ratijas/mouse-refactor into master

Factor out common config group access

Port manual loop over an iterator to a key-value range

And use more const auto types with more readable variable names.

Drop unused boolean member of X11 device's properties

Unlike its Wayland counterpart, on X11 all properties seem to be assumed to be supported.

Drop unused name member of X11 device's properties

Property name has no uses.

Remove unused naming properties from X11 device

It is a fake unnamed device, it doesn't need a name, nor it is ever set.

Don't leave struct members uninitialized

Yes, they are all written to during the init() phase. No, this is not a good excuse, especially because the old values would still be compared against

Take the new value by const reference in property setter

Because that's how you usually do it. Doesn't matter too much, since all configurable properties are bool and qreal anyway.

Prefer words to single-letter variable names

Add Q_EMIT macro even to the dynamic signal calls

clang-format had to go away, because it kept on insisting to put an opening parenthesis right next to the macro keyword, as if it was a macro/function call.

Refactor value loading in Wayland backend

The lambda was implicitly a template, so clangd LSP currently is having a hard time resolving members and variables inside of it. Also there was a template method declared but never defined on this class -- I changed its signature and actually implemented (moved lambda content). The typename parameter was overly complicated, and actually reduces to simple T, so I dropped that as well as the value_type type alias.

Simplify properties in X11 device class

There are lots of similar commits, one or two properties at a time. They are pretty much compile-time constants, they don't need to be backed by Prop objects.

  • supportsDisableEvents
  • supportedButtons
  • left handed
  • middle emulation
  • pointer acceleration
  • pointer acceleration profile
  • natural scroll

Merge request reports