QtTest: Remove Windows CE.
Remove #ifdef sections for Q_OS_WINCE and wince .pro file clauses in library and tests. Task-number: QTBUG-51673 Change-Id: I552b3fe8d6e0eb7c8c7b3a3d41558e5e21904dd2 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
This commit is contained in:
parent
ed2490433f
commit
8104729e63
@ -62,7 +62,7 @@ QAbstractTestLogger::QAbstractTestLogger(const char *filename)
|
|||||||
stream = stdout;
|
stream = stdout;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#if defined(_MSC_VER) && _MSC_VER >= 1400 && !defined(Q_OS_WINCE)
|
#if defined(_MSC_VER)
|
||||||
if (::fopen_s(&stream, filename, "wt")) {
|
if (::fopen_s(&stream, filename, "wt")) {
|
||||||
#else
|
#else
|
||||||
stream = ::fopen(filename, "wt");
|
stream = ::fopen(filename, "wt");
|
||||||
|
@ -49,10 +49,6 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#ifdef Q_OS_WINCE
|
|
||||||
#include <QtCore/QString>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef min // windows.h without NOMINMAX is included by the benchmark headers.
|
#ifdef min // windows.h without NOMINMAX is included by the benchmark headers.
|
||||||
# undef min
|
# undef min
|
||||||
#endif
|
#endif
|
||||||
@ -215,16 +211,7 @@ Q_CORE_EXPORT bool qt_logging_to_console(); // defined in qlogging.cpp
|
|||||||
|
|
||||||
void QPlainTestLogger::outputMessage(const char *str)
|
void QPlainTestLogger::outputMessage(const char *str)
|
||||||
{
|
{
|
||||||
#if defined(Q_OS_WINCE)
|
#if defined(Q_OS_WIN)
|
||||||
QString strUtf16 = QString::fromLocal8Bit(str);
|
|
||||||
const int maxOutputLength = 255;
|
|
||||||
do {
|
|
||||||
QString tmp = strUtf16.left(maxOutputLength);
|
|
||||||
OutputDebugString((wchar_t*)tmp.utf16());
|
|
||||||
strUtf16.remove(0, maxOutputLength);
|
|
||||||
} while (!strUtf16.isEmpty());
|
|
||||||
if (stream != stdout)
|
|
||||||
#elif defined(Q_OS_WIN)
|
|
||||||
// log to system log only if output is not redirected, and no console is attached
|
// log to system log only if output is not redirected, and no console is attached
|
||||||
if (!qt_logging_to_console() && stream == stdout) {
|
if (!qt_logging_to_console() && stream == stdout) {
|
||||||
OutputDebugStringA(str);
|
OutputDebugStringA(str);
|
||||||
|
@ -95,9 +95,6 @@ static QSet<QByteArray> keywords()
|
|||||||
#ifdef Q_OS_WINRT
|
#ifdef Q_OS_WINRT
|
||||||
<< "winrt"
|
<< "winrt"
|
||||||
#endif
|
#endif
|
||||||
#ifdef Q_OS_WINCE
|
|
||||||
<< "wince"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if QT_POINTER_SIZE == 8
|
#if QT_POINTER_SIZE == 8
|
||||||
<< "64bit"
|
<< "64bit"
|
||||||
|
@ -87,11 +87,9 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
#ifndef Q_OS_WINCE
|
|
||||||
# if !defined(Q_CC_MINGW) || (defined(Q_CC_MINGW) && defined(__MINGW64_VERSION_MAJOR))
|
# if !defined(Q_CC_MINGW) || (defined(Q_CC_MINGW) && defined(__MINGW64_VERSION_MAJOR))
|
||||||
# include <crtdbg.h>
|
# include <crtdbg.h>
|
||||||
# endif
|
# endif
|
||||||
#endif
|
|
||||||
#include <windows.h> // for Sleep
|
#include <windows.h> // for Sleep
|
||||||
#endif
|
#endif
|
||||||
#ifdef Q_OS_UNIX
|
#ifdef Q_OS_UNIX
|
||||||
@ -1432,7 +1430,7 @@ FatalSignalHandler::~FatalSignalHandler()
|
|||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT)
|
#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
|
||||||
|
|
||||||
// Helper class for resolving symbol names by dynamically loading "dbghelp.dll".
|
// Helper class for resolving symbol names by dynamically loading "dbghelp.dll".
|
||||||
class DebugSymbolResolver
|
class DebugSymbolResolver
|
||||||
@ -1570,7 +1568,7 @@ static LONG WINAPI windowsFaultHandler(struct _EXCEPTION_POINTERS *exInfo)
|
|||||||
|
|
||||||
return EXCEPTION_EXECUTE_HANDLER;
|
return EXCEPTION_EXECUTE_HANDLER;
|
||||||
}
|
}
|
||||||
#endif // Q_OS_WIN) && !Q_OS_WINCE && !Q_OS_WINRT
|
#endif // Q_OS_WIN) && !Q_OS_WINRT
|
||||||
|
|
||||||
static void initEnvironment()
|
static void initEnvironment()
|
||||||
{
|
{
|
||||||
@ -1662,7 +1660,7 @@ int QTest::qExec(QObject *testObject, int argc, char **argv)
|
|||||||
|
|
||||||
qtest_qParseArgs(argc, argv, false);
|
qtest_qParseArgs(argc, argv, false);
|
||||||
|
|
||||||
#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
|
#if defined(Q_OS_WIN)
|
||||||
if (!noCrashHandler) {
|
if (!noCrashHandler) {
|
||||||
# ifndef Q_CC_MINGW
|
# ifndef Q_CC_MINGW
|
||||||
_CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_DEBUG);
|
_CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_DEBUG);
|
||||||
@ -1672,7 +1670,7 @@ int QTest::qExec(QObject *testObject, int argc, char **argv)
|
|||||||
SetUnhandledExceptionFilter(windowsFaultHandler);
|
SetUnhandledExceptionFilter(windowsFaultHandler);
|
||||||
# endif
|
# endif
|
||||||
} // !noCrashHandler
|
} // !noCrashHandler
|
||||||
#endif // Q_OS_WIN) && !Q_OS_WINCE && !Q_OS_WINRT
|
#endif // Q_OS_WIN
|
||||||
|
|
||||||
#ifdef QTESTLIB_USE_VALGRIND
|
#ifdef QTESTLIB_USE_VALGRIND
|
||||||
if (QBenchmarkGlobalData::current->mode() == QBenchmarkGlobalData::CallgrindParentProcess) {
|
if (QBenchmarkGlobalData::current->mode() == QBenchmarkGlobalData::CallgrindParentProcess) {
|
||||||
|
@ -66,13 +66,6 @@ DEFINES *= QT_NO_CAST_TO_ASCII \
|
|||||||
QT_NO_CAST_FROM_ASCII \
|
QT_NO_CAST_FROM_ASCII \
|
||||||
QT_NO_DATASTREAM
|
QT_NO_DATASTREAM
|
||||||
embedded:QMAKE_CXXFLAGS += -fno-rtti
|
embedded:QMAKE_CXXFLAGS += -fno-rtti
|
||||||
wince: LIBS += \
|
|
||||||
ole32.lib \
|
|
||||||
oleaut32.lib \
|
|
||||||
uuid.lib \
|
|
||||||
commctrl.lib \
|
|
||||||
coredll.lib \
|
|
||||||
winsock.lib
|
|
||||||
|
|
||||||
mac {
|
mac {
|
||||||
LIBS += -framework Security
|
LIBS += -framework Security
|
||||||
|
@ -44,7 +44,7 @@ private slots:
|
|||||||
|
|
||||||
void tst_Crashes::crash()
|
void tst_Crashes::crash()
|
||||||
{
|
{
|
||||||
#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT)
|
#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
|
||||||
//we avoid the error dialogbox to appear on windows
|
//we avoid the error dialogbox to appear on windows
|
||||||
SetErrorMode( SEM_NOGPFAULTERRORBOX | SEM_FAILCRITICALERRORS | SEM_NOOPENFILEERRORBOX);
|
SetErrorMode( SEM_NOGPFAULTERRORBOX | SEM_FAILCRITICALERRORS | SEM_NOOPENFILEERRORBOX);
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user