1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-11-23 03:32:32 +00:00

Qt: don't copy the result of get_keyboard().

This commit is contained in:
Thomas Harte 2020-11-29 00:01:11 -05:00
parent 9610672615
commit ab3fcb3ea0

View File

@ -1020,7 +1020,7 @@ bool MainWindow::processEvent(QKeyEvent *event) {
const auto keyboardMachine = machine->keyboard_machine();
if(!keyboardMachine) return true;
auto keyboard = keyboardMachine->get_keyboard();
auto &keyboard = keyboardMachine->get_keyboard();
keyboard.set_key_pressed(*key, event->text().size() ? event->text()[0].toLatin1() : '\0', isPressed);
if(keyboard.is_exclusive() || keyboard.observed_keys().find(*key) != keyboard.observed_keys().end()) {
return false;