diff options
author | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2016-03-09 14:55:52 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2016-04-06 10:56:02 +0000 |
commit | 8104729e63dea923ce64149af67e51ad84ad386a (patch) | |
tree | 0904260ec7a7f927a8dc7e2c9d16e5b4baa08b23 | |
parent | ed2490433f379914b082e6b4ee04dc35b9d85cb7 (diff) |
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>
-rw-r--r-- | src/testlib/qabstracttestlogger.cpp | 2 | ||||
-rw-r--r-- | src/testlib/qplaintestlogger.cpp | 15 | ||||
-rw-r--r-- | src/testlib/qtestblacklist.cpp | 3 | ||||
-rw-r--r-- | src/testlib/qtestcase.cpp | 10 | ||||
-rw-r--r-- | src/testlib/testlib.pro | 7 | ||||
-rw-r--r-- | tests/auto/testlib/selftests/crashes/tst_crashes.cpp | 2 |
6 files changed, 7 insertions, 32 deletions
diff --git a/src/testlib/qabstracttestlogger.cpp b/src/testlib/qabstracttestlogger.cpp index 72b5eb3ed7..8337600fa1 100644 --- a/src/testlib/qabstracttestlogger.cpp +++ b/src/testlib/qabstracttestlogger.cpp @@ -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"); diff --git a/src/testlib/qplaintestlogger.cpp b/src/testlib/qplaintestlogger.cpp index a286246acd..dc20d922e5 100644 --- a/src/testlib/qplaintestlogger.cpp +++ b/src/testlib/qplaintestlogger.cpp @@ -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); diff --git a/src/testlib/qtestblacklist.cpp b/src/testlib/qtestblacklist.cpp index 4ef2dd3f67..e891150330 100644 --- a/src/testlib/qtestblacklist.cpp +++ b/src/testlib/qtestblacklist.cpp @@ -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" diff --git a/src/testlib/qtestcase.cpp b/src/testlib/qtestcase.cpp index d5b4ae218f..0ee75d484a 100644 --- a/src/testlib/qtestcase.cpp +++ b/src/testlib/qtestcase.cpp @@ -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) { diff --git a/src/testlib/testlib.pro b/src/testlib/testlib.pro index 85fb0cd2fe..9d204208cf 100644 --- a/src/testlib/testlib.pro +++ b/src/testlib/testlib.pro @@ -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 diff --git a/tests/auto/testlib/selftests/crashes/tst_crashes.cpp b/tests/auto/testlib/selftests/crashes/tst_crashes.cpp index 6cfa023b7e..87b241f5e5 100644 --- a/tests/auto/testlib/selftests/crashes/tst_crashes.cpp +++ b/tests/auto/testlib/selftests/crashes/tst_crashes.cpp @@ -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 |