src/gui/image/qnativeimage.cpp
changeset 7 f7bc934e204c
parent 3 41300fa6a67c
equal deleted inserted replaced
3:41300fa6a67c 7:f7bc934e204c
     1 /****************************************************************************
     1 /****************************************************************************
     2 **
     2 **
     3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     4 ** All rights reserved.
     4 ** All rights reserved.
     5 ** Contact: Nokia Corporation (qt-info@nokia.com)
     5 ** Contact: Nokia Corporation (qt-info@nokia.com)
     6 **
     6 **
     7 ** This file is part of the QtGui module of the Qt Toolkit.
     7 ** This file is part of the QtGui module of the Qt Toolkit.
     8 **
     8 **
   180         xshminfo.shmaddr = xshmimg->data;
   180         xshminfo.shmaddr = xshmimg->data;
   181         if (shmctl(xshminfo.shmid, IPC_RMID, 0) == -1)
   181         if (shmctl(xshminfo.shmid, IPC_RMID, 0) == -1)
   182             qWarning() << "Error while marking the shared memory segment to be destroyed";
   182             qWarning() << "Error while marking the shared memory segment to be destroyed";
   183         ok = (xshminfo.shmaddr != (char*)-1);
   183         ok = (xshminfo.shmaddr != (char*)-1);
   184         if (ok)
   184         if (ok)
   185             image = QImage((uchar *)xshmimg->data, width, height, systemFormat());
   185             image = QImage((uchar *)xshmimg->data, width, height, format);
   186     }
   186     }
   187     xshminfo.readOnly = false;
   187     xshminfo.readOnly = false;
   188     if (ok)
   188     if (ok)
   189         ok = XShmAttach(X11->display, &xshminfo);
   189         ok = XShmAttach(X11->display, &xshminfo);
   190     if (!ok) {
   190     if (!ok) {