summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/corelib/tools')
-rw-r--r--tests/auto/corelib/tools/qbytearray/tst_qbytearray.cpp14
-rw-r--r--tests/auto/corelib/tools/qchar/tst_qchar.cpp3
-rw-r--r--tests/auto/corelib/tools/qcommandlineparser/tst_qcommandlineparser.cpp6
-rw-r--r--tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp32
-rw-r--r--tests/auto/corelib/tools/qhash/tst_qhash.cpp4
-rw-r--r--tests/auto/corelib/tools/qlocale/tst_qlocale.cpp18
-rw-r--r--tests/auto/corelib/tools/qregexp/tst_qregexp.cpp20
-rw-r--r--tests/auto/corelib/tools/qsharedpointer/externaltests.cpp4
-rw-r--r--tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp8
-rw-r--r--tests/auto/corelib/tools/qstring/tst_qstring.cpp55
-rw-r--r--tests/auto/corelib/tools/qstringlist/tst_qstringlist.cpp13
-rw-r--r--tests/auto/corelib/tools/qtimeline/tst_qtimeline.cpp4
12 files changed, 18 insertions, 163 deletions
diff --git a/tests/auto/corelib/tools/qbytearray/tst_qbytearray.cpp b/tests/auto/corelib/tools/qbytearray/tst_qbytearray.cpp
index 910d7abf51..586a4446b4 100644
--- a/tests/auto/corelib/tools/qbytearray/tst_qbytearray.cpp
+++ b/tests/auto/corelib/tools/qbytearray/tst_qbytearray.cpp
@@ -34,9 +34,6 @@
#include <qhash.h>
#include <limits.h>
#include <private/qtools_p.h>
-#if defined(Q_OS_WINCE)
-#include <qcoreapplication.h>
-#endif
class tst_QByteArray : public QObject
{
@@ -246,11 +243,7 @@ void tst_QByteArray::qCompress_data()
{
QTest::addColumn<QByteArray>("ba");
-#ifndef Q_OS_WINCE
const int size1 = 1024*1024;
-#else
- const int size1 = 1024;
-#endif
QByteArray ba1( size1, 0 );
QTest::newRow( "00" ) << QByteArray();
@@ -267,11 +260,6 @@ void tst_QByteArray::qCompress_data()
ba1.fill( 'A' );
QTest::newRow( "03" ) << ba1;
-#if defined(Q_OS_WINCE)
- int tmpArgc = 0;
- char** tmpArgv = 0;
- QCoreApplication app(tmpArgc, tmpArgv);
-#endif
QFile file( QFINDTESTDATA("rfc3252.txt") );
QVERIFY( file.open(QIODevice::ReadOnly) );
QTest::newRow( "04" ) << file.readAll();
@@ -728,7 +716,7 @@ void tst_QByteArray::qvsnprintf()
memset(buf, 42, sizeof(buf));
#ifdef Q_OS_WIN
// VS 2005 uses the Qt implementation of vsnprintf.
-# if defined(_MSC_VER) && _MSC_VER >= 1400 && !defined(Q_OS_WINCE)
+# if defined(_MSC_VER)
QCOMPARE(::qsnprintf(buf, 3, "%s", "bubu"), -1);
QCOMPARE(static_cast<const char*>(buf), "bu");
# else
diff --git a/tests/auto/corelib/tools/qchar/tst_qchar.cpp b/tests/auto/corelib/tools/qchar/tst_qchar.cpp
index e51f5d4694..92585fd471 100644
--- a/tests/auto/corelib/tools/qchar/tst_qchar.cpp
+++ b/tests/auto/corelib/tools/qchar/tst_qchar.cpp
@@ -31,9 +31,6 @@
#include <qfile.h>
#include <qstringlist.h>
#include <private/qunicodetables_p.h>
-#if defined(Q_OS_WINCE)
-#include <qcoreapplication.h>
-#endif
class tst_QChar : public QObject
{
diff --git a/tests/auto/corelib/tools/qcommandlineparser/tst_qcommandlineparser.cpp b/tests/auto/corelib/tools/qcommandlineparser/tst_qcommandlineparser.cpp
index fd835daa3a..319b04fa1a 100644
--- a/tests/auto/corelib/tools/qcommandlineparser/tst_qcommandlineparser.cpp
+++ b/tests/auto/corelib/tools/qcommandlineparser/tst_qcommandlineparser.cpp
@@ -512,9 +512,6 @@ void tst_QCommandLineParser::testVersionOption()
#ifdef QT_NO_PROCESS
QSKIP("This test requires QProcess support");
#else
-#ifdef Q_OS_WINCE
- QSKIP("Reading and writing to a process is not supported on Qt/CE");
-#endif
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
QSKIP("Deploying executable applications to file system on Android not supported.");
#endif
@@ -581,9 +578,6 @@ void tst_QCommandLineParser::testHelpOption()
#ifdef QT_NO_PROCESS
QSKIP("This test requires QProcess support");
#else
-#ifdef Q_OS_WINCE
- QSKIP("Reading and writing to a process is not supported on Qt/CE");
-#endif
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
QSKIP("Deploying executable applications to file system on Android not supported.");
#endif
diff --git a/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp b/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp
index cfec327319..3b791fec70 100644
--- a/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp
+++ b/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp
@@ -28,10 +28,7 @@
****************************************************************************/
#include <QtTest/QtTest>
-#ifndef Q_OS_WINCE
#include <time.h>
-#endif
-
#include <qdatetime.h>
#include <private/qdatetime_p.h>
@@ -108,10 +105,8 @@ private slots:
void msecsTo();
void operator_eqeq_data();
void operator_eqeq();
-#ifndef Q_OS_WINCE
void operator_insert_extract_data();
void operator_insert_extract();
-#endif
void currentDateTime();
void currentDateTimeUtc();
void currentDateTimeUtc2();
@@ -259,9 +254,7 @@ void tst_QDateTime::initTestCase()
void tst_QDateTime::init()
{
-#if defined(Q_OS_WINCE)
- SetUserDefaultLCID(MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT));
-#elif defined(Q_OS_WIN32)
+#if defined(Q_OS_WIN32)
SetThreadLocale(MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT));
#endif
}
@@ -1429,13 +1422,8 @@ void tst_QDateTime::msecsTo()
void tst_QDateTime::currentDateTime()
{
-#if defined(Q_OS_WINCE)
- __time64_t buf1, buf2;
- ::_time64(&buf1);
-#else
time_t buf1, buf2;
::time(&buf1);
-#endif
QDateTime lowerBound;
lowerBound.setTime_t(buf1);
@@ -1443,11 +1431,8 @@ void tst_QDateTime::currentDateTime()
QDateTime dt2 = QDateTime::currentDateTime().toLocalTime();
QDateTime dt3 = QDateTime::currentDateTime().toUTC();
-#if defined(Q_OS_WINCE)
- ::_time64(&buf2);
-#else
::time(&buf2);
-#endif
+
QDateTime upperBound;
upperBound.setTime_t(buf2);
// Note we must add 2 seconds here because time() may return up to
@@ -1482,13 +1467,9 @@ void tst_QDateTime::currentDateTime()
void tst_QDateTime::currentDateTimeUtc()
{
-#if defined(Q_OS_WINCE)
- __time64_t buf1, buf2;
- ::_time64(&buf1);
-#else
time_t buf1, buf2;
::time(&buf1);
-#endif
+
QDateTime lowerBound;
lowerBound.setTime_t(buf1);
@@ -1496,11 +1477,8 @@ void tst_QDateTime::currentDateTimeUtc()
QDateTime dt2 = QDateTime::currentDateTimeUtc().toLocalTime();
QDateTime dt3 = QDateTime::currentDateTimeUtc().toUTC();
-#if defined(Q_OS_WINCE)
- ::_time64(&buf2);
-#else
::time(&buf2);
-#endif
+
QDateTime upperBound;
upperBound.setTime_t(buf2);
// Note we must add 2 seconds here because time() may return up to
@@ -1859,7 +1837,6 @@ void tst_QDateTime::operator_eqeq()
}
}
-#ifndef Q_OS_WINCE
Q_DECLARE_METATYPE(QDataStream::Version)
void tst_QDateTime::operator_insert_extract_data()
@@ -1988,7 +1965,6 @@ void tst_QDateTime::operator_insert_extract()
qputenv("TZ", previousTimeZone.constData());
tzset();
}
-#endif
void tst_QDateTime::toString_strformat()
{
diff --git a/tests/auto/corelib/tools/qhash/tst_qhash.cpp b/tests/auto/corelib/tools/qhash/tst_qhash.cpp
index 4336d02b2c..1ec0924254 100644
--- a/tests/auto/corelib/tools/qhash/tst_qhash.cpp
+++ b/tests/auto/corelib/tools/qhash/tst_qhash.cpp
@@ -996,11 +996,7 @@ void tst_QHash::rehash_isnt_quadratic()
// this test should be incredibly slow if rehash() is quadratic
for (int j = 0; j < 5; ++j) {
QHash<int, int> testHash;
-#if defined(Q_OS_WINCE) // mobiles do not have infinite mem...
- for (int i = 0; i < 50000; ++i)
-#else
for (int i = 0; i < 500000; ++i)
-#endif
testHash.insertMulti(1, 1);
}
}
diff --git a/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp b/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp
index 352d82796d..80f354671a 100644
--- a/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp
+++ b/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp
@@ -52,15 +52,6 @@
# include <fenv.h>
#endif
-#ifdef Q_OS_WINCE
-#include <windows.h> // needed for GetUserDefaultLCID
-#define _control87 _controlfp
-extern "C" DWORD GetThreadLocale(void) {
- return GetUserDefaultLCID();
-}
-
-#endif
-
#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC)
# include <stdlib.h>
#endif
@@ -85,9 +76,7 @@ private slots:
#endif
void ctor();
-#if !defined(Q_OS_WINCE)
void emptyCtor();
-#endif
void legacyNames();
void unixLocaleName();
void matchingLocales();
@@ -394,10 +383,7 @@ void tst_QLocale::ctor()
#undef TEST_CTOR
}
-#if !defined(Q_OS_WINCE) && !defined(QT_NO_PROCESS)
-// Not when Q_OS_WINCE is defined because the test uses unsupported
-// Windows CE QProcess functionality (std streams, env)
-// Also Qt needs to be compiled without QT_NO_PROCESS
+#if !defined(QT_NO_PROCESS)
static inline bool runSysApp(const QString &binary,
const QStringList &env,
QString *output,
@@ -447,7 +433,6 @@ static inline bool runSysAppTest(const QString &binary,
}
#endif
-#if !defined(Q_OS_WINCE)
void tst_QLocale::emptyCtor()
{
#ifdef QT_NO_PROCESS
@@ -517,7 +502,6 @@ void tst_QLocale::emptyCtor()
#undef TEST_CTOR
#endif
}
-#endif
void tst_QLocale::legacyNames()
{
diff --git a/tests/auto/corelib/tools/qregexp/tst_qregexp.cpp b/tests/auto/corelib/tools/qregexp/tst_qregexp.cpp
index 2f285f3393..a98d37d733 100644
--- a/tests/auto/corelib/tools/qregexp/tst_qregexp.cpp
+++ b/tests/auto/corelib/tools/qregexp/tst_qregexp.cpp
@@ -927,11 +927,7 @@ void tst_QRegExp::rainersSlowRegExpCopyBug()
{
// this test should take an extreme amount of time if QRegExp is broken
QRegExp original(email);
-#if defined(Q_OS_WINCE)
- for (int i = 0; i < 100; ++i) {
-#else
for (int i = 0; i < 100000; ++i) {
-#endif
QRegExp copy = original;
(void)copy.exactMatch("~");
QRegExp copy2 = original;
@@ -980,13 +976,9 @@ void Thread::run()
str += "abbbdekcz";
int x;
-#if defined(Q_OS_WINCE)
- for (int j = 0; j < 100; ++j) {
-#else
- for (int j = 0; j < 10000; ++j) {
-#endif
+ for (int j = 0; j < 10000; ++j)
x = rx.indexIn(str);
- }
+
QCOMPARE(x, 3072);
}
@@ -1022,13 +1014,9 @@ void Thread2::run()
str += "abbbdekcz";
int x;
-#if defined(Q_OS_WINCE)
- for (int j = 0; j < 100; ++j) {
-#else
- for (int j = 0; j < 10000; ++j) {
-#endif
+ for (int j = 0; j < 10000; ++j)
x = rx.indexIn(str);
- }
+
QCOMPARE(x, 3072);
}
diff --git a/tests/auto/corelib/tools/qsharedpointer/externaltests.cpp b/tests/auto/corelib/tools/qsharedpointer/externaltests.cpp
index 0cccdb8262..7bebe5e9e0 100644
--- a/tests/auto/corelib/tools/qsharedpointer/externaltests.cpp
+++ b/tests/auto/corelib/tools/qsharedpointer/externaltests.cpp
@@ -342,7 +342,7 @@ namespace QTest {
"\n"
"#ifdef Q_OS_WIN\n"
"#include <windows.h>\n"
- "#if defined(Q_CC_MSVC) && !defined(Q_OS_WINCE)\n"
+ "#if defined(Q_CC_MSVC)\n"
"#include <crtdbg.h>\n"
"#endif\n"
"static void q_test_setup()\n"
@@ -358,7 +358,7 @@ namespace QTest {
"#endif\n"
"int main(int argc, char **argv)\n"
"{\n"
- "#if defined(Q_CC_MSVC) && defined(QT_DEBUG) && defined(_DEBUG) && defined(_CRT_ERROR) && !defined(Q_OS_WINCE)\n"
+ "#if defined(Q_CC_MSVC) && defined(QT_DEBUG) && defined(_DEBUG) && defined(_CRT_ERROR)\n"
" _CrtSetReportHook2(_CRT_RPTHOOK_INSTALL, CrtDbgHook);\n"
"#endif\n";
diff --git a/tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp b/tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp
index b5912badf2..cefe1e526d 100644
--- a/tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp
+++ b/tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp
@@ -1771,13 +1771,11 @@ void tst_QSharedPointer::threadStressTest_data()
QTest::newRow("1+1") << 1 << 1;
QTest::newRow("2+10") << 2 << 10;
-#ifndef Q_OS_WINCE
- // Windows CE cannot run this many threads
+
QTest::newRow("5+10") << 5 << 10;
QTest::newRow("5+30") << 5 << 30;
QTest::newRow("100+100") << 100 << 100;
-#endif
}
void tst_QSharedPointer::threadStressTest()
@@ -1811,11 +1809,7 @@ void tst_QSharedPointer::threadStressTest()
base.clear();
-#ifdef Q_OS_WINCE
- srand(QDateTime::currentDateTime().toTime_t());
-#else
srand(time(NULL));
-#endif
// start threads
for (int i = 0; i < allThreads.count(); ++i)
if (allThreads[i]) allThreads[i]->start();
diff --git a/tests/auto/corelib/tools/qstring/tst_qstring.cpp b/tests/auto/corelib/tools/qstring/tst_qstring.cpp
index 0a81e3f6bb..9dc564a361 100644
--- a/tests/auto/corelib/tools/qstring/tst_qstring.cpp
+++ b/tests/auto/corelib/tools/qstring/tst_qstring.cpp
@@ -37,10 +37,6 @@
# undef QT_ASCII_CAST_WARNINGS
#endif
-#if defined(Q_OS_WIN) && defined(Q_OS_WINCE)
-#define Q_OS_WIN_AND_WINCE
-#endif
-
#include <QtTest/QtTest>
#include <qregexp.h>
#include <qregularexpression.h>
@@ -527,7 +523,7 @@ private slots:
void integer_conversion();
void tortureSprintfDouble();
void toNum();
-#if !defined(Q_OS_WIN) || defined(Q_OS_WIN_AND_WINCE)
+#if !defined(Q_OS_WIN)
void localeAwareCompare_data();
void localeAwareCompare();
#endif
@@ -1053,10 +1049,6 @@ void tst_QString::acc_01()
QVERIFY(a.isNull());
QVERIFY(*a.toLatin1().constData() == '\0');
{
-#if defined(Q_OS_WINCE)
- int argc = 0;
- QCoreApplication app(argc, 0);
-#endif
QFile f("COMPARE.txt");
f.open(QIODevice::ReadOnly);
QTextStream ts( &f );
@@ -5309,15 +5301,11 @@ void tst_QString::tortureSprintfDouble()
#include <locale.h>
-#if !defined(Q_OS_WIN) || defined(Q_OS_WIN_AND_WINCE)
-// On Q_OS_WIN others than Win CE, we cannot set the system or user locale
+#if !defined(Q_OS_WIN)
+// On Q_OS_WIN, we cannot set the system or user locale
void tst_QString::localeAwareCompare_data()
{
-#ifdef Q_OS_WIN_AND_WINCE
- QTest::addColumn<ulong>("locale");
-#else
QTest::addColumn<QString>("locale");
-#endif
QTest::addColumn<QString>("s1");
QTest::addColumn<QString>("s2");
QTest::addColumn<int>("result");
@@ -5327,15 +5315,9 @@ void tst_QString::localeAwareCompare_data()
Latin-1-specific characters (I think). Compare with Swedish
below.
*/
-#ifdef Q_OS_WIN_AND_WINCE // assume c locale to be english
- QTest::newRow("c1") << MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT) << QString::fromLatin1("\xe5") << QString::fromLatin1("\xe4") << 1;
- QTest::newRow("c2") << MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT) << QString::fromLatin1("\xe4") << QString::fromLatin1("\xf6") << -1;
- QTest::newRow("c3") << MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT) << QString::fromLatin1("\xe5") << QString::fromLatin1("\xf6") << -1;
-#else
QTest::newRow("c1") << QString("C") << QString::fromLatin1("\xe5") << QString::fromLatin1("\xe4") << 1;
QTest::newRow("c2") << QString("C") << QString::fromLatin1("\xe4") << QString::fromLatin1("\xf6") << -1;
QTest::newRow("c3") << QString("C") << QString::fromLatin1("\xe5") << QString::fromLatin1("\xf6") << -1;
-#endif
/*
It's hard to test English, because it's treated differently
@@ -5345,15 +5327,9 @@ void tst_QString::localeAwareCompare_data()
comparison of Latin-1 values, although I'm not sure. So I
just test digits to make sure that it's not totally broken.
*/
-#ifdef Q_OS_WIN_AND_WINCE
- QTest::newRow("english1") << MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT) << QString("5") << QString("4") << 1;
- QTest::newRow("english2") << MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT) << QString("4") << QString("6") << -1;
- QTest::newRow("english3") << MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT) << QString("5") << QString("6") << -1;
-#else
QTest::newRow("english1") << QString("en_US") << QString("5") << QString("4") << 1;
QTest::newRow("english2") << QString("en_US") << QString("4") << QString("6") << -1;
QTest::newRow("english3") << QString("en_US") << QString("5") << QString("6") << -1;
-#endif
/*
In Swedish, a with ring above (E5) comes before a with
diaresis (E4), which comes before o diaresis (F6), which
@@ -5364,11 +5340,6 @@ void tst_QString::localeAwareCompare_data()
QTest::newRow("swedish2") << QString("sv_SE.ISO8859-1") << QString::fromLatin1("\xe4") << QString::fromLatin1("\xf6") << -1;
QTest::newRow("swedish3") << QString("sv_SE.ISO8859-1") << QString::fromLatin1("\xe5") << QString::fromLatin1("\xf6") << -1;
QTest::newRow("swedish4") << QString("sv_SE.ISO8859-1") << QString::fromLatin1("z") << QString::fromLatin1("\xe5") << -1;
-#elif defined(Q_OS_WIN_AND_WINCE)
- QTest::newRow("swedish1") << MAKELCID(MAKELANGID(LANG_SWEDISH, SUBLANG_SWEDISH), SORT_DEFAULT) << QString::fromLatin1("\xe5") << QString::fromLatin1("\xe4") << -1;
- QTest::newRow("swedish2") << MAKELCID(MAKELANGID(LANG_SWEDISH, SUBLANG_SWEDISH), SORT_DEFAULT) << QString::fromLatin1("\xe4") << QString::fromLatin1("\xf6") << -1;
- QTest::newRow("swedish3") << MAKELCID(MAKELANGID(LANG_SWEDISH, SUBLANG_SWEDISH), SORT_DEFAULT) << QString::fromLatin1("\xe5") << QString::fromLatin1("\xf6") << -1;
- QTest::newRow("swedish4") << MAKELCID(MAKELANGID(LANG_SWEDISH, SUBLANG_SWEDISH), SORT_DEFAULT) << QString::fromLatin1("z") << QString::fromLatin1("\xe5") << -1;
#else
QTest::newRow("swedish1") << QString("sv_SE") << QString::fromLatin1("\xe5") << QString::fromLatin1("\xe4") << -1;
QTest::newRow("swedish2") << QString("sv_SE") << QString::fromLatin1("\xe4") << QString::fromLatin1("\xf6") << -1;
@@ -5394,10 +5365,6 @@ void tst_QString::localeAwareCompare_data()
QTest::newRow("german1") << QString("de_DE.ISO8859-1") << QString::fromLatin1("z") << QString::fromLatin1("\xe4") << 1;
QTest::newRow("german2") << QString("de_DE.ISO8859-1") << QString::fromLatin1("\xe4") << QString::fromLatin1("\xf6") << -1;
QTest::newRow("german3") << QString("de_DE.ISO8859-1") << QString::fromLatin1("z") << QString::fromLatin1("\xf6") << 1;
-#elif defined(Q_OS_WIN_AND_WINCE)
- QTest::newRow("german1") << MAKELCID(MAKELANGID(LANG_GERMAN, SUBLANG_GERMAN), SORT_DEFAULT) << QString::fromLatin1("z") << QString::fromLatin1("\xe4") << 1;
- QTest::newRow("german2") << MAKELCID(MAKELANGID(LANG_GERMAN, SUBLANG_GERMAN), SORT_DEFAULT) << QString::fromLatin1("\xe4") << QString::fromLatin1("\xf6") << -1;
- QTest::newRow("german3") << MAKELCID(MAKELANGID(LANG_GERMAN, SUBLANG_GERMAN), SORT_DEFAULT) << QString::fromLatin1("z") << QString::fromLatin1("\xf6") << 1;
#else
QTest::newRow("german1") << QString("de_DE") << QString::fromLatin1("z") << QString::fromLatin1("\xe4") << 1;
QTest::newRow("german2") << QString("de_DE") << QString::fromLatin1("\xe4") << QString::fromLatin1("\xf6") << -1;
@@ -5407,11 +5374,7 @@ void tst_QString::localeAwareCompare_data()
void tst_QString::localeAwareCompare()
{
-#ifdef Q_OS_WIN_AND_WINCE
- QFETCH(ulong, locale);
-#else
QFETCH(QString, locale);
-#endif
QFETCH(QString, s1);
QFETCH(QString, s2);
QFETCH(int, result);
@@ -5419,11 +5382,7 @@ void tst_QString::localeAwareCompare()
QStringRef r1(&s1, 0, s1.length());
QStringRef r2(&s2, 0, s2.length());
-#ifdef Q_OS_WIN_AND_WINCE
- DWORD oldLcid = GetUserDefaultLCID();
- SetUserDefaultLCID(locale);
- QCOMPARE(locale, GetUserDefaultLCID());
-#elif defined (Q_OS_MAC) || defined(QT_USE_ICU)
+#if defined (Q_OS_DARWIN) || defined(QT_USE_ICU)
QSKIP("Setting the locale is not supported on OS X or ICU (you can set the C locale, but that won't affect localeAwareCompare)");
#else
if (!locale.isEmpty()) {
@@ -5485,14 +5444,10 @@ void tst_QString::localeAwareCompare()
QVERIFY(testres == 0);
}
-#ifdef Q_OS_WIN_AND_WINCE
- SetUserDefaultLCID(oldLcid);
-#else
if (!locale.isEmpty())
setlocale(LC_ALL, "");
-#endif
}
-#endif //!defined(Q_OS_WIN) || defined(Q_OS_WIN_AND_WINCE)
+#endif //!defined(Q_OS_WIN)
void tst_QString::reverseIterators()
{
diff --git a/tests/auto/corelib/tools/qstringlist/tst_qstringlist.cpp b/tests/auto/corelib/tools/qstringlist/tst_qstringlist.cpp
index dc3547f9ba..0fdafd9b01 100644
--- a/tests/auto/corelib/tools/qstringlist/tst_qstringlist.cpp
+++ b/tests/auto/corelib/tools/qstringlist/tst_qstringlist.cpp
@@ -32,9 +32,6 @@
#include <qstringlist.h>
#include <locale.h>
-#ifdef Q_OS_WINCE
-#include <windows.h> // needed for GetUserDefaultLCID
-#endif
class tst_QStringList : public QObject
{
@@ -205,13 +202,7 @@ void tst_QStringList::sort()
list2 << "BETA" << "Gamma" << "alpha" << "beta" << "epsilon" << "gAmma" << "gamma";
QCOMPARE( list1, list2 );
-#ifdef Q_OS_WINCE
- DWORD oldLcid = GetUserDefaultLCID();
- // Assume c locale to be english
- SetUserDefaultLCID(MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT));
-#else
char *current_locale = setlocale(LC_ALL, "C");
-#endif
QStringList list3, list4;
list3 << "alpha" << "beta" << "BETA" << "gamma" << "Gamma" << "gAmma" << "epsilon";
list3.sort(Qt::CaseInsensitive);
@@ -224,11 +215,7 @@ void tst_QStringList::sort()
QCOMPARE(list4.at(0), QString("alpha"));
QVERIFY(list4.indexOf("epsilon") > 0);
QVERIFY(list4.indexOf("epsilon") < (list4.count() - 1));
-#ifdef Q_OS_WINCE
- SetUserDefaultLCID(oldLcid);
-#else
setlocale(LC_ALL, current_locale);
-#endif
}
void tst_QStringList::replaceInStrings()
diff --git a/tests/auto/corelib/tools/qtimeline/tst_qtimeline.cpp b/tests/auto/corelib/tools/qtimeline/tst_qtimeline.cpp
index 83838570be..cd2cdab11b 100644
--- a/tests/auto/corelib/tools/qtimeline/tst_qtimeline.cpp
+++ b/tests/auto/corelib/tools/qtimeline/tst_qtimeline.cpp
@@ -68,11 +68,7 @@ protected:
void tst_QTimeLine::range()
{
-#ifdef Q_OS_WINCE //On WinCE timer resolution is bad - using longer times instead
- QTimeLine timeLine(2000);
-#else
QTimeLine timeLine(200);
-#endif
QCOMPARE(timeLine.startFrame(), 0);
QCOMPARE(timeLine.endFrame(), 0);
timeLine.setFrameRange(0, 1);