diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2019-06-26 15:41:57 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2019-06-26 15:41:57 +0200 |
commit | 241c90d8422185a2dcca9b879b89eeb0ae09236a (patch) | |
tree | eaaeb44adc2f2bfb162d25367a434b999d1f81c6 /qxt-mini | |
parent | fddb2376270b48581a780849838c3b20f81c0b77 (diff) |
qxt-mini: fix sign errors
Diffstat (limited to 'qxt-mini')
-rw-r--r-- | qxt-mini/qxtglobalshortcut_x11.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/qxt-mini/qxtglobalshortcut_x11.cpp b/qxt-mini/qxtglobalshortcut_x11.cpp index 2c5e8f2a..89a5e7a8 100644 --- a/qxt-mini/qxtglobalshortcut_x11.cpp +++ b/qxt-mini/qxtglobalshortcut_x11.cpp @@ -156,9 +156,8 @@ public: for (const pair& x : keycodes) { - int native_code = x.first, native_mods = x.second; - - native_code = XKeysymToKeycode(display(), native_code); + auto [ native_sym, native_mods ] = x; + int native_code = XKeysymToKeycode(display(), native_sym); if (keybinding::incf((unsigned)native_code, native_mods)) { @@ -203,8 +202,8 @@ public: for (const pair& x : keycodes) { - int native_code = x.first, native_mods = x.second; - native_code = XKeysymToKeycode(display(), native_code); + auto [ native_sym, native_mods ] = x; + int native_code = XKeysymToKeycode(display(), native_sym); if (keybinding::decf((unsigned)native_code, native_mods)) { @@ -408,8 +407,7 @@ bool QxtGlobalShortcutPrivate::nativeEventFilter(const QByteArray & eventType, keystate = filter_evil_mods(keystate); - QPair<KeySym, KeySym> sym_ = keycode_to_keysym(x11.display(), keycode, keystate, kev); - KeySym sym = sym_.first, sym2 = sym_.second; + auto [ sym, sym2 ] = keycode_to_keysym(x11.display(), keycode, keystate, kev); Qt::Key k; Qt::KeyboardModifiers mods; |