diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2015-10-31 18:22:43 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2015-10-31 18:22:43 +0100 |
commit | 664aefb41351113fbd43962aa534befe18ff9d4a (patch) | |
tree | 3f4ab91891cf2f4b2de8a9aae9001642c302c8be | |
parent | b4f0d5e9a9fa0d837858ba29ef6b880bf4378793 (diff) | |
parent | 841b33bd05d384c0f3a642ee2ad2c78bf98e876c (diff) |
Merge branch 'unstable' into trackhattrackhat-1.1p4
* unstable:
shortcuts: fix crash on Linux
wine: fix install wrapper
-rw-r--r-- | opentrack/shortcuts.cpp | 14 | ||||
-rw-r--r-- | proto-wine/CMakeLists.txt | 2 |
2 files changed, 9 insertions, 7 deletions
diff --git a/opentrack/shortcuts.cpp b/opentrack/shortcuts.cpp index 91d449f1..a33cf088 100644 --- a/opentrack/shortcuts.cpp +++ b/opentrack/shortcuts.cpp @@ -115,15 +115,17 @@ void KeybindingWorker::run() { void Shortcuts::bind_keyboard_shortcut(K &key, key_opts& k) { #if !defined(_WIN32) - if (!key) - key = std::make_shared<QxtGlobalShortcut>(); - else { - key->setShortcut(QKeySequence::UnknownKey); + using sh = QxtGlobalShortcut; + if (key) + { key->setEnabled(false); - std::shared_ptr<QxtGlobalShortcut> ptr = K(); - key.swap(ptr); + key->setShortcut(QKeySequence::UnknownKey); + std::shared_ptr<sh> tmp(nullptr); + key.swap(tmp); } + key = std::make_shared<sh>(); + if (k.keycode != "") { key->setShortcut(QKeySequence::fromString(k.keycode, QKeySequence::PortableText)); diff --git a/proto-wine/CMakeLists.txt b/proto-wine/CMakeLists.txt index bafcff8b..71443b82 100644 --- a/proto-wine/CMakeLists.txt +++ b/proto-wine/CMakeLists.txt @@ -20,7 +20,7 @@ if(NOT WIN32) add_custom_target(wine-wrapper ALL DEPENDS opentrack-wrapper-wine.exe.so) add_dependencies(opentrack-proto-wine wine-wrapper) add_dependencies(wine-wrapper opentrack-compat) - install(FILES "${CMAKE_BINARY_DIR}/opentrack-wrapper-wine.exe.so" DESTINATION .) + install(FILES "${CMAKE_CURRENT_BINARY_DIR}/opentrack-wrapper-wine.exe.so" DESTINATION .) endif() endif() endif() |