From 1f2734b82b77fc8a959fdca8f3372cf09f65edd8 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Mon, 23 Nov 2015 11:57:58 +0100 Subject: Xcb: Fix debugging code We need to pass the correct connection and we need a specialization for reply pointers. Also, there is not much of a point in first creating a QString from a QByteArray, only to retrieve a QByteArray again. Change-Id: Ia1bb5655f6229638e3bd2339acadeffc80561b9e Reviewed-by: Frederik Gladhorn Reviewed-by: Shawn Rutledge --- src/plugins/platforms/xcb/qxcbnativeinterface.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'src/plugins/platforms/xcb/qxcbnativeinterface.cpp') diff --git a/src/plugins/platforms/xcb/qxcbnativeinterface.cpp b/src/plugins/platforms/xcb/qxcbnativeinterface.cpp index dfb0a125e2..374eaa4d6e 100644 --- a/src/plugins/platforms/xcb/qxcbnativeinterface.cpp +++ b/src/plugins/platforms/xcb/qxcbnativeinterface.cpp @@ -444,11 +444,15 @@ void *QXcbNativeInterface::atspiBus() QXcbConnection *defaultConnection = integration->defaultConnection(); if (defaultConnection) { xcb_atom_t atspiBusAtom = defaultConnection->internAtom("AT_SPI_BUS"); - xcb_get_property_cookie_t cookie = Q_XCB_CALL(xcb_get_property(defaultConnection->xcb_connection(), false, - defaultConnection->rootWindow(), - atspiBusAtom, - XCB_ATOM_STRING, 0, 128)); - xcb_get_property_reply_t *reply = Q_XCB_CALL(xcb_get_property_reply(defaultConnection->xcb_connection(), cookie, 0)); + xcb_get_property_cookie_t cookie = Q_XCB_CALL2(xcb_get_property( + defaultConnection->xcb_connection(), + false, defaultConnection->rootWindow(), + atspiBusAtom, XCB_ATOM_STRING, 0, 128), + defaultConnection); + xcb_get_property_reply_t *reply = Q_XCB_CALL2(xcb_get_property_reply( + defaultConnection->xcb_connection(), + cookie, 0), + defaultConnection); Q_ASSERT(!reply->bytes_after); char *data = (char *)xcb_get_property_value(reply); int length = xcb_get_property_value_length(reply); -- cgit v1.2.3