summaryrefslogtreecommitdiffstats
path: root/tests/benchmarks/corelib/io
diff options
context:
space:
mode:
Diffstat (limited to 'tests/benchmarks/corelib/io')
-rw-r--r--tests/benchmarks/corelib/io/qdiriterator/main.cpp5
-rw-r--r--tests/benchmarks/corelib/io/qdiriterator/qfilesystemiterator.cpp3
-rw-r--r--tests/benchmarks/corelib/io/qfile/main.cpp1
3 files changed, 4 insertions, 5 deletions
diff --git a/tests/benchmarks/corelib/io/qdiriterator/main.cpp b/tests/benchmarks/corelib/io/qdiriterator/main.cpp
index 319b707948..cecd0de1da 100644
--- a/tests/benchmarks/corelib/io/qdiriterator/main.cpp
+++ b/tests/benchmarks/corelib/io/qdiriterator/main.cpp
@@ -44,7 +44,6 @@
#ifdef Q_OS_WIN
# include <windows.h>
-# include <atlbase.h>
#else
# include <sys/stat.h>
# include <sys/types.h>
@@ -176,7 +175,9 @@ void tst_qdiriterator::posix()
QString path(dirpath);
QBENCHMARK {
#ifdef Q_OS_WIN
- count = posix_helper(path.utf16());
+ wchar_t wPath[MAX_PATH];
+ path.toWCharArray(wPath);
+ count = posix_helper(wPath);
#else
count = posix_helper(dirpath.constData());
#endif
diff --git a/tests/benchmarks/corelib/io/qdiriterator/qfilesystemiterator.cpp b/tests/benchmarks/corelib/io/qdiriterator/qfilesystemiterator.cpp
index 935bccd630..8c9f1cc423 100644
--- a/tests/benchmarks/corelib/io/qdiriterator/qfilesystemiterator.cpp
+++ b/tests/benchmarks/corelib/io/qdiriterator/qfilesystemiterator.cpp
@@ -98,7 +98,6 @@
#ifdef Q_OS_WIN
# include <windows.h>
-# include <atlbase.h>
#else
# include <sys/stat.h>
# include <sys/types.h>
@@ -229,7 +228,7 @@ void QFileSystemIteratorPrivate::pushSubDirectory(const QByteArray &path)
#ifdef Q_OS_WIN
wchar_t szSearchPath[MAX_PATH];
- wcscpy(szSearchPath, QString(path).utf16());
+ QString::fromAscii(path).toWCharArray(szSearchPath);
wcscat(szSearchPath, L"\\*");
HANDLE dir = FindFirstFile(szSearchPath, &m_fileSearchResult);
m_bFirstSearchResult = true;
diff --git a/tests/benchmarks/corelib/io/qfile/main.cpp b/tests/benchmarks/corelib/io/qfile/main.cpp
index fa13aa977f..11cd5c76b2 100644
--- a/tests/benchmarks/corelib/io/qfile/main.cpp
+++ b/tests/benchmarks/corelib/io/qfile/main.cpp
@@ -51,7 +51,6 @@
#ifdef Q_OS_WIN
# include <windows.h>
-# include <atlbase.h>
#endif
#define BUFSIZE 1024*512