summaryrefslogtreecommitdiffhomepage
path: root/gui/keyboard.h
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2018-12-24 22:45:38 +0100
committerStanislaw Halik <sthalik@misaki.pl>2018-12-24 22:45:38 +0100
commit323dd162f5326b998e1c92ab4cfec8a63574023f (patch)
treefb4f0f4f7585d3cb90aef453167c7f4df0c6eeee /gui/keyboard.h
parent3981f867377ca0652d0cc0ababbbc30208db7e1c (diff)
cmake: decruft, disable deprecated Qt functions
Diffstat (limited to 'gui/keyboard.h')
-rw-r--r--gui/keyboard.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/gui/keyboard.h b/gui/keyboard.h
index 0a06a3af..ea35d372 100644
--- a/gui/keyboard.h
+++ b/gui/keyboard.h
@@ -22,13 +22,17 @@
class OTR_GUI_EXPORT keyboard_listener : public QDialog
{
Q_OBJECT
- Ui_keyboard_listener ui;
+
#ifdef _WIN32
- auto make_token();
- KeybindingWorker::Token token;
+ void receive_key(const Key& k);
+
+ KeybindingWorker::Token token{[this](const Key& k) {receive_key(k);}};
#else
void keyPressEvent(QKeyEvent* event) override;
#endif
+
+ Ui_keyboard_listener ui;
+
public:
keyboard_listener(QWidget* parent = nullptr);
signals: