From 5872a89474f632188b650d3d2d13193a3c624049 Mon Sep 17 00:00:00 2001 From: Andreas Buhr Date: Fri, 16 Oct 2020 16:27:14 +0200 Subject: name our glib event sources to ease debugging glib event sources can have a name, but it is not required. Internal to glib, it is common to give them a name, see for example https://git.io/JTZ8g . This patch gives a name to each glib event source created in qtbase. Task-number: QTBUG-84291 Change-Id: I4f04526dcec082242312e3a66da2adf37a22e626 Reviewed-by: Giuseppe D'Angelo --- src/plugins/platforms/xcb/qxcbeventdispatcher.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/plugins/platforms') diff --git a/src/plugins/platforms/xcb/qxcbeventdispatcher.cpp b/src/plugins/platforms/xcb/qxcbeventdispatcher.cpp index 5055057db9..68259ff238 100644 --- a/src/plugins/platforms/xcb/qxcbeventdispatcher.cpp +++ b/src/plugins/platforms/xcb/qxcbeventdispatcher.cpp @@ -104,8 +104,9 @@ QXcbGlibEventDispatcher::QXcbGlibEventDispatcher(QXcbConnection *connection, QOb m_xcbEventSourceFuncs.dispatch = xcbSourceDispatch; m_xcbEventSourceFuncs.finalize = nullptr; - m_xcbEventSource = reinterpret_cast( - g_source_new(&m_xcbEventSourceFuncs, sizeof(XcbEventSource))); + GSource *source = g_source_new(&m_xcbEventSourceFuncs, sizeof(XcbEventSource)); + g_source_set_name(source, "[Qt] XcbEventSource"); + m_xcbEventSource = reinterpret_cast(source); m_xcbEventSource->dispatcher = this; m_xcbEventSource->dispatcher_p = d_func(); -- cgit v1.2.3