Fix compilation of Benchmark tests on Windows.
Change-Id: I92186f916792d110f22b23525b673ef006e19046 Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
This commit is contained in:
parent
d8492599f1
commit
98ebac7ede
@ -44,7 +44,6 @@
|
|||||||
|
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
# include <windows.h>
|
# include <windows.h>
|
||||||
# include <atlbase.h>
|
|
||||||
#else
|
#else
|
||||||
# include <sys/stat.h>
|
# include <sys/stat.h>
|
||||||
# include <sys/types.h>
|
# include <sys/types.h>
|
||||||
@ -176,7 +175,9 @@ void tst_qdiriterator::posix()
|
|||||||
QString path(dirpath);
|
QString path(dirpath);
|
||||||
QBENCHMARK {
|
QBENCHMARK {
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
count = posix_helper(path.utf16());
|
wchar_t wPath[MAX_PATH];
|
||||||
|
path.toWCharArray(wPath);
|
||||||
|
count = posix_helper(wPath);
|
||||||
#else
|
#else
|
||||||
count = posix_helper(dirpath.constData());
|
count = posix_helper(dirpath.constData());
|
||||||
#endif
|
#endif
|
||||||
|
@ -98,7 +98,6 @@
|
|||||||
|
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
# include <windows.h>
|
# include <windows.h>
|
||||||
# include <atlbase.h>
|
|
||||||
#else
|
#else
|
||||||
# include <sys/stat.h>
|
# include <sys/stat.h>
|
||||||
# include <sys/types.h>
|
# include <sys/types.h>
|
||||||
@ -229,7 +228,7 @@ void QFileSystemIteratorPrivate::pushSubDirectory(const QByteArray &path)
|
|||||||
|
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
wchar_t szSearchPath[MAX_PATH];
|
wchar_t szSearchPath[MAX_PATH];
|
||||||
wcscpy(szSearchPath, QString(path).utf16());
|
QString::fromAscii(path).toWCharArray(szSearchPath);
|
||||||
wcscat(szSearchPath, L"\\*");
|
wcscat(szSearchPath, L"\\*");
|
||||||
HANDLE dir = FindFirstFile(szSearchPath, &m_fileSearchResult);
|
HANDLE dir = FindFirstFile(szSearchPath, &m_fileSearchResult);
|
||||||
m_bFirstSearchResult = true;
|
m_bFirstSearchResult = true;
|
||||||
|
@ -51,7 +51,6 @@
|
|||||||
|
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
# include <windows.h>
|
# include <windows.h>
|
||||||
# include <atlbase.h>
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define BUFSIZE 1024*512
|
#define BUFSIZE 1024*512
|
||||||
|
@ -11,3 +11,5 @@ SUBDIRS = \
|
|||||||
qstringbuilder \
|
qstringbuilder \
|
||||||
qstringlist \
|
qstringlist \
|
||||||
qvector
|
qvector
|
||||||
|
|
||||||
|
!*g++*: SUBDIRS -= qstring
|
||||||
|
Loading…
x
Reference in New Issue
Block a user