summaryrefslogtreecommitdiffhomepage
path: root/qxt-mini
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2019-08-01 14:07:00 +0200
committerStanislaw Halik <sthalik@misaki.pl>2019-08-01 14:07:00 +0200
commit7d898e638abad8267420f8c0d827d21f716b8977 (patch)
tree897a31950ba0a345f05162e4e8616f26e1b69446 /qxt-mini
parentb930dd608bf95ecc3f89007313ba8ab8b1935ee5 (diff)
fix clang warnings
Diffstat (limited to 'qxt-mini')
-rw-r--r--qxt-mini/qxtglobalshortcut_x11.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/qxt-mini/qxtglobalshortcut_x11.cpp b/qxt-mini/qxtglobalshortcut_x11.cpp
index 89a5e7a8..6647d803 100644
--- a/qxt-mini/qxtglobalshortcut_x11.cpp
+++ b/qxt-mini/qxtglobalshortcut_x11.cpp
@@ -69,6 +69,9 @@ using pair = QPair<quint32, quint32>;
struct keybinding final
{
+ keybinding(const keybinding&) = default;
+ keybinding& operator=(const keybinding&) = default;
+
quint32 code, mods;
int refcnt;
@@ -361,6 +364,8 @@ bool QxtGlobalShortcutPrivate::nativeEventFilter(const QByteArray & eventType,
bool is_release = false;
+ static_assert(std::is_same_v<xcb_key_press_event_t, xcb_key_release_event_t>);
+
xcb_key_press_event_t *kev = nullptr;
if (eventType == "xcb_generic_event_t") {
xcb_generic_event_t *ev = static_cast<xcb_generic_event_t *>(message);
@@ -368,10 +373,11 @@ bool QxtGlobalShortcutPrivate::nativeEventFilter(const QByteArray & eventType,
{
case XCB_KEY_RELEASE:
is_release = true;
- /*FALLTHROUGH*/
+ [[fallthrough]];
case XCB_KEY_PRESS:
kev = static_cast<xcb_key_press_event_t *>(message);
- /*FALLTHROUGH*/
+ break;
+
default:
break;
}