broulik added inline comments.
INLINE COMMENTS
> keyboard_daemon.cpp:163
> }
> - connect(xEventNotifier, &XInputEventNotifier::newPointerDevice, this,
> &KeyboardDaemon::configureMouse);
> - connect(xEventNotifier, &XInputEventNotifier::newKeyboardDevice, this,
> &KeyboardDaemon::configureKeyboard);
> + connect(xEventNotifier, &XInputEventNotifier::newPointerDevice,
> [this]() {configureMouseTimer.start();});
> + connect(xEventNotifier, &XInputEventNotifier::newKeyboardDevice,
> [this]() {configureKeyboardTimer.start();});
Add `this` as context (third argument) to have it auto-disconnect when `this`
is destroyed, else you'll crash:
connect(xEventNotifier, &XInputEventNotifier::newPointerDevice, this,
[this]() { configureMouseTimer.start(); });
Or you could perhaps even connect directly (assuming arguments match)
connect(xEventNotifier, &XInputEventNotifier::newPointerDevice,
&configureMouseTimer, &QTimer::start);
REVISION DETAIL
https://phabricator.kde.org/D13178
To: jacopods, PHID-PROJ-gqbvozptxawndyihp3hs, hein, broulik, drosca
Cc: mart, plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed,
jensreuterberg, abetts, sebas, apol