summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel
diff options
context:
space:
mode:
authorHarald Fernengel <harald.fernengel@nokia.com>2011-06-08 19:32:45 (GMT)
committerHarald Fernengel <harald.fernengel@nokia.com>2011-06-08 19:32:45 (GMT)
commite2773c35eb06f5a17c8ef40a949c6af48c4175fd (patch)
treef1ae9d47ba733466da1aebb224db54da62e60a28 /src/corelib/kernel
parent5047ba619f6b251426c38db68a9efa6ef4ad5ac7 (diff)
downloadQt-e2773c35eb06f5a17c8ef40a949c6af48c4175fd.zip
Qt-e2773c35eb06f5a17c8ef40a949c6af48c4175fd.tar.gz
Qt-e2773c35eb06f5a17c8ef40a949c6af48c4175fd.tar.bz2
Fix autotest on Windows
Diffstat (limited to 'src/corelib/kernel')
-rw-r--r--src/corelib/kernel/qsharedmemory_win.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/corelib/kernel/qsharedmemory_win.cpp b/src/corelib/kernel/qsharedmemory_win.cpp
index 3b8876f..567214e 100644
--- a/src/corelib/kernel/qsharedmemory_win.cpp
+++ b/src/corelib/kernel/qsharedmemory_win.cpp
@@ -142,14 +142,10 @@ bool QSharedMemoryPrivate::create(int size)
// Create the file mapping.
hand = CreateFileMapping(INVALID_HANDLE_VALUE, 0, PAGE_READWRITE, 0, size, (wchar_t*)nativeKey.utf16());
+ setErrorString(QLatin1String("QSharedMemory::create"));
// hand is valid when it already exists unlike unix so explicitly check
- if (error == QSharedMemory::AlreadyExists || !hand) {
- setErrorString(QLatin1String("QSharedMemory::create"));
- return false;
- }
-
- return true;
+ return !(error == QSharedMemory::AlreadyExists || !hand);
}
bool QSharedMemoryPrivate::attach(QSharedMemory::AccessMode mode)