From 37c10386155bc4fed4db910fcd5c7662347f576e Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sat, 25 Jul 2015 05:07:05 +0200 Subject: shortcuts: prototyped for Linux --- opentrack/shortcuts.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'opentrack/shortcuts.cpp') diff --git a/opentrack/shortcuts.cpp b/opentrack/shortcuts.cpp index 56071418..d68da30e 100644 --- a/opentrack/shortcuts.cpp +++ b/opentrack/shortcuts.cpp @@ -125,15 +125,13 @@ void KeybindingWorker::run() { void Shortcuts::bind_keyboard_shortcut(K &key, key_opts& k) { #if !defined(_WIN32) - - if (key) - { + if (!key) + key = std::make_shared(); + else { key->setEnabled(false); key->setShortcut(QKeySequence::UnknownKey); } - key = std::make_shared(); - if (k.keycode) { key->setShortcut(QKeySequence(k.keycode)); -- cgit v1.2.3