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;
|
||||
return;
|
||||
}
|
||||
#if defined(_MSC_VER) && _MSC_VER >= 1400 && !defined(Q_OS_WINCE)
|
||||
#if defined(_MSC_VER)
|
||||
if (::fopen_s(&stream, filename, "wt")) {
|
||||
#else
|
||||
stream = ::fopen(filename, "wt");
|
||||
|
@ -49,10 +49,6 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifdef Q_OS_WINCE
|
||||
#include <QtCore/QString>
|
||||
#endif
|
||||
|
||||
#ifdef min // windows.h without NOMINMAX is included by the benchmark headers.
|
||||
# undef min
|
||||
#endif
|
||||
@ -215,16 +211,7 @@ Q_CORE_EXPORT bool qt_logging_to_console(); // defined in qlogging.cpp
|
||||
|
||||
void QPlainTestLogger::outputMessage(const char *str)
|
||||
{
|
||||
#if defined(Q_OS_WINCE)
|
||||
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)
|
||||
#if defined(Q_OS_WIN)
|
||||
// log to system log only if output is not redirected, and no console is attached
|
||||
if (!qt_logging_to_console() && stream == stdout) {
|
||||
OutputDebugStringA(str);
|
||||
|
@ -95,9 +95,6 @@ static QSet<QByteArray> keywords()
|
||||
#ifdef Q_OS_WINRT
|
||||
<< "winrt"
|
||||
#endif
|
||||
#ifdef Q_OS_WINCE
|
||||
<< "wince"
|
||||
#endif
|
||||
|
||||
#if QT_POINTER_SIZE == 8
|
||||
<< "64bit"
|
||||
|
@ -87,11 +87,9 @@
|
||||
#endif
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
#ifndef Q_OS_WINCE
|
||||
# if !defined(Q_CC_MINGW) || (defined(Q_CC_MINGW) && defined(__MINGW64_VERSION_MAJOR))
|
||||
# include <crtdbg.h>
|
||||
# endif
|
||||
#endif
|
||||
#include <windows.h> // for Sleep
|
||||
#endif
|
||||
#ifdef Q_OS_UNIX
|
||||
@ -1432,7 +1430,7 @@ FatalSignalHandler::~FatalSignalHandler()
|
||||
|
||||
} // 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".
|
||||
class DebugSymbolResolver
|
||||
@ -1570,7 +1568,7 @@ static LONG WINAPI windowsFaultHandler(struct _EXCEPTION_POINTERS *exInfo)
|
||||
|
||||
return EXCEPTION_EXECUTE_HANDLER;
|
||||
}
|
||||
#endif // Q_OS_WIN) && !Q_OS_WINCE && !Q_OS_WINRT
|
||||
#endif // Q_OS_WIN) && !Q_OS_WINRT
|
||||
|
||||
static void initEnvironment()
|
||||
{
|
||||
@ -1662,7 +1660,7 @@ int QTest::qExec(QObject *testObject, int argc, char **argv)
|
||||
|
||||
qtest_qParseArgs(argc, argv, false);
|
||||
|
||||
#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
|
||||
#if defined(Q_OS_WIN)
|
||||
if (!noCrashHandler) {
|
||||
# ifndef Q_CC_MINGW
|
||||
_CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_DEBUG);
|
||||
@ -1672,7 +1670,7 @@ int QTest::qExec(QObject *testObject, int argc, char **argv)
|
||||
SetUnhandledExceptionFilter(windowsFaultHandler);
|
||||
# endif
|
||||
} // !noCrashHandler
|
||||
#endif // Q_OS_WIN) && !Q_OS_WINCE && !Q_OS_WINRT
|
||||
#endif // Q_OS_WIN
|
||||
|
||||
#ifdef QTESTLIB_USE_VALGRIND
|
||||
if (QBenchmarkGlobalData::current->mode() == QBenchmarkGlobalData::CallgrindParentProcess) {
|
||||
|
@ -66,13 +66,6 @@ DEFINES *= QT_NO_CAST_TO_ASCII \
|
||||
QT_NO_CAST_FROM_ASCII \
|
||||
QT_NO_DATASTREAM
|
||||
embedded:QMAKE_CXXFLAGS += -fno-rtti
|
||||
wince: LIBS += \
|
||||
ole32.lib \
|
||||
oleaut32.lib \
|
||||
uuid.lib \
|
||||
commctrl.lib \
|
||||
coredll.lib \
|
||||
winsock.lib
|
||||
|
||||
mac {
|
||||
LIBS += -framework Security
|
||||
|
@ -44,7 +44,7 @@ private slots:
|
||||
|
||||
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
|
||||
SetErrorMode( SEM_NOGPFAULTERRORBOX | SEM_FAILCRITICALERRORS | SEM_NOOPENFILEERRORBOX);
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user