From e2773c35eb06f5a17c8ef40a949c6af48c4175fd Mon Sep 17 00:00:00 2001 From: Harald Fernengel Date: Wed, 8 Jun 2011 21:32:45 +0200 Subject: Fix autotest on Windows --- src/corelib/kernel/qsharedmemory_win.cpp | 8 ++------ 1 file 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) -- cgit v0.12