1
0
mirror of https://github.com/TomHarte/CLK.git synced 2025-03-20 18:29:56 +00:00

Merge pull request #855 from TomHarte/QtNoKeyboardCopy

Qt: don't copy the result of get_keyboard().
This commit is contained in:
Thomas Harte 2020-11-29 00:05:26 -05:00 committed by GitHub
commit 32ccce3040
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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;