summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb/qxcbimage.cpp
diff options
context:
space:
mode:
authorUli Schlachter <psychon@znc.in>2012-03-26 21:02:22 +0200
committerQt by Nokia <qt-info@nokia.com>2012-03-27 19:26:45 +0200
commit0af92174300fead7e2ab4a4ee248181432033d56 (patch)
treeac8c9b8b6f85b30dd4ec062beae3b8c6fd57f9d4 /src/plugins/platforms/xcb/qxcbimage.cpp
parentaea0b24d69253285e23bbc2eeaac29b5d19cd868 (diff)
XCB: Simplify xcb error handling
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 <psychon@znc.in> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbimage.cpp')
-rw-r--r--src/plugins/platforms/xcb/qxcbimage.cpp9
1 files changed, 2 insertions, 7 deletions
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();
}