summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Kudryavtsev <a.kudryavtsev@netris.ru>2016-10-19 15:30:58 +0300
committerAnton Kudryavtsev <a.kudryavtsev@netris.ru>2016-10-21 09:14:05 +0000
commit10b9321c1dc19236620ba20bdf54cae73891d1ef (patch)
treed2d07ce7a90b55bf5810cd39dbb72bb634d97bc7
parent92df823ed6170f6d9d33687e9a8c4f215f7db2a9 (diff)
qxcbconnection.cpp: fix warning about unused function
isXIEvent() is used iff XCB_USE_XINPUT2 is defined. So move declaration of the function in XCB_USE_XINPUT2 define scope. Change-Id: I6f045cd07d572ee7425ee6edc5ac73dcf0afdb37 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
-rw-r--r--src/plugins/platforms/xcb/qxcbconnection.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/platforms/xcb/qxcbconnection.cpp b/src/plugins/platforms/xcb/qxcbconnection.cpp
index c533a2a5f5..3d808d1d37 100644
--- a/src/plugins/platforms/xcb/qxcbconnection.cpp
+++ b/src/plugins/platforms/xcb/qxcbconnection.cpp
@@ -110,6 +110,7 @@ Q_LOGGING_CATEGORY(lcQpaScreen, "qt.qpa.screen")
#define XCB_GE_GENERIC 35
#endif
+#if defined(XCB_USE_XINPUT2)
// Starting from the xcb version 1.9.3 struct xcb_ge_event_t has changed:
// - "pad0" became "extension"
// - "pad1" and "pad" became "pad0"
@@ -127,6 +128,7 @@ static inline bool isXIEvent(xcb_generic_event_t *event, int opCode)
qt_xcb_ge_event_t *e = (qt_xcb_ge_event_t *)event;
return e->extension == opCode;
}
+#endif // XCB_USE_XINPUT2
#ifdef XCB_USE_XLIB
static const char * const xcbConnectionErrors[] = {