summaryrefslogtreecommitdiffstats
path: root/tests/benchmarks/corelib/io/qfile
diff options
context:
space:
mode:
authorOliver Wolff <oliver.wolff@qt.io>2020-06-05 09:24:37 +0200
committerLiang Qi <liang.qi@qt.io>2020-06-06 20:25:49 +0200
commit45b0f1be686cfba8dcecb9be5c875cae59c69276 (patch)
tree363dfd46575d147206267d854ce14747157f432e /tests/benchmarks/corelib/io/qfile
parentaa81b90738ce9faee5e433617c8bd243cb238729 (diff)
Remove winrt
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ø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'tests/benchmarks/corelib/io/qfile')
-rw-r--r--tests/benchmarks/corelib/io/qfile/main.cpp26
1 files changed, 0 insertions, 26 deletions
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;