diff options
author | Tobias Hunger <tobias.hunger@qt.io> | 2019-04-16 16:32:08 +0200 |
---|---|---|
committer | Tobias Hunger <tobias.hunger@qt.io> | 2019-04-16 16:32:08 +0200 |
commit | 6630937e63ae5797487b86743a7733c8ae5cc42c (patch) | |
tree | 3d53dacf6430f9099e1fb20835881205de674961 /src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler_p.h | |
parent | 37ed6dae00640f9cc980ffda05347c12a7eb5d7e (diff) | |
parent | c7af193d2e49e9f10b86262e63d8d13abf72b5cf (diff) |
Merge commit 'dev' into 'wip/cmake-merge'
Change-Id: I176c40d031be26a1dd1cf08843e448a660598783
Diffstat (limited to 'src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler_p.h')
-rw-r--r-- | src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler_p.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler_p.h b/src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler_p.h index 7c64c4febb..d154c30ed5 100644 --- a/src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler_p.h +++ b/src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler_p.h @@ -132,15 +132,15 @@ inline QDataStream &operator<<(QDataStream &ds, const QEvdevKeyboardMap::Composi class QFdContainer { int m_fd; - Q_DISABLE_COPY(QFdContainer); + Q_DISABLE_COPY_MOVE(QFdContainer); public: - explicit QFdContainer(int fd = -1) Q_DECL_NOTHROW : m_fd(fd) {} + explicit QFdContainer(int fd = -1) noexcept : m_fd(fd) {} ~QFdContainer() { reset(); } - int get() const Q_DECL_NOTHROW { return m_fd; } + int get() const noexcept { return m_fd; } - int release() Q_DECL_NOTHROW { int result = m_fd; m_fd = -1; return result; } - void reset() Q_DECL_NOTHROW; + int release() noexcept { int result = m_fd; m_fd = -1; return result; } + void reset() noexcept; }; class QEvdevKeyboardHandler : public QObject @@ -192,6 +192,8 @@ public: void readKeycode(); KeycodeAction processKeycode(quint16 keycode, bool pressed, bool autorepeat); + void switchLang(); + private: void processKeyEvent(int nativecode, int unicode, int qtcode, Qt::KeyboardModifiers modifiers, bool isPress, bool autoRepeat); @@ -206,6 +208,7 @@ private: quint8 m_locks[3]; int m_composing; quint16 m_dead_unicode; + quint8 m_langLock; bool m_no_zap; bool m_do_compose; |