summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qsharedmemory_win.cpp
diff options
context:
space:
mode:
authorminiak <milan.burda@gmail.com>2009-07-01 11:49:48 +0200
committerMarius Storm-Olsen <marius@trolltech.com>2009-07-01 11:51:12 +0200
commit5ae330b6546dabada53c394b53ce9513f552a8a5 (patch)
treeed214404285312e69489cc576eccf3ebd5a28316 /src/corelib/kernel/qsharedmemory_win.cpp
parentadc1c08ed9a5de2263564ba654a8ef7fed54af82 (diff)
src/corelib: Remove QT_WA and non-Unicode code paths, dropping Win9x and NT support
Also: QString::fromUtf16() -> QString::fromWCharArray() WCHAR & TCHAR -> wchar_t LPTSTR/LPCTSTR -> LPWSTR/LPCWSTR Documentation update Merge-request: 604 Reviewed-by: Marius Storm-Olsen <marius@trolltech.com>
Diffstat (limited to 'src/corelib/kernel/qsharedmemory_win.cpp')
-rw-r--r--src/corelib/kernel/qsharedmemory_win.cpp17
1 files changed, 3 insertions, 14 deletions
diff --git a/src/corelib/kernel/qsharedmemory_win.cpp b/src/corelib/kernel/qsharedmemory_win.cpp
index d963a6d42b..c88149af66 100644
--- a/src/corelib/kernel/qsharedmemory_win.cpp
+++ b/src/corelib/kernel/qsharedmemory_win.cpp
@@ -106,16 +106,11 @@ HANDLE QSharedMemoryPrivate::handle()
return false;
}
#ifndef Q_OS_WINCE
- QT_WA({
- hand = OpenFileMappingW(FILE_MAP_ALL_ACCESS, false, (TCHAR*)safeKey.utf16());
- }, {
- hand = OpenFileMappingA(FILE_MAP_ALL_ACCESS, false, safeKey.toLocal8Bit().constData());
- });
+ hand = OpenFileMapping(FILE_MAP_ALL_ACCESS, false, (wchar_t*)safeKey.utf16());
#else
// This works for opening a mapping too, but always opens it with read/write access in
// attach as it seems.
- hand = CreateFileMappingW(INVALID_HANDLE_VALUE,
- 0, PAGE_READWRITE, 0, 0, (TCHAR*)safeKey.utf16());
+ hand = CreateFileMapping(INVALID_HANDLE_VALUE, 0, PAGE_READWRITE, 0, 0, (wchar_t*)safeKey.utf16());
#endif
if (!hand) {
setErrorString(function);
@@ -148,13 +143,7 @@ bool QSharedMemoryPrivate::create(int size)
}
// Create the file mapping.
- QT_WA( {
- hand = CreateFileMappingW(INVALID_HANDLE_VALUE,
- 0, PAGE_READWRITE, 0, size, (TCHAR*)safeKey.utf16());
- }, {
- hand = CreateFileMappingA(INVALID_HANDLE_VALUE,
- 0, PAGE_READWRITE, 0, size, safeKey.toLocal8Bit().constData());
- } );
+ hand = CreateFileMapping(INVALID_HANDLE_VALUE, 0, PAGE_READWRITE, 0, size, (wchar_t*)safeKey.utf16());
setErrorString(function);
// hand is valid when it already exists unlike unix so explicitly check