summaryrefslogtreecommitdiffhomepage
path: root/qxt-mini
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2018-10-05 15:46:01 +0200
committerStanislaw Halik <sthalik@misaki.pl>2018-10-05 14:32:40 +0000
commit39ea3871c1b3f594df846bc0b9a627c9880ecea4 (patch)
treeb22c45755dad8486718eeffba90a36771e83af8f /qxt-mini
parentf92e6b78505ee4bcb148cd07cdae984279b8f6ca (diff)
use attributes only at declaration, not definition
Diffstat (limited to 'qxt-mini')
-rw-r--r--qxt-mini/x11-keymap.cpp11
-rw-r--r--qxt-mini/x11-keymap.hpp22
2 files changed, 12 insertions, 21 deletions
diff --git a/qxt-mini/x11-keymap.cpp b/qxt-mini/x11-keymap.cpp
index a42752b3..4b7f56f5 100644
--- a/qxt-mini/x11-keymap.cpp
+++ b/qxt-mini/x11-keymap.cpp
@@ -174,7 +174,6 @@ static tt numpad_keymap[] = {
{ Qt::Key_ScrollLock, XK_Scroll_Lock },
};
-QXT_GUI_EXPORT
quint32 qt_mods_to_x11(Qt::KeyboardModifiers modifiers)
{
quint32 mods = 0;
@@ -193,7 +192,6 @@ quint32 qt_mods_to_x11(Qt::KeyboardModifiers modifiers)
return mods;
}
-QXT_GUI_EXPORT
std::vector<quint32> qt_key_to_x11(Display*, Qt::Key k, Qt::KeyboardModifiers)
{
std::vector<quint32> ret;
@@ -212,10 +210,10 @@ std::vector<quint32> qt_key_to_x11(Display*, Qt::Key k, Qt::KeyboardModifiers)
return ret;
}
-QXT_GUI_EXPORT
+
Qt::KeyboardModifiers x11_mods_to_qt(quint32 mods)
{
- Qt::KeyboardModifiers ret(0);
+ Qt::KeyboardModifiers ret{0};
if (mods & Mod1Mask)
ret |= Qt::AltModifier;
@@ -229,7 +227,6 @@ Qt::KeyboardModifiers x11_mods_to_qt(quint32 mods)
return ret;
}
-QXT_GUI_EXPORT
std::tuple<Qt::Key, Qt::KeyboardModifiers> x11_key_to_qt(Display* disp, quint32 keycode, quint32 mods)
{
(void)disp;
@@ -247,7 +244,6 @@ std::tuple<Qt::Key, Qt::KeyboardModifiers> x11_key_to_qt(Display* disp, quint32
}
-QXT_GUI_EXPORT
QPair<KeySym, KeySym> keycode_to_keysym(Display* disp,
quint32 keycode, quint32 keystate,
xcb_key_press_event_t const* kev)
@@ -298,10 +294,9 @@ QPair<KeySym, KeySym> keycode_to_keysym(Display* disp,
return ret;
}
-QXT_GUI_EXPORT
quint32 xcb_mods_to_x11(quint32 mods)
{
- unsigned int keystate = 0;
+ unsigned keystate = 0;
if(mods & XCB_MOD_MASK_1) // alt
keystate |= Mod1Mask;
diff --git a/qxt-mini/x11-keymap.hpp b/qxt-mini/x11-keymap.hpp
index 52e2ebea..a6f2a061 100644
--- a/qxt-mini/x11-keymap.hpp
+++ b/qxt-mini/x11-keymap.hpp
@@ -19,24 +19,20 @@
#include <X11/Xlib.h>
#include <X11/Xutil.h>
-QXT_EXPORT
-std::vector<quint32> qt_key_to_x11(Display* disp,
- Qt::Key k, Qt::KeyboardModifiers m);
+std::vector<quint32>
+qt_key_to_x11(Display* disp, Qt::Key k, Qt::KeyboardModifiers m);
-QXT_EXPORT
-std::tuple<Qt::Key, Qt::KeyboardModifiers> x11_key_to_qt(Display* disp,
- quint32 keycode, quint32 mods);
+std::tuple<Qt::Key, Qt::KeyboardModifiers>
+x11_key_to_qt(Display* disp, quint32 keycode, quint32 mods);
-QXT_EXPORT QPair<KeySym, KeySym> keycode_to_keysym(Display* disp,
- quint32 keycode, quint32 keystate,
- xcb_key_press_event_t const* kev);
+QPair<KeySym, KeySym>
+keycode_to_keysym(Display* disp,
+ quint32 keycode, quint32 keystate,
+ xcb_key_press_event_t const* kev);
-QXT_EXPORT quint32 qt_mods_to_x11(Qt::KeyboardModifiers modifiers);
+quint32 qt_mods_to_x11(Qt::KeyboardModifiers modifiers);
-QXT_GUI_EXPORT
Qt::KeyboardModifiers x11_mods_to_qt(quint32 mods);
-
-QXT_GUI_EXPORT
quint32 xcb_mods_to_x11(quint32 mods);
#endif