From 9e69affcf1b31df0b29d917a3bbcad3a6e851c4a Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Tue, 6 Nov 2018 16:32:52 +0100 Subject: fix clang build on linux --- logic/shortcuts.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'logic/shortcuts.cpp') diff --git a/logic/shortcuts.cpp b/logic/shortcuts.cpp index a0027fea..377fa3e5 100644 --- a/logic/shortcuts.cpp +++ b/logic/shortcuts.cpp @@ -141,8 +141,9 @@ void Shortcuts::reload(const t_keys& keys_) const int idx = keys.size() - 1; tt& kk_ = keys[idx]; auto fn = std::get<1>(kk_); - connect(k, &QxtGlobalShortcut::activated, [fn, held](bool keydown) { - if (keydown || !held) + bool held_ = held; + connect(k, &QxtGlobalShortcut::activated, [fn, held_](bool keydown) { + if (keydown || !held_) fn(keydown); }); #endif -- cgit v1.2.3