From 45b0f1be686cfba8dcecb9be5c875cae59c69276 Mon Sep 17 00:00:00 2001 From: Oliver Wolff Date: Fri, 5 Jun 2020 09:24:37 +0200 Subject: Remove winrt MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Macros and the await helper function from qfunctions_winrt(_p).h are needed in other Qt modules which use UWP APIs on desktop windows. Task-number: QTBUG-84434 Change-Id: Ice09c11436ad151c17bdccd2c7defadd08c13925 Reviewed-by: Tor Arne Vestbø --- src/corelib/kernel/qsharedmemory_win.cpp | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'src/corelib/kernel/qsharedmemory_win.cpp') diff --git a/src/corelib/kernel/qsharedmemory_win.cpp b/src/corelib/kernel/qsharedmemory_win.cpp index 02de2339a5..cbf31bcb2f 100644 --- a/src/corelib/kernel/qsharedmemory_win.cpp +++ b/src/corelib/kernel/qsharedmemory_win.cpp @@ -101,12 +101,8 @@ HANDLE QSharedMemoryPrivate::handle() errorString = QSharedMemory::tr("%1: unable to make key").arg(function); return 0; } -#if defined(Q_OS_WINRT) - hand = OpenFileMappingFromApp(FILE_MAP_ALL_ACCESS, FALSE, reinterpret_cast(nativeKey.utf16())); -#else hand = OpenFileMapping(FILE_MAP_ALL_ACCESS, false, reinterpret_cast(nativeKey.utf16())); -#endif if (!hand) { setErrorString(function); return 0; @@ -136,13 +132,8 @@ bool QSharedMemoryPrivate::create(int size) } // Create the file mapping. -#if defined(Q_OS_WINRT) - hand = CreateFileMappingFromApp(INVALID_HANDLE_VALUE, 0, PAGE_READWRITE, size, - reinterpret_cast(nativeKey.utf16())); -#else hand = CreateFileMapping(INVALID_HANDLE_VALUE, 0, PAGE_READWRITE, 0, size, reinterpret_cast(nativeKey.utf16())); -#endif setErrorString(function); // hand is valid when it already exists unlike unix so explicitly check @@ -153,11 +144,7 @@ bool QSharedMemoryPrivate::attach(QSharedMemory::AccessMode mode) { // Grab a pointer to the memory block int permissions = (mode == QSharedMemory::ReadOnly ? FILE_MAP_READ : FILE_MAP_ALL_ACCESS); -#if defined(Q_OS_WINRT) - memory = (void *)MapViewOfFileFromApp(handle(), permissions, 0, 0); -#else memory = (void *)MapViewOfFile(handle(), permissions, 0, 0, 0); -#endif if (0 == memory) { setErrorString(QLatin1String("QSharedMemory::attach")); cleanHandle(); -- cgit v1.2.3