From 0af92174300fead7e2ab4a4ee248181432033d56 Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Mon, 26 Mar 2012 21:02:22 +0200 Subject: XCB: Simplify xcb error handling MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Instead of getting errors just to feed them to the default error handle, the corresponding unchecked request is used which automatically makes errors go to the default error handler. Change-Id: Ib213a860affb72de6f9896f68505e283a809d58f Signed-off-by: Uli Schlachter Reviewed-by: Samuel Rødal Reviewed-by: Robin Burchell --- src/plugins/platforms/xcb/qxcbimage.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src/plugins/platforms/xcb/qxcbimage.cpp') diff --git a/src/plugins/platforms/xcb/qxcbimage.cpp b/src/plugins/platforms/xcb/qxcbimage.cpp index 12979bfb68..6a1209e6cf 100644 --- a/src/plugins/platforms/xcb/qxcbimage.cpp +++ b/src/plugins/platforms/xcb/qxcbimage.cpp @@ -84,20 +84,15 @@ QPixmap qt_xcb_pixmapFromXPixmap(QXcbConnection *connection, xcb_pixmap_t pixmap const xcb_visualtype_t *visual) { xcb_connection_t *conn = connection->xcb_connection(); - xcb_generic_error_t *error = 0; xcb_get_image_cookie_t get_image_cookie = - xcb_get_image(conn, XCB_IMAGE_FORMAT_Z_PIXMAP, pixmap, + xcb_get_image_unchecked(conn, XCB_IMAGE_FORMAT_Z_PIXMAP, pixmap, 0, 0, width, height, 0xffffffff); xcb_get_image_reply_t *image_reply = - xcb_get_image_reply(conn, get_image_cookie, &error); + xcb_get_image_reply(conn, get_image_cookie, NULL); if (!image_reply) { - if (error) { - connection->handleXcbError(error); - free(error); - } return QPixmap(); } -- cgit v1.2.3