We use `-1` to mark the termination of the RPL thread and request the
state to be saved on disk.
Signed-off-by: Christophe de Dinechin <christophe@dinechin.org>
The RPL thread now sends a -1 key repeatedly until the main loop exits and saves
the state.
Signed-off-by: Christophe de Dinechin <christophe@dinechin.org>
The application dialog is in a loop processing keys, so send a special "exit"
keycopde (-1) to force it out.
Signed-off-by: Christophe de Dinechin <christophe@dinechin.org>
I wanted to do something smart with QTimer, but it fails because they interact
with QT's event loop, making timers across threads annoyingly difficult.
Signed-off-by: Christophe de Dinechin <christophe@dinechin.org>