summaryrefslogtreecommitdiffstats
path: root/src/gui/painting
diff options
context:
space:
mode:
authorRitt Konstantin <qnx@ics.com>2011-06-21 11:51:09 (GMT)
committerHarald Fernengel <harald.fernengel@nokia.com>2011-06-21 12:05:42 (GMT)
commit7657f6c1d9ee8b3c55eb291dda123565d45d645a (patch)
tree64b920a9da063e408bdde385f26b0167adb5f3f8 /src/gui/painting
parentd869e1ad4b0007757e97046609de2097cd9e9c5d (diff)
downloadQt-7657f6c1d9ee8b3c55eb291dda123565d45d645a.zip
Qt-7657f6c1d9ee8b3c55eb291dda123565d45d645a.tar.gz
Qt-7657f6c1d9ee8b3c55eb291dda123565d45d645a.tar.bz2
implement POSIX IPC based QLock, QWSLock and QWSSharedMemory backends
Merge-request: 1259 Reviewed-by: Harald Fernengel <harald.fernengel@nokia.com>
Diffstat (limited to 'src/gui/painting')
-rw-r--r--src/gui/painting/qwindowsurface_qws.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gui/painting/qwindowsurface_qws.cpp b/src/gui/painting/qwindowsurface_qws.cpp
index 7e8cf9b..3789a33 100644
--- a/src/gui/painting/qwindowsurface_qws.cpp
+++ b/src/gui/painting/qwindowsurface_qws.cpp
@@ -1065,10 +1065,12 @@ bool QWSSharedMemSurface::setMemory(int memId)
return true;
mem.detach();
- if (!mem.attach(memId)) {
+
+ if (memId != -1 && !mem.attach(memId)) {
+#ifndef QT_NO_DEBUG
perror("QWSSharedMemSurface: attaching to shared memory");
- qCritical("QWSSharedMemSurface: Error attaching to"
- " shared memory 0x%x", memId);
+ qCritical("QWSSharedMemSurface: Error attaching to shared memory 0x%x", memId);
+#endif
return false;
}