diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2018-01-16 05:54:06 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2018-01-16 06:45:52 +0100 |
commit | 43665c5f8c0219836cd94ea11bc14fd64e869e93 (patch) | |
tree | 704ab4d1ca69eea518cc80409e1b0c935645e48b | |
parent | f99eef18c475df2a4080bc652774e8e9f001037c (diff) |
cleanup
-rw-r--r-- | gui/init.hpp | 2 | ||||
-rw-r--r-- | logic/shortcuts.cpp | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/gui/init.hpp b/gui/init.hpp index d437b084..1142ff24 100644 --- a/gui/init.hpp +++ b/gui/init.hpp @@ -7,6 +7,8 @@ int OTR_GUI_EXPORT otr_main(int argc, char** argv, std::function<QWidget*()> make_main_window); +// XXX TODO need split MainWindow into mixins each implementing part of the functionality + template<typename F> auto run_application(int argc, char** argv, F&& fun) { diff --git a/logic/shortcuts.cpp b/logic/shortcuts.cpp index c72ed690..be9ae87b 100644 --- a/logic/shortcuts.cpp +++ b/logic/shortcuts.cpp @@ -144,7 +144,7 @@ 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 = std::move(fn)](bool keydown) { + connect(k, &QxtGlobalShortcut::activated, [fn, held](bool keydown) { if (keydown || !held) fn(keydown); }); |