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ø --- tests/benchmarks/corelib/io/qfile/main.cpp | 26 -------------------------- 1 file changed, 26 deletions(-) (limited to 'tests/benchmarks/corelib/io/qfile/main.cpp') diff --git a/tests/benchmarks/corelib/io/qfile/main.cpp b/tests/benchmarks/corelib/io/qfile/main.cpp index 1966b30773..73b3ba8c48 100644 --- a/tests/benchmarks/corelib/io/qfile/main.cpp +++ b/tests/benchmarks/corelib/io/qfile/main.cpp @@ -297,11 +297,7 @@ void tst_qfile::readBigFile() // ensure we don't account string conversion wchar_t* cfilename = (wchar_t*)filename.utf16(); -#ifndef Q_OS_WINRT hndl = CreateFile(cfilename, GENERIC_READ, 0, 0, OPEN_EXISTING, 0, 0); -#else - hndl = CreateFile2(cfilename, GENERIC_READ, 0, OPEN_EXISTING, 0); -#endif Q_ASSERT(hndl); wchar_t* nativeBuffer = new wchar_t[BUFSIZE]; DWORD numberOfBytesRead; @@ -310,12 +306,7 @@ void tst_qfile::readBigFile() do { ReadFile(hndl, nativeBuffer, blockSize, &numberOfBytesRead, NULL); } while(numberOfBytesRead != 0); -#ifndef Q_OS_WINRT SetFilePointer(hndl, 0, NULL, FILE_BEGIN); -#else - LARGE_INTEGER offset = { 0 }; - SetFilePointerEx(hndl, offset, NULL, FILE_BEGIN); -#endif } delete[] nativeBuffer; CloseHandle(hndl); @@ -396,20 +387,11 @@ void tst_qfile::seek() // ensure we don't account string conversion wchar_t* cfilename = (wchar_t*)filename.utf16(); -#ifndef Q_OS_WINRT hndl = CreateFile(cfilename, GENERIC_READ, 0, 0, OPEN_EXISTING, 0, 0); -#else - hndl = CreateFile2(cfilename, GENERIC_READ, 0, OPEN_EXISTING, 0); -#endif Q_ASSERT(hndl); QBENCHMARK { i=(i+1)%sp_size; -#ifndef Q_OS_WINRT SetFilePointer(hndl, seekpos[i], NULL, 0); -#else - LARGE_INTEGER offset = { seekpos[i] }; - SetFilePointerEx(hndl, offset, NULL, FILE_BEGIN); -#endif } CloseHandle(hndl); #else @@ -494,11 +476,7 @@ void tst_qfile::open() wchar_t* cfilename = (wchar_t*)filename.utf16(); QBENCHMARK { -#ifndef Q_OS_WINRT hndl = CreateFile(cfilename, GENERIC_READ, 0, 0, OPEN_EXISTING, 0, 0); -#else - hndl = CreateFile2(cfilename, GENERIC_READ, 0, OPEN_EXISTING, 0); -#endif Q_ASSERT(hndl); CloseHandle(hndl); } @@ -702,11 +680,7 @@ void tst_qfile::readSmallFiles() // ensure we don't account string conversion wchar_t* cfilename = (wchar_t*)filename.utf16(); -#ifndef Q_OS_WINRT hndl = CreateFile(cfilename, GENERIC_READ, 0, 0, OPEN_EXISTING, 0, 0); -#else - hndl = CreateFile2(cfilename, GENERIC_READ, 0, OPEN_EXISTING, 0); -#endif Q_ASSERT(hndl); wchar_t* nativeBuffer = new wchar_t[BUFSIZE]; DWORD numberOfBytesRead; -- cgit v1.2.3