src/gui/image/qnativeimage.cpp
changeset 19 fcece45ef507
parent 18 2f34d5167611
equal deleted inserted replaced
18:2f34d5167611 19:fcece45ef507
   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) {