diff options
author | Gatis Paeglis <gatis.paeglis@qt.io> | 2018-03-20 17:21:58 +0100 |
---|---|---|
committer | Gatis Paeglis <gatis.paeglis@qt.io> | 2018-04-09 18:14:47 +0000 |
commit | b2035d38e8dfdfe2ba8da96df5c1174f01dfbb5b (patch) | |
tree | 90c5df8d3ef4ea68e9fb472e5c8bc754fda4e4b7 /src/plugins/platforms/xcb/qxcbconnection.cpp | |
parent | ead3ca4aef8c1e5d3f3beda69031e8c70a3ad292 (diff) |
xcb: minor cleanups around QT_CONFIG(xcb_xlib)
- Remove unused createVisualInfoForDefaultVisualId() function.
This amends dff3c0f14f3c3a7288c456028d5bec23bee5406a.
- Inline QXcbConnection::xlib_display().
- Don't nest QT_CONFIG(xcb_native_painting) in QT_CONFIG(xcb_xlib).
configure.json already checks for the dependencies, we don't need
to do that again in *.h/*.cpp.
Change-Id: If39912e67ce9baa31faf091bebe120bac5cf6876
Reviewed-by: Alexander Volkov <a.volkov@rusbitech.ru>
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbconnection.cpp')
-rw-r--r-- | src/plugins/platforms/xcb/qxcbconnection.cpp | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/src/plugins/platforms/xcb/qxcbconnection.cpp b/src/plugins/platforms/xcb/qxcbconnection.cpp index ac0aade958..94dbb76117 100644 --- a/src/plugins/platforms/xcb/qxcbconnection.cpp +++ b/src/plugins/platforms/xcb/qxcbconnection.cpp @@ -1610,29 +1610,6 @@ xcb_window_t QXcbConnection::clientLeader() return m_clientLeader; } -#if QT_CONFIG(xcb_xlib) -void *QXcbConnection::xlib_display() const -{ - return m_xlib_display; -} - -void *QXcbConnection::createVisualInfoForDefaultVisualId() const -{ - if (m_defaultVisualId == UINT_MAX) - return 0; - XVisualInfo info; - memset(&info, 0, sizeof info); - info.visualid = m_defaultVisualId; - - int count = 0; - Display *dpy = static_cast<Display *>(connection()->xlib_display()); - XVisualInfo *retVisual = XGetVisualInfo(dpy, VisualIDMask, &info, &count); - Q_ASSERT(count < 2); - return retVisual; -} - -#endif - #if QT_CONFIG(xcb_xinput) static inline bool isXIType(xcb_generic_event_t *event, int opCode, uint16_t type) { |