summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/io
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/corelib/io')
-rw-r--r--tests/auto/corelib/io/io.pro2
-rw-r--r--tests/auto/corelib/io/largefile/largefile.pro2
-rw-r--r--tests/auto/corelib/io/largefile/tst_largefile.cpp16
-rw-r--r--tests/auto/corelib/io/qdatastream/tst_qdatastream.cpp27
-rw-r--r--tests/auto/corelib/io/qdir/tst_qdir.cpp43
-rw-r--r--tests/auto/corelib/io/qdiriterator/qdiriterator.pro2
-rw-r--r--tests/auto/corelib/io/qdiriterator/tst_qdiriterator.cpp27
-rw-r--r--tests/auto/corelib/io/qfile/qfile.pro7
-rw-r--r--tests/auto/corelib/io/qfile/test/test.pro1
-rw-r--r--tests/auto/corelib/io/qfile/tst_qfile.cpp93
-rw-r--r--tests/auto/corelib/io/qfileinfo/qfileinfo.pro2
-rw-r--r--tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp95
-rw-r--r--tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp11
-rw-r--r--tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp6
-rw-r--r--tests/auto/corelib/io/qlockfile/tst_qlockfile.cpp8
-rw-r--r--tests/auto/corelib/io/qlockfile/tst_qlockfile.pro2
-rw-r--r--tests/auto/corelib/io/qprocess/qprocess.pri3
-rw-r--r--tests/auto/corelib/io/qprocess/qprocess.pro2
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessSpacesArgs/main.cpp11
-rw-r--r--tests/auto/corelib/io/qprocess/testSoftExit/testSoftExit.pro2
-rw-r--r--tests/auto/corelib/io/qprocess/tst_qprocess.cpp151
-rw-r--r--tests/auto/corelib/io/qprocessenvironment/tst_qprocessenvironment.cpp14
-rw-r--r--tests/auto/corelib/io/qsettings/tst_qsettings.cpp2
-rw-r--r--tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp4
-rw-r--r--tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp11
-rw-r--r--tests/auto/corelib/io/qtextstream/tst_qtextstream.cpp22
26 files changed, 91 insertions, 475 deletions
diff --git a/tests/auto/corelib/io/io.pro b/tests/auto/corelib/io/io.pro
index 29717b3a1c..24c762ed84 100644
--- a/tests/auto/corelib/io/io.pro
+++ b/tests/auto/corelib/io/io.pro
@@ -35,7 +35,7 @@ SUBDIRS=\
qurlquery \
qwinoverlappedionotifier \
-!win32|wince* {
+!win32 {
SUBDIRS -=\
qwinoverlappedionotifier
}
diff --git a/tests/auto/corelib/io/largefile/largefile.pro b/tests/auto/corelib/io/largefile/largefile.pro
index caef116684..6c1bb8d7ea 100644
--- a/tests/auto/corelib/io/largefile/largefile.pro
+++ b/tests/auto/corelib/io/largefile/largefile.pro
@@ -2,5 +2,3 @@ CONFIG += testcase
TARGET = tst_largefile
QT = core testlib
SOURCES = tst_largefile.cpp
-
-wince: SOURCES += $$QT_SOURCE_TREE/src/corelib/kernel/qfunctions_wince.cpp
diff --git a/tests/auto/corelib/io/largefile/tst_largefile.cpp b/tests/auto/corelib/io/largefile/tst_largefile.cpp
index e448093062..a19a5ce58d 100644
--- a/tests/auto/corelib/io/largefile/tst_largefile.cpp
+++ b/tests/auto/corelib/io/largefile/tst_largefile.cpp
@@ -39,18 +39,12 @@
#include <cstdio>
#ifdef Q_OS_WIN
-
-#include <windows.h>
-
-#ifndef Q_OS_WINCE
-#include <io.h>
-#endif
-
-#ifndef FSCTL_SET_SPARSE
+# include <qt_windows.h>
+# include <io.h>
+# ifndef FSCTL_SET_SPARSE
// MinGW doesn't define this.
-#define FSCTL_SET_SPARSE (0x900C4)
-#endif
-
+# define FSCTL_SET_SPARSE (0x900C4)
+# endif
#endif // Q_OS_WIN
class tst_LargeFile
diff --git a/tests/auto/corelib/io/qdatastream/tst_qdatastream.cpp b/tests/auto/corelib/io/qdatastream/tst_qdatastream.cpp
index f5a546ebf1..8fb367482c 100644
--- a/tests/auto/corelib/io/qdatastream/tst_qdatastream.cpp
+++ b/tests/auto/corelib/io/qdatastream/tst_qdatastream.cpp
@@ -88,10 +88,8 @@ private slots:
void stream_QPen_data();
void stream_QPen();
-#ifndef Q_OS_WINCE
void stream_QPixmap_data();
void stream_QPixmap();
-#endif
void stream_QPoint_data();
void stream_QPoint();
@@ -123,10 +121,8 @@ private slots:
void stream_qint64_data();
void stream_qint64();
-#ifndef Q_OS_WINCE
void stream_QIcon_data();
void stream_QIcon();
-#endif
void stream_QEasingCurve_data();
void stream_QEasingCurve();
@@ -1542,24 +1538,16 @@ void tst_QDataStream::readQPen(QDataStream *s)
// pixmap testing is currently limited to one pixmap only.
//
-#ifndef Q_OS_WINCE
-// Test depends on more memory than available on Qt/CE
void tst_QDataStream::stream_QPixmap_data()
{
stream_data(1);
}
-#endif
-#ifndef Q_OS_WINCE
-// Test depends on more memory than available on Qt/CE
void tst_QDataStream::stream_QPixmap()
{
STREAM_IMPL(QPixmap);
}
-#endif
-#ifndef Q_OS_WINCE
-// Test depends on more memory than available on Qt/CE
void tst_QDataStream::stream_QIcon_data()
{
stream_data(1);
@@ -1569,7 +1557,6 @@ void tst_QDataStream::stream_QIcon()
{
STREAM_IMPL(QIcon);
}
-#endif
void tst_QDataStream::writeQPixmap(QDataStream *s)
{
@@ -1844,7 +1831,7 @@ static QRegion qRegionData(int index)
case 4: return QRegion(100, -100, 2048, 4096, QRegion::Rectangle);
case 5: return QRegion(-100, 100, 4096, 2048, QRegion::Rectangle);
case 6: return QRegion(0, 0, 0, 0, QRegion::Ellipse);
-#if (!defined(Q_OS_UNIX) && !defined(Q_OS_WINCE)) // all our Unix platforms use X regions.
+#if !defined(Q_OS_UNIX) // all our Unix platforms use X regions.
case 7: return QRegion(1, 2, 300, 400, QRegion::Ellipse);
case 8: return QRegion(100, 100, 1024, 768, QRegion::Ellipse);
case 9: return QRegion(-100, -100, 1024, 1024, QRegion::Ellipse);
@@ -2496,12 +2483,10 @@ void tst_QDataStream::status_charptr_QByteArray_data()
QTest::addColumn<int>("expectedStatus");
QTest::addColumn<QByteArray>("expectedString");
-#if !defined(Q_OS_WINCE)
QByteArray oneMbMinus1(1024 * 1024 - 1, '\0');
for (int i = 0; i < oneMbMinus1.size(); ++i)
oneMbMinus1[i] = 0x1 | (8 * ((uchar)i / 9));
QByteArray threeMbMinus1 = oneMbMinus1 + 'j' + oneMbMinus1 + 'k' + oneMbMinus1;
-#endif
// ok
QTest::newRow("size 0") << QByteArray("\x00\x00\x00\x00", 4) << (int) QDataStream::Ok << QByteArray();
@@ -2510,14 +2495,12 @@ void tst_QDataStream::status_charptr_QByteArray_data()
QTest::newRow("size 3") << QByteArray("\x00\x00\x00\x03jkl", 7) << (int) QDataStream::Ok << QByteArray("jkl");
QTest::newRow("size 4") << QByteArray("\x00\x00\x00\x04jklm", 8) << (int) QDataStream::Ok << QByteArray("jklm");
QTest::newRow("size 4j") << QByteArray("\x00\x00\x00\x04jklmj", 8) << (int) QDataStream::Ok << QByteArray("jklm");
-#if !defined(Q_OS_WINCE)
QTest::newRow("size 1MB-1") << QByteArray("\x00\x0f\xff\xff", 4) + oneMbMinus1 + QByteArray("j") << (int) QDataStream::Ok << oneMbMinus1;
QTest::newRow("size 1MB") << QByteArray("\x00\x10\x00\x00", 4) + oneMbMinus1 + QByteArray("jkl") << (int) QDataStream::Ok << oneMbMinus1 + "j";
QTest::newRow("size 1MB+1") << QByteArray("\x00\x10\x00\x01", 4) + oneMbMinus1 + QByteArray("jkl") << (int) QDataStream::Ok << oneMbMinus1 + "jk";
QTest::newRow("size 3MB-1") << QByteArray("\x00\x2f\xff\xff", 4) + threeMbMinus1 + QByteArray("j") << (int) QDataStream::Ok << threeMbMinus1;
QTest::newRow("size 3MB") << QByteArray("\x00\x30\x00\x00", 4) + threeMbMinus1 + QByteArray("jkl") << (int) QDataStream::Ok << threeMbMinus1 + "j";
QTest::newRow("size 3MB+1") << QByteArray("\x00\x30\x00\x01", 4) + threeMbMinus1 + QByteArray("jkl") << (int) QDataStream::Ok << threeMbMinus1 + "jk";
-#endif
// past end
QTest::newRow("empty") << QByteArray() << (int) QDataStream::ReadPastEnd << QByteArray();
@@ -2530,12 +2513,10 @@ void tst_QDataStream::status_charptr_QByteArray_data()
QTest::newRow("badsize 2") << QByteArray("\x00\x00\x00\x02j", 5) << (int) QDataStream::ReadPastEnd << QByteArray();
QTest::newRow("badsize 3") << QByteArray("\x00\x00\x00\x03jk", 6) << (int) QDataStream::ReadPastEnd << QByteArray();
QTest::newRow("badsize 4") << QByteArray("\x00\x00\x00\x04jkl", 7) << (int) QDataStream::ReadPastEnd << QByteArray();
-#if !defined(Q_OS_WINCE)
QTest::newRow("badsize 1MB") << QByteArray("\x00\x10\x00\x00", 4) + oneMbMinus1 << (int) QDataStream::ReadPastEnd << QByteArray();
QTest::newRow("badsize 1MB+1") << QByteArray("\x00\x10\x00\x01", 4) + oneMbMinus1 + QByteArray("j") << (int) QDataStream::ReadPastEnd << QByteArray();
QTest::newRow("badsize 3MB") << QByteArray("\x00\x30\x00\x00", 4) + threeMbMinus1 << (int) QDataStream::ReadPastEnd << QByteArray();
QTest::newRow("badsize 3MB+1") << QByteArray("\x00\x30\x00\x01", 4) + threeMbMinus1 + QByteArray("j") << (int) QDataStream::ReadPastEnd << QByteArray();
-#endif
QTest::newRow("size -1") << QByteArray("\xff\xff\xff\xff", 4) << (int) QDataStream::ReadPastEnd << QByteArray();
QTest::newRow("size -2") << QByteArray("\xff\xff\xff\xfe", 4) << (int) QDataStream::ReadPastEnd << QByteArray();
}
@@ -2600,7 +2581,6 @@ void tst_QDataStream::status_QString_data()
QTest::addColumn<int>("expectedStatus");
QTest::addColumn<QString>("expectedString");
-#if !defined(Q_OS_WINCE)
QString oneMbMinus1;
oneMbMinus1.resize(1024 * 1024 - 1);
for (int i = 0; i < oneMbMinus1.size(); ++i)
@@ -2609,7 +2589,6 @@ void tst_QDataStream::status_QString_data()
QByteArray threeMbMinus1Data = qstring2qbytearray(threeMbMinus1);
QByteArray oneMbMinus1Data = qstring2qbytearray(oneMbMinus1);
-#endif
// ok
QTest::newRow("size 0") << QByteArray("\x00\x00\x00\x00", 4) << (int) QDataStream::Ok << QString();
@@ -2618,14 +2597,12 @@ void tst_QDataStream::status_QString_data()
QTest::newRow("size 3") << QByteArray("\x00\x00\x00\x06\x00j\x00k\x00l", 10) << (int) QDataStream::Ok << QString("jkl");
QTest::newRow("size 4") << QByteArray("\x00\x00\x00\x08\x00j\x00k\x00l\x00m", 12) << (int) QDataStream::Ok << QString("jklm");
QTest::newRow("size 4j") << QByteArray("\x00\x00\x00\x08\x00j\x00k\x00l\x00mjj", 14) << (int) QDataStream::Ok << QString("jklm");
-#if !defined(Q_OS_WINCE)
QTest::newRow("size 1MB-1") << QByteArray("\x00\x1f\xff\xfe", 4) + oneMbMinus1Data + QByteArray("jj") << (int) QDataStream::Ok << oneMbMinus1;
QTest::newRow("size 1MB") << QByteArray("\x00\x20\x00\x00", 4) + oneMbMinus1Data + QByteArray("\x00j\x00k\x00l", 6) << (int) QDataStream::Ok << oneMbMinus1 + "j";
QTest::newRow("size 1MB+1") << QByteArray("\x00\x20\x00\x02", 4) + oneMbMinus1Data + QByteArray("\x00j\x00k\x00l", 6) << (int) QDataStream::Ok << oneMbMinus1 + "jk";
QTest::newRow("size 3MB-1") << QByteArray("\x00\x5f\xff\xfe", 4) + threeMbMinus1Data + QByteArray("jj") << (int) QDataStream::Ok << threeMbMinus1;
QTest::newRow("size 3MB") << QByteArray("\x00\x60\x00\x00", 4) + threeMbMinus1Data + QByteArray("\x00j\x00k\x00l", 6) << (int) QDataStream::Ok << threeMbMinus1 + "j";
QTest::newRow("size 3MB+1") << QByteArray("\x00\x60\x00\x02", 4) + threeMbMinus1Data + QByteArray("\x00j\x00k\x00l", 6) << (int) QDataStream::Ok << threeMbMinus1 + "jk";
-#endif
// past end
QTest::newRow("empty") << QByteArray() << (int) QDataStream::ReadPastEnd << QString();
@@ -2638,14 +2615,12 @@ void tst_QDataStream::status_QString_data()
QTest::newRow("badsize 2") << QByteArray("\x00\x00\x00\x04jj", 6) << (int) QDataStream::ReadPastEnd << QString();
QTest::newRow("badsize 3") << QByteArray("\x00\x00\x00\x06jjkk", 8) << (int) QDataStream::ReadPastEnd << QString();
QTest::newRow("badsize 4") << QByteArray("\x00\x00\x00\x08jjkkll", 10) << (int) QDataStream::ReadPastEnd << QString();
-#if !defined(Q_OS_WINCE)
QTest::newRow("badsize 1MB") << QByteArray("\x00\x20\x00\x00", 4) + oneMbMinus1Data << (int) QDataStream::ReadPastEnd << QString();
QTest::newRow("badsize 1MB+1") << QByteArray("\x00\x20\x00\x02", 4) + oneMbMinus1Data + QByteArray("j") << (int) QDataStream::ReadPastEnd << QString();
QTest::newRow("badsize 3MB") << QByteArray("\x00\x60\x00\x00", 4) + threeMbMinus1Data << (int) QDataStream::ReadPastEnd << QString();
QTest::newRow("badsize 3MB+1") << QByteArray("\x00\x60\x00\x02", 4) + threeMbMinus1Data + QByteArray("j") << (int) QDataStream::ReadPastEnd << QString();
QTest::newRow("size -2") << QByteArray("\xff\xff\xff\xfe", 4) << (int) QDataStream::ReadPastEnd << QString();
QTest::newRow("size MAX") << QByteArray("\x7f\xff\xff\xfe", 4) << (int) QDataStream::ReadPastEnd << QString();
-#endif
// corrupt data
QTest::newRow("corrupt1") << QByteArray("yyyy") << (int) QDataStream::ReadCorruptData << QString();
diff --git a/tests/auto/corelib/io/qdir/tst_qdir.cpp b/tests/auto/corelib/io/qdir/tst_qdir.cpp
index 5046f5abf4..5780f2508c 100644
--- a/tests/auto/corelib/io/qdir/tst_qdir.cpp
+++ b/tests/auto/corelib/io/qdir/tst_qdir.cpp
@@ -35,7 +35,7 @@
#include <qregexp.h>
#include <qstringlist.h>
-#if (defined(Q_OS_WIN) && !defined(Q_OS_WINCE))
+#if defined(Q_OS_WIN)
#include <QtCore/private/qfsfileengine_p.h>
#include "../../../network-settings.h"
#endif
@@ -163,9 +163,8 @@ private slots:
void operator_eq();
-#ifndef Q_OS_WINCE
void dotAndDotDot();
-#endif
+
void homePath();
void tempPath();
void rootPath();
@@ -316,7 +315,7 @@ void tst_QDir::setPath_data()
QTest::addColumn<QString>("dir2");
QTest::newRow("data0") << QString(".") << QString("..");
-#if (defined(Q_OS_WIN) && !defined(Q_OS_WINCE))
+#if defined(Q_OS_WIN)
QTest::newRow("data1") << QString("c:/") << QDir::currentPath();
#endif
}
@@ -543,7 +542,7 @@ void tst_QDir::exists_data()
QTest::newRow("simple dir") << (m_dataPath + "/resources") << true;
QTest::newRow("simple dir with slash") << (m_dataPath + "/resources/") << true;
-#if (defined(Q_OS_WIN) && !defined(Q_OS_WINCE)) && !defined(Q_OS_WINRT)
+#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
const QString uncRoot = QStringLiteral("//") + QtNetworkSettings::winServerName();
QTest::newRow("unc 1") << uncRoot << true;
QTest::newRow("unc 2") << uncRoot + QLatin1Char('/') << true;
@@ -555,7 +554,7 @@ void tst_QDir::exists_data()
QTest::newRow("unc 8") << uncRoot + "/asharethatshouldnotexist" << false;
QTest::newRow("unc 9") << "//ahostthatshouldnotexist" << false;
#endif
-#if (defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT))
+#if (defined(Q_OS_WIN) && !defined(Q_OS_WINRT))
QTest::newRow("This drive should exist") << "C:/" << true;
// find a non-existing drive and check if it does not exist
#ifdef QT_BUILD_INTERNAL
@@ -596,7 +595,7 @@ void tst_QDir::isRelativePath_data()
QTest::addColumn<bool>("relative");
QTest::newRow("data0") << "../somedir" << true;
-#if (defined(Q_OS_WIN) && !defined(Q_OS_WINCE))
+#if defined(Q_OS_WIN)
QTest::newRow("data1") << "C:/sOmedir" << false;
#endif
QTest::newRow("data2") << "somedir" << true;
@@ -802,12 +801,6 @@ void tst_QDir::entryList()
QFile::remove(entrylistPath + "brokenlink.lnk");
QFile::remove(entrylistPath + "brokenlink");
- // WinCE does not have . and .. in the directory listing
-#if defined(Q_OS_WINCE)
- expected.removeAll(".");
- expected.removeAll("..");
-#endif
-
#ifndef Q_NO_SYMLINKS
#if defined(Q_OS_WIN)
// ### Sadly, this is a platform difference right now.
@@ -900,15 +893,10 @@ void tst_QDir::entryListSimple_data()
QTest::addColumn<int>("countMin");
QTest::newRow("data2") << "do_not_expect_this_path_to_exist/" << 0;
-#if defined(Q_OS_WINCE)
- QTest::newRow("simple dir") << (m_dataPath + "/resources") << 0;
- QTest::newRow("simple dir with slash") << (m_dataPath + "/resources/") << 0;
-#else
QTest::newRow("simple dir") << (m_dataPath + "/resources") << 2;
QTest::newRow("simple dir with slash") << (m_dataPath + "/resources/") << 2;
-#endif
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT)
+#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
const QString uncRoot = QStringLiteral("//") + QtNetworkSettings::winServerName();
QTest::newRow("unc 1") << uncRoot << 2;
QTest::newRow("unc 2") << uncRoot + QLatin1Char('/') << 2;
@@ -1170,7 +1158,6 @@ tst_QDir::cleanPath_data()
QTest::newRow("data2") << "/" << "/";
QTest::newRow("data3") << QDir::cleanPath("../.") << "..";
QTest::newRow("data4") << QDir::cleanPath("../..") << "../..";
-#if !defined(Q_OS_WINCE)
#if defined(Q_OS_WIN)
QTest::newRow("data5") << "d:\\a\\bc\\def\\.." << "d:/a/bc";
QTest::newRow("data6") << "d:\\a\\bc\\def\\../../.." << "d:/";
@@ -1178,17 +1165,14 @@ tst_QDir::cleanPath_data()
QTest::newRow("data5") << "d:\\a\\bc\\def\\.." << "d:\\a\\bc\\def\\..";
QTest::newRow("data6") << "d:\\a\\bc\\def\\../../.." << "..";
#endif
-#endif
QTest::newRow("data7") << ".//file1.txt" << "file1.txt";
QTest::newRow("data8") << "/foo/bar/..//file1.txt" << "/foo/file1.txt";
QTest::newRow("data9") << "//" << "/";
-#if !defined(Q_OS_WINCE)
#if defined Q_OS_WIN
QTest::newRow("data10") << "c:\\" << "c:/";
#else
QTest::newRow("data10") << "/:/" << "/:";
#endif
-#endif
#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
QTest::newRow("data11") << "//foo//bar" << "//foo/bar";
#endif
@@ -1350,7 +1334,7 @@ void tst_QDir::absolutePath_data()
QTest::addColumn<QString>("expectedPath");
QTest::newRow("0") << "/machine/share/dir1" << "/machine/share/dir1";
-#if (defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT))
+#if (defined(Q_OS_WIN) && !defined(Q_OS_WINRT))
QTest::newRow("1") << "\\machine\\share\\dir1" << "/machine/share/dir1";
QTest::newRow("2") << "//machine/share/dir1" << "//machine/share/dir1";
QTest::newRow("3") << "\\\\machine\\share\\dir1" << "//machine/share/dir1";
@@ -1399,7 +1383,7 @@ void tst_QDir::relativeFilePath_data()
QTest::newRow("same path 1") << "/tmp" << "/tmp" << ".";
QTest::newRow("same path 2") << "//tmp" << "/tmp/" << ".";
-#if (defined(Q_OS_WIN) && !defined(Q_OS_WINCE))
+#if defined(Q_OS_WIN)
QTest::newRow("12") << "C:/foo/bar" << "ding" << "ding";
QTest::newRow("13") << "C:/foo/bar" << "C:/ding/dong" << "../../ding/dong";
QTest::newRow("14") << "C:/foo/bar" << "/ding/dong" << "../../ding/dong";
@@ -1575,7 +1559,6 @@ void tst_QDir::operator_eq()
dir1.setPath("..");
}
-#ifndef Q_OS_WINCE
// WinCE does not have . nor ..
void tst_QDir::dotAndDotDot()
{
@@ -1585,7 +1568,6 @@ void tst_QDir::dotAndDotDot()
entryList = dir.entryList(QDir::Dirs | QDir::NoDotAndDotDot);
QCOMPARE(entryList, QStringList() << QString("dir") << QString("spaces"));
}
-#endif
void tst_QDir::homePath()
{
@@ -1829,16 +1811,9 @@ void tst_QDir::updateFileLists()
QDir dir(fs.absoluteFilePath(dirName));
-#if defined(Q_OS_WINCE)
- //no . and .. on these OS.
- QCOMPARE(dir.count(), uint(4));
- QCOMPARE(dir.entryList().size(), 4);
- QCOMPARE(dir.entryInfoList().size(), 4);
-#else
QCOMPARE(dir.count(), uint(6));
QCOMPARE(dir.entryList().size(), 6);
QCOMPARE(dir.entryInfoList().size(), 6);
-#endif
dir.setFilter(QDir::AllEntries | QDir::NoDotAndDotDot);
diff --git a/tests/auto/corelib/io/qdiriterator/qdiriterator.pro b/tests/auto/corelib/io/qdiriterator/qdiriterator.pro
index 2d8dfba996..b5ac614ad1 100644
--- a/tests/auto/corelib/io/qdiriterator/qdiriterator.pro
+++ b/tests/auto/corelib/io/qdiriterator/qdiriterator.pro
@@ -7,6 +7,4 @@ RESOURCES += qdiriterator.qrc
TESTDATA += entrylist
contains(CONFIG, builtin_testdata): DEFINES += BUILTIN_TESTDATA
-wince*mips*|wincewm50smart-msvc200*: DEFINES += WINCE_BROKEN_ITERATE=1
-
win32: CONFIG += insignificant_test # Crashes on Windows in release builds
diff --git a/tests/auto/corelib/io/qdiriterator/tst_qdiriterator.cpp b/tests/auto/corelib/io/qdiriterator/tst_qdiriterator.cpp
index 9727ccb407..9bba9615ef 100644
--- a/tests/auto/corelib/io/qdiriterator/tst_qdiriterator.cpp
+++ b/tests/auto/corelib/io/qdiriterator/tst_qdiriterator.cpp
@@ -41,7 +41,7 @@
#define Q_NO_SYMLINKS
#endif
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
+#if defined(Q_OS_WIN)
# include "../../../network-settings.h"
#endif
@@ -103,7 +103,7 @@ private slots:
void longPath();
void dirorder();
void relativePaths();
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
+#if defined(Q_OS_WIN)
void uncPaths_data();
void uncPaths();
#endif
@@ -196,7 +196,7 @@ void tst_QDirIterator::initTestCase()
# endif
#endif
-#if !defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
+#if !defined(Q_OS_WIN)
createDirectory("hiddenDirs_hiddenFiles");
createFile("hiddenDirs_hiddenFiles/normalFile");
createFile("hiddenDirs_hiddenFiles/.hiddenFile");
@@ -239,10 +239,8 @@ void tst_QDirIterator::iterateRelativeDirectory_data()
<< QString("entrylist") << QDirIterator::IteratorFlags(0)
<< QDir::Filters(QDir::NoFilter) << QStringList("*")
<< QString(
-#if !defined(Q_OS_WINCE)
"entrylist/.,"
"entrylist/..,"
-#endif
"entrylist/file,"
#ifndef Q_NO_SYMLINKS
"entrylist/linktofile.lnk,"
@@ -257,9 +255,7 @@ void tst_QDirIterator::iterateRelativeDirectory_data()
<< QString("entrylist") << QDirIterator::IteratorFlags(0)
<< QDir::Filters(QDir::AllEntries | QDir::NoDot) << QStringList("*")
<< QString(
-#if !defined(Q_OS_WINCE)
"entrylist/..,"
-#endif
"entrylist/file,"
#ifndef Q_NO_SYMLINKS
"entrylist/linktofile.lnk,"
@@ -274,9 +270,7 @@ void tst_QDirIterator::iterateRelativeDirectory_data()
<< QString("entrylist") << QDirIterator::IteratorFlags(0)
<< QDir::Filters(QDir::AllEntries | QDir::NoDotDot) << QStringList("*")
<< QString(
-#if !defined(Q_OS_WINCE)
"entrylist/.,"
-#endif
"entrylist/file,"
#ifndef Q_NO_SYMLINKS
"entrylist/linktofile.lnk,"
@@ -305,12 +299,10 @@ void tst_QDirIterator::iterateRelativeDirectory_data()
<< QString("entrylist") << QDirIterator::IteratorFlags(QDirIterator::Subdirectories | QDirIterator::FollowSymlinks)
<< QDir::Filters(QDir::NoFilter) << QStringList("*")
<< QString(
-#if !defined(Q_OS_WINCE)
"entrylist/.,"
"entrylist/..,"
"entrylist/directory/.,"
"entrylist/directory/..,"
-#endif
"entrylist/file,"
#ifndef Q_NO_SYMLINKS
"entrylist/linktofile.lnk,"
@@ -345,11 +337,7 @@ void tst_QDirIterator::iterateRelativeDirectory_data()
QTest::newRow("empty, default")
<< QString("empty") << QDirIterator::IteratorFlags(0)
<< QDir::Filters(QDir::NoFilter) << QStringList("*")
-#if defined(Q_OS_WINCE)
- << QStringList();
-#else
<< QString("empty/.,empty/..").split(',');
-#endif
QTest::newRow("empty, QDir::NoDotAndDotDot")
<< QString("empty") << QDirIterator::IteratorFlags(0)
@@ -562,13 +550,6 @@ void tst_QDirIterator::longPath()
while (dir.exists(dirName) || dir.mkdir(dirName)) {
++n;
dirName.append('x');
-#if defined(Q_OS_WINCE) && defined(WINCE_BROKEN_ITERATE)
- // Some Windows CE devices/emulators are broken.
- // though one can create directories of length <= 217,
- // FindNextFile only reports entries until ~ 214.
- if (n >= 210)
- break;
-#endif
}
QDirIterator it(dir.absolutePath(), QDir::NoDotAndDotDot|QDir::Dirs, QDirIterator::Subdirectories);
@@ -606,7 +587,7 @@ void tst_QDirIterator::relativePaths()
}
}
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
+#if defined(Q_OS_WIN)
void tst_QDirIterator::uncPaths_data()
{
QTest::addColumn<QString>("dirName");
diff --git a/tests/auto/corelib/io/qfile/qfile.pro b/tests/auto/corelib/io/qfile/qfile.pro
index 10c8d918f7..0735daedb3 100644
--- a/tests/auto/corelib/io/qfile/qfile.pro
+++ b/tests/auto/corelib/io/qfile/qfile.pro
@@ -1,7 +1,2 @@
TEMPLATE = subdirs
-wince* {
- SUBDIRS = test
-} else {
- SUBDIRS = test stdinprocess
-}
-
+SUBDIRS = test stdinprocess
diff --git a/tests/auto/corelib/io/qfile/test/test.pro b/tests/auto/corelib/io/qfile/test/test.pro
index c9ba96cc1b..c0c4b9d5d2 100644
--- a/tests/auto/corelib/io/qfile/test/test.pro
+++ b/tests/auto/corelib/io/qfile/test/test.pro
@@ -6,7 +6,6 @@ else: DEFINES += QT_NO_NETWORK
TARGET = ../tst_qfile
SOURCES = ../tst_qfile.cpp
-wince: SOURCES += $$QT_SOURCE_TREE/src/corelib/kernel/qfunctions_wince.cpp
RESOURCES += ../qfile.qrc ../rename-fallback.qrc ../copy-fallback.qrc
diff --git a/tests/auto/corelib/io/qfile/tst_qfile.cpp b/tests/auto/corelib/io/qfile/tst_qfile.cpp
index 0d912d7b3c..dd449a37d4 100644
--- a/tests/auto/corelib/io/qfile/tst_qfile.cpp
+++ b/tests/auto/corelib/io/qfile/tst_qfile.cpp
@@ -47,7 +47,7 @@ extern Q_CORE_EXPORT int qt_ntfs_permission_lookup;
QT_END_NAMESPACE
#endif
-#if !defined(Q_OS_WINCE) && !defined(QT_NO_NETWORK)
+#if !defined(QT_NO_NETWORK)
#include <QHostInfo>
#endif
#include <QProcess>
@@ -66,8 +66,6 @@ QT_END_NAMESPACE
# include <sys/mount.h>
#elif defined(Q_OS_IRIX)
# include <sys/statfs.h>
-#elif defined(Q_OS_WINCE)
-# include <qplatformdefs.h>
#elif defined(Q_OS_VXWORKS)
# include <fcntl.h>
#if defined(_WRS_KERNEL)
@@ -85,7 +83,7 @@ QT_END_NAMESPACE
#include <stdio.h>
#include <errno.h>
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
+#if defined(Q_OS_WIN)
#include "../../../network-settings.h"
#endif
@@ -135,11 +133,9 @@ private slots:
void readAll_data();
void readAll();
void readAllBuffer();
-#if !defined(Q_OS_WINCE)
void readAllStdin();
void readLineStdin();
void readLineStdin_lineByLine();
-#endif
void text();
void missingEndOfLine();
void readBlock();
@@ -169,7 +165,7 @@ private slots:
void writeTextFile_data();
void writeTextFile();
/* void largeFileSupport(); */
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT)
+#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
void largeUncFileSupport();
#endif
void flush();
@@ -225,10 +221,8 @@ private slots:
void mapWrittenFile_data();
void mapWrittenFile();
-#ifndef Q_OS_WINCE
void openStandardStreamsFileDescriptors();
void openStandardStreamsBufferedStreams();
-#endif
void resize_data();
void resize();
@@ -491,7 +485,7 @@ void tst_QFile::exists()
file.remove();
QVERIFY(!file.exists());
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT)
+#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
const QString uncPath = "//" + QtNetworkSettings::winServerName() + "/testshare/readme.txt";
QFile unc(uncPath);
QVERIFY2(unc.exists(), msgFileDoesNotExist(uncPath).constData());
@@ -539,7 +533,7 @@ void tst_QFile::open_data()
<< false << QFile::OpenError;
QTest::newRow("noreadfile") << QString::fromLatin1(noReadFile) << int(QIODevice::ReadOnly)
<< false << QFile::OpenError;
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT)
+#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
//opening devices requires administrative privileges (and elevation).
HANDLE hTest = CreateFile(_T("\\\\.\\PhysicalDrive0"), GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, NULL);
if (hTest != INVALID_HANDLE_VALUE) {
@@ -570,7 +564,7 @@ void tst_QFile::open()
QSKIP("Running this test as root doesn't make sense");
#endif
-#if defined(Q_OS_WIN32) || defined(Q_OS_WINCE)
+#if defined(Q_OS_WIN32)
QEXPECT_FAIL("noreadfile", "Windows does not currently support non-readable files.", Abort);
#endif
if (filename.isEmpty())
@@ -622,7 +616,7 @@ void tst_QFile::size_data()
QTest::addColumn<qint64>("size");
QTest::newRow( "exist01" ) << m_testFile << (qint64)245;
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT)
+#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
// Only test UNC on Windows./
QTest::newRow("unc") << "//" + QString(QtNetworkSettings::winServerName() + "/testshare/test.pri") << (qint64)34;
#endif
@@ -633,10 +627,6 @@ void tst_QFile::size()
QFETCH( QString, filename );
QFETCH( qint64, size );
-#ifdef Q_OS_WINCE
- filename = QFileInfo(filename).absoluteFilePath();
-#endif
-
{
QFile f( filename );
QCOMPARE( f.size(), size );
@@ -656,9 +646,6 @@ void tst_QFile::size()
fclose(stream);
}
- // Currently low level file I/O is not well supported on Windows CE, so
- // skip this part of the test.
-#ifndef Q_OS_WINCE
{
QFile f;
@@ -671,7 +658,6 @@ void tst_QFile::size()
f.close();
QT_CLOSE(fd);
}
-#endif
}
void tst_QFile::sizeNoExist()
@@ -916,7 +902,6 @@ private:
};
#endif // !QT_NO_PROCESS
-#if !defined(Q_OS_WINCE)
void tst_QFile::readAllStdin()
{
#ifdef QT_NO_PROCESS
@@ -1007,7 +992,6 @@ void tst_QFile::readLineStdin_lineByLine()
}
#endif
}
-#endif
void tst_QFile::text()
{
@@ -1108,7 +1092,7 @@ void tst_QFile::ungetChar()
QCOMPARE(buf[2], '4');
}
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT)
+#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
QString driveLetters()
{
wchar_t volumeName[MAX_PATH];
@@ -1145,7 +1129,7 @@ void tst_QFile::invalidFile_data()
#if !defined(Q_OS_WIN)
QTest::newRow( "x11" ) << QString( "qwe//" );
#else
-#if !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT)
+#if !defined(Q_OS_WINRT)
QTest::newRow( "colon2" ) << invalidDriveLetter() + QString::fromLatin1(":ail:invalid");
#endif
QTest::newRow( "colon3" ) << QString( ":failinvalid" );
@@ -1207,13 +1191,11 @@ void tst_QFile::permissions_data()
QTest::newRow("data0") << QCoreApplication::instance()->applicationFilePath() << uint(QFile::ExeUser) << true << false;
QTest::newRow("data1") << m_testSourceFile << uint(QFile::ReadUser) << true << false;
QTest::newRow("readonly") << QString::fromLatin1("readonlyfile") << uint(QFile::WriteUser) << false << false;
-#ifndef Q_OS_WINCE
QTest::newRow("longfile") << QString::fromLatin1("longFileNamelongFileNamelongFileNamelongFileName"
"longFileNamelongFileNamelongFileNamelongFileName"
"longFileNamelongFileNamelongFileNamelongFileName"
"longFileNamelongFileNamelongFileNamelongFileName"
"longFileNamelongFileNamelongFileNamelongFileName.txt") << uint(QFile::ReadUser) << true << true;
-#endif
QTest::newRow("resource1") << ":/tst_qfileinfo/resources/file1.ext1" << uint(QFile::ReadUser) << true << false;
QTest::newRow("resource2") << ":/tst_qfileinfo/resources/file1.ext1" << uint(QFile::WriteUser) << false << false;
QTest::newRow("resource3") << ":/tst_qfileinfo/resources/file1.ext1" << uint(QFile::ExeUser) << false << false;
@@ -1365,15 +1347,9 @@ void tst_QFile::copyFallback()
QVERIFY(QFile::exists("file-copy-destination.txt"));
QVERIFY(!file.isOpen());
-#ifdef Q_OS_WINCE
- // Need to reset permissions on Windows to be able to delete
- QVERIFY(QFile::setPermissions("file-copy-destination.txt",
- QFile::WriteOther));
-#else
// Need to reset permissions on Windows to be able to delete
QVERIFY(QFile::setPermissions("file-copy-destination.txt",
QFile::ReadOwner | QFile::WriteOwner));
-#endif
QVERIFY(QFile::remove("file-copy-destination.txt"));
// Fallback copy of open file.
@@ -1394,7 +1370,7 @@ void tst_QFile::copyFallback()
#endif
#endif
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT)
+#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
static QString getWorkingDirectoryForLink(const QString &linkFileName)
{
bool neededCoInit = false;
@@ -1453,7 +1429,7 @@ void tst_QFile::link()
QCOMPARE(QFile::symLinkTarget("myLink.lnk"), referenceTarget);
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT)
+#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
QString wd = getWorkingDirectoryForLink(info2.absoluteFilePath());
QCOMPARE(QDir::fromNativeSeparators(wd), QDir::cleanPath(info1.absolutePath()));
#endif
@@ -1591,7 +1567,7 @@ void tst_QFile::writeTextFile()
QCOMPARE(file.readAll(), out);
}
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT)
+#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
void tst_QFile::largeUncFileSupport()
{
qint64 size = Q_INT64_C(8589934592);
@@ -1670,11 +1646,7 @@ void tst_QFile::bufferedRead()
file.write("abcdef");
file.close();
-#if defined(Q_OS_WINCE)
- FILE *stdFile = fopen((QCoreApplication::applicationDirPath() + "/stdfile.txt").toLatin1() , "r");
-#else
FILE *stdFile = fopen("stdfile.txt", "r");
-#endif
QVERIFY(stdFile);
char c;
QCOMPARE(int(fread(&c, 1, 1, stdFile)), 1);
@@ -1819,11 +1791,7 @@ void tst_QFile::FILEReadWrite()
f.close();
}
-#ifdef Q_OS_WINCE
- FILE *fp = fopen(qPrintable(QCoreApplication::applicationDirPath() + "\\FILEReadWrite.txt"), "r+b");
-#else
FILE *fp = fopen("FILEReadWrite.txt", "r+b");
-#endif
QVERIFY(fp);
QFile file;
QVERIFY2(file.open(fp, QFile::ReadWrite), msgOpenFailed(file).constData());
@@ -2028,10 +1996,6 @@ void tst_QFile::longFileName()
}
{
QFile file(fileName);
-#if defined(Q_OS_WINCE)
- QEXPECT_FAIL("244 chars", "Full pathname must be less than 260 chars", Abort);
- QEXPECT_FAIL("244 chars to absolutepath", "Full pathname must be less than 260 chars", Abort);
-#endif
QVERIFY2(file.open(QFile::WriteOnly | QFile::Text), msgOpenFailed(file).constData());
QTextStream ts(&file);
ts << fileName << endl;
@@ -2299,7 +2263,7 @@ void tst_QFile::writeLargeDataBlock_data()
QTest::newRow("localfile-Fd") << "./largeblockfile.txt" << (int)OpenFd;
QTest::newRow("localfile-Stream") << "./largeblockfile.txt" << (int)OpenStream;
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT) && !defined(QT_NO_NETWORK)
+#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) && !defined(QT_NO_NETWORK)
// Some semi-randomness to avoid collisions.
QTest::newRow("unc file")
<< QString("//" + QtNetworkSettings::winServerName() + "/TESTSHAREWRITABLE/largefile-%1-%2.txt")
@@ -2314,8 +2278,8 @@ static QByteArray getLargeDataBlock()
if (array.isNull())
{
-#if defined(Q_OS_WINCE) || defined(Q_OS_VXWORKS)
- int resizeSize = 1024 * 1024; // WinCE does not have much space
+#if defined(Q_OS_VXWORKS)
+ int resizeSize = 1024 * 1024; // VxWorks does not have much space
#else
int resizeSize = 64 * 1024 * 1024;
#endif
@@ -2443,9 +2407,7 @@ void tst_QFile::virtualFile()
void tst_QFile::textFile()
{
-#if defined(Q_OS_WINCE)
- FILE *fs = ::fopen((QCoreApplication::applicationDirPath() + "/writeabletextfile").toLatin1() , "wt");
-#elif defined(Q_OS_WIN)
+#if defined(Q_OS_WIN)
FILE *fs = ::fopen("writeabletextfile", "wt");
#else
FILE *fs = ::fopen("writeabletextfile", "w");
@@ -2658,7 +2620,7 @@ void tst_QFile::appendAndRead()
void tst_QFile::miscWithUncPathAsCurrentDir()
{
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT)
+#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
QString current = QDir::currentPath();
const QString path = QLatin1String("//") + QtNetworkSettings::winServerName()
+ QLatin1String("/testshare");
@@ -2682,7 +2644,6 @@ void tst_QFile::standarderror()
void tst_QFile::handle()
{
int fd;
-#if !defined(Q_OS_WINCE)
QFile file(m_testSourceFile);
QVERIFY2(file.open(QIODevice::ReadOnly), msgOpenFailed(file).constData());
fd = int(file.handle());
@@ -2710,7 +2671,6 @@ void tst_QFile::handle()
#endif
QCOMPARE(c, '*');
-#endif
//test round trip of adopted stdio file handle
QFile file2;
@@ -2953,10 +2913,6 @@ void tst_QFile::map()
QString fileName = QDir::currentPath() + '/' + "qfile_map_testfile";
-#ifdef Q_OS_WINCE
- fileName = QFileInfo(fileName).absoluteFilePath();
-#endif
-
if (QFile::exists(fileName)) {
QVERIFY(QFile::setPermissions(fileName,
QFile::WriteOwner | QFile::ReadOwner | QFile::WriteUser | QFile::ReadUser));
@@ -2998,7 +2954,7 @@ void tst_QFile::map()
QCOMPARE(file.error(), QFile::NoError);
// hpux won't let you map multiple times.
-#if !defined(Q_OS_HPUX) && !defined(Q_USE_DEPRECATED_MAP_API) && !defined(Q_OS_WINCE)
+#if !defined(Q_OS_HPUX) && !defined(Q_USE_DEPRECATED_MAP_API)
// exotic test to make sure that multiple maps work
// note: windows ce does not reference count mutliple maps
@@ -3121,10 +3077,6 @@ void tst_QFile::mapOpenMode()
QVERIFY2(file.open(om), msgOpenFailed(om, file).constData());
uchar *memory = file.map(0, fileSize, QFileDevice::MemoryMapFlags(flags));
-#if defined(Q_OS_WINCE)
- QEXPECT_FAIL("ReadOnly + MapPrivate" , "Windows CE does not support MapPrivateOption.", Abort);
- QEXPECT_FAIL("ReadWrite + MapPrivate", "Windows CE does not support MapPrivateOption.", Abort);
-#endif
QVERIFY(memory);
QVERIFY(memcmp(memory, pattern, fileSize) == 0);
@@ -3157,10 +3109,6 @@ void tst_QFile::mapWrittenFile()
QString fileName = QDir::currentPath() + '/' + "qfile_map_testfile";
-#ifdef Q_OS_WINCE
- fileName = QFileInfo(fileName).absoluteFilePath();
-#endif
-
if (QFile::exists(fileName)) {
QVERIFY(QFile::setPermissions(fileName,
QFile::WriteOwner | QFile::ReadOwner | QFile::WriteUser | QFile::ReadUser));
@@ -3259,10 +3207,6 @@ protected:
bool MessageHandler::ok = true;
QtMessageHandler MessageHandler::oldMessageHandler = 0;
- //allthough Windows CE (not mobile!) has functions that allow redirecting
- //the standard file descriptors to a file (see SetStdioPathW/GetStdioPathW)
- //it does not have functions to simply open them like below .
-#ifndef Q_OS_WINCE
void tst_QFile::openStandardStreamsFileDescriptors()
{
@@ -3322,7 +3266,6 @@ void tst_QFile::openStandardStreamsBufferedStreams()
QVERIFY(msgHandler.testPassed());
}
-#endif
void tst_QFile::writeNothing()
{
diff --git a/tests/auto/corelib/io/qfileinfo/qfileinfo.pro b/tests/auto/corelib/io/qfileinfo/qfileinfo.pro
index 8aa81896cc..8d443c27ec 100644
--- a/tests/auto/corelib/io/qfileinfo/qfileinfo.pro
+++ b/tests/auto/corelib/io/qfileinfo/qfileinfo.pro
@@ -5,6 +5,6 @@ SOURCES = tst_qfileinfo.cpp
RESOURCES += qfileinfo.qrc \
testdata.qrc
-win32:!wince:!winrt:LIBS += -ladvapi32 -lnetapi32
+win32:!winrt:LIBS += -ladvapi32 -lnetapi32
win32: CONFIG += insignificant_test # Crashes on Windows in release builds
diff --git a/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp b/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp
index 4362bace8c..f10c746618 100644
--- a/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp
+++ b/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp
@@ -49,13 +49,13 @@
#ifdef Q_OS_WIN
#include <qt_windows.h>
#include <qlibrary.h>
-#if !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT)
+#if !defined(Q_OS_WINRT)
#include <lm.h>
#endif
#endif
#include <qplatformdefs.h>
#include <qdebug.h>
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
+#if defined(Q_OS_WIN)
#include "../../../network-settings.h"
#endif
#include <private/qfileinfo_p.h>
@@ -256,7 +256,7 @@ private slots:
void refresh();
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT)
+#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
void ntfsJunctionPointsAndSymlinks_data();
void ntfsJunctionPointsAndSymlinks();
void brokenShortcut();
@@ -273,7 +273,7 @@ private slots:
void detachingOperations();
-#if !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT)
+#if !defined(Q_OS_WINRT)
void owner();
#endif
void group();
@@ -354,17 +354,8 @@ void tst_QFileInfo::copy()
file.flush();
QTest::qWait(250);
-#if defined(Q_OS_WIN) || defined(Q_OS_WINCE)
- if (QSysInfo::windowsVersion() & QSysInfo::WV_VISTA ||
- QSysInfo::windowsVersion() & QSysInfo::WV_CE_based)
- file.close();
-#endif
-#if defined(Q_OS_WINCE)
- // On Windows CE we need to close the file.
- // Otherwise the content will be cached and not
- // flushed to the storage, although we flushed it
- // manually!!! CE has interim cache, we cannot influence.
- QTest::qWait(5000);
+#if defined(Q_OS_WIN)
+ file.close();
#endif
info3.refresh();
privateInfo3 = getPrivate(info3);
@@ -422,12 +413,12 @@ void tst_QFileInfo::isDir_data()
QTest::newRow("broken link") << "brokenlink.lnk" << false;
-#if (defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT))
+#if (defined(Q_OS_WIN) && !defined(Q_OS_WINRT))
QTest::newRow("drive 1") << "c:" << true;
QTest::newRow("drive 2") << "c:/" << true;
//QTest::newRow("drive 2") << "t:s" << false;
#endif
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT)
+#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
const QString uncRoot = QStringLiteral("//") + QtNetworkSettings::winServerName();
QTest::newRow("unc 1") << uncRoot << true;
QTest::newRow("unc 2") << uncRoot + QLatin1Char('/') << true;
@@ -464,13 +455,13 @@ void tst_QFileInfo::isRoot_data()
QTest::newRow("simple dir") << m_resourcesDir << false;
QTest::newRow("simple dir with slash") << (m_resourcesDir + QLatin1Char('/')) << false;
-#if (defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT))
+#if (defined(Q_OS_WIN) && !defined(Q_OS_WINRT))
QTest::newRow("drive 1") << "c:" << false;
QTest::newRow("drive 2") << "c:/" << true;
QTest::newRow("drive 3") << "p:/" << false;
#endif
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT)
+#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
const QString uncRoot = QStringLiteral("//") + QtNetworkSettings::winServerName();
QTest::newRow("unc 1") << uncRoot << true;
QTest::newRow("unc 2") << uncRoot + QLatin1Char('/') << true;
@@ -519,7 +510,7 @@ void tst_QFileInfo::exists_data()
QTest::newRow("simple dir") << m_resourcesDir << true;
QTest::newRow("simple dir with slash") << (m_resourcesDir + QLatin1Char('/')) << true;
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT)
+#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
const QString uncRoot = QStringLiteral("//") + QtNetworkSettings::winServerName();
QTest::newRow("unc 1") << uncRoot << true;
QTest::newRow("unc 2") << uncRoot + QLatin1Char('/') << true;
@@ -554,7 +545,7 @@ void tst_QFileInfo::absolutePath_data()
QTest::addColumn<QString>("filename");
QString drivePrefix;
-#if (defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT))
+#if (defined(Q_OS_WIN) && !defined(Q_OS_WINRT))
drivePrefix = QDir::currentPath().left(2);
QString nonCurrentDrivePrefix =
drivePrefix.left(1).compare("X", Qt::CaseInsensitive) == 0 ? QString("Y:") : QString("X:");
@@ -573,7 +564,7 @@ void tst_QFileInfo::absolutePath_data()
QTest::newRow("3") << "/usr/local/bin/" << drivePrefix + "/usr/local/bin" << "";
QTest::newRow("/test") << "/test" << drivePrefix + "/" << "test";
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT)
+#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
QTest::newRow("c:\\autoexec.bat") << "c:\\autoexec.bat" << "C:/"
<< "autoexec.bat";
QTest::newRow("c:autoexec.bat") << QDir::currentPath().left(2) + "autoexec.bat" << QDir::currentPath()
@@ -606,7 +597,7 @@ void tst_QFileInfo::absFilePath_data()
QTest::newRow("relativeFile") << "tmp.txt" << QDir::currentPath() + "/tmp.txt";
QTest::newRow("relativeFileInSubDir") << "temp/tmp.txt" << QDir::currentPath() + "/" + "temp/tmp.txt";
QString drivePrefix;
-#if (defined(Q_OS_WIN) && !defined(Q_OS_WINCE))
+#if defined(Q_OS_WIN)
QString curr = QDir::currentPath();
curr.remove(0, 2); // Make it a absolute path with no drive specifier: \depot\qt-4.2\tests\auto\qfileinfo
@@ -774,7 +765,7 @@ void tst_QFileInfo::fileName_data()
QTest::newRow("relativeFile") << "tmp.txt" << "tmp.txt";
QTest::newRow("relativeFileInSubDir") << "temp/tmp.txt" << "tmp.txt";
-#if (defined(Q_OS_WIN) && !defined(Q_OS_WINCE))
+#if defined(Q_OS_WIN)
QTest::newRow("absFilePath") << "c:\\home\\andy\\tmp.txt" << "tmp.txt";
QTest::newRow("driveWithNoSlash") << "c:tmp.txt" << "tmp.txt";
#else
@@ -1024,7 +1015,7 @@ void tst_QFileInfo::size()
void tst_QFileInfo::systemFiles()
{
-#if !defined(Q_OS_WIN) || defined(Q_OS_WINCE) || defined(Q_OS_WINRT)
+#if !defined(Q_OS_WIN) || defined(Q_OS_WINRT)
QSKIP("This is a Windows only test");
#endif
QFileInfo fi("c:\\pagefile.sys");
@@ -1121,11 +1112,7 @@ void tst_QFileInfo::fileTimes_data()
void tst_QFileInfo::fileTimes()
{
-#if defined(Q_OS_WINCE)
- int sleepTime = 3000;
-#else
int sleepTime = 2000;
-#endif
QFETCH(QString, fileName);
if (QFile::exists(fileName)) {
QVERIFY(QFile::remove(fileName));
@@ -1133,10 +1120,6 @@ void tst_QFileInfo::fileTimes()
QTest::qSleep(sleepTime);
{
QFile file(fileName);
-#if defined(Q_OS_WINCE)
- QEXPECT_FAIL("longfile", "No long filenames on WinCE", Abort);
- QEXPECT_FAIL("longfile absolutepath", "No long filenames on WinCE", Abort);
-#endif
QVERIFY(file.open(QFile::WriteOnly | QFile::Text));
#if defined(Q_OS_UNIX) && !defined(Q_OS_VXWORKS)
if (qIsLikelyToBeNfs(file.handle()))
@@ -1162,7 +1145,7 @@ void tst_QFileInfo::fileTimes()
{
QFileInfo fileInfo(fileName);
// On unix created() returns the same as lastModified().
-#if !defined(Q_OS_UNIX) && !defined(Q_OS_WINCE)
+#if !defined(Q_OS_UNIX)
QVERIFY(fileInfo.created() < beforeWrite);
#endif
QVERIFY(fileInfo.lastModified() > beforeWrite);
@@ -1174,7 +1157,7 @@ void tst_QFileInfo::fileTimes()
}
QFileInfo fileInfo(fileName);
-#if !defined(Q_OS_UNIX) && !defined(Q_OS_WINCE)
+#if !defined(Q_OS_UNIX)
QVERIFY(fileInfo.created() < beforeWrite);
#endif
//In Vista the last-access timestamp is not updated when the file is accessed/touched (by default).
@@ -1193,9 +1176,7 @@ void tst_QFileInfo::fileTimes()
RegCloseKey(key);
}
#endif
-#if defined(Q_OS_WINCE)
- QEXPECT_FAIL("simple", "WinCE only stores date of access data, not the time", Continue);
-#elif defined(Q_OS_WINRT)
+#if defined(Q_OS_WINRT)
QEXPECT_FAIL("", "WinRT does not allow timestamp handling change in the filesystem due to sandboxing", Continue);
#elif defined(Q_OS_QNX)
QEXPECT_FAIL("", "QNX uses the noatime filesystem option", Continue);
@@ -1211,8 +1192,8 @@ void tst_QFileInfo::fileTimes()
void tst_QFileInfo::fileTimes_oldFile()
{
- // This is not supported on WinCE or WinRT
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT)
+ // This is not supported on WinRT
+#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
// All files are opened in share mode (both read and write).
DWORD shareMode = FILE_SHARE_READ | FILE_SHARE_WRITE;
@@ -1310,7 +1291,7 @@ void tst_QFileInfo::isHidden_data()
QTest::newRow(qPrintable("drive." + info.path())) << info.path() << false;
}
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
+#if defined(Q_OS_WIN)
QVERIFY(QDir("./hidden-directory").exists() || QDir().mkdir("./hidden-directory"));
QVERIFY(SetFileAttributesW(reinterpret_cast<LPCWSTR>(QString("./hidden-directory").utf16()),FILE_ATTRIBUTE_HIDDEN));
QTest::newRow("C:/path/to/hidden-directory") << QDir::currentPath() + QString::fromLatin1("/hidden-directory") << true;
@@ -1413,7 +1394,7 @@ void tst_QFileInfo::isNativePath()
void tst_QFileInfo::refresh()
{
-#if defined(Q_OS_WINCE) || defined(Q_OS_WIN)
+#if defined(Q_OS_WIN)
int sleepTime = 3000;
#else
int sleepTime = 2000;
@@ -1436,17 +1417,8 @@ void tst_QFileInfo::refresh()
QCOMPARE(info.lastModified(), lastModified);
QCOMPARE(info.size(), qint64(7));
-#if defined(Q_OS_WIN) || defined(Q_OS_WINCE)
- if (QSysInfo::windowsVersion() & QSysInfo::WV_VISTA ||
- QSysInfo::windowsVersion() & QSysInfo::WV_CE_based)
- file.close();
-#endif
-#if defined(Q_OS_WINCE)
- // On Windows CE we need to close the file.
- // Otherwise the content will be cached and not
- // flushed to the storage, although we flushed it
- // manually!!! CE has interim cache, we cannot influence.
- QTest::qWait(5000);
+#if defined(Q_OS_WIN)
+ file.close();
#endif
info.refresh();
QCOMPARE(info.size(), qint64(13));
@@ -1459,7 +1431,7 @@ void tst_QFileInfo::refresh()
QCOMPARE(info2.size(), info.size());
}
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT)
+#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
void tst_QFileInfo::ntfsJunctionPointsAndSymlinks_data()
{
QTest::addColumn<QString>("path");
@@ -1633,11 +1605,7 @@ void tst_QFileInfo::isWritable()
tempfile.remove();
#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
-#ifdef Q_OS_WINCE
- QFileInfo fi("\\Windows\\wince.nls");
-#else
QFileInfo fi("c:\\pagefile.sys");
-#endif
QVERIFY2(fi.exists(), msgDoesNotExist(fi.absoluteFilePath()).constData());
QVERIFY(!fi.isWritable());
#endif
@@ -1813,8 +1781,7 @@ void tst_QFileInfo::detachingOperations()
QVERIFY(!info1.caching());
}
-#if !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT)
-#if defined (Q_OS_WIN)
+#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
BOOL IsUserAdmin()
{
BOOL b;
@@ -1835,14 +1802,14 @@ BOOL IsUserAdmin()
return(b);
}
-#endif
-#if defined(Q_OS_WIN)
QT_BEGIN_NAMESPACE
extern Q_CORE_EXPORT int qt_ntfs_permission_lookup;
QT_END_NAMESPACE
-#endif
+#endif // Q_OS_WIN && !Q_OS_WINRT
+
+#ifndef Q_OS_WINRT
void tst_QFileInfo::owner()
{
QString userName;
@@ -1904,7 +1871,7 @@ void tst_QFileInfo::owner()
qt_ntfs_permission_lookup = 0;
#endif
}
-#endif
+#endif // !Q_OS_WINRT
void tst_QFileInfo::group()
{
diff --git a/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp b/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp
index 5c9de8abb9..7060cf46ac 100644
--- a/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp
+++ b/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp
@@ -146,12 +146,7 @@ void tst_QFileSystemWatcher::basicTest()
// resolution of the modification time is system dependent, but it's at most 1 second when using
// the polling engine. I've heard rumors that FAT32 has a 2 second resolution. So, we have to
// wait a bit before we can modify the file (hrmph)...
-#ifndef Q_OS_WINCE
QTest::qWait(2000);
-#else
- // WinCE is always a little bit slower. Give it a little bit more time
- QTest::qWait(5000);
-#endif
testFile.open(QIODevice::WriteOnly | QIODevice::Append);
testFile.write(QByteArray("world"));
@@ -309,9 +304,6 @@ void tst_QFileSystemWatcher::watchDirectory()
QVERIFY(temporaryDir.rmdir(testDirName));
// waiting max 5 seconds for notification for directory removal to trigger
-#ifdef Q_OS_WINCE
- QEXPECT_FAIL("poller", "Directory does not get updated on file removal(See #137910)", Abort);
-#endif
QTRY_COMPARE(changedSpy.count(), 2);
QCOMPARE(changedSpy.at(0).count(), 1);
QCOMPARE(changedSpy.at(1).count(), 1);
@@ -553,9 +545,6 @@ void tst_QFileSystemWatcher::watchFileAndItsDirectory()
QEXPECT_FAIL("", "See QTBUG-30943", Continue);
#endif
QCOMPARE(fileChangedSpyCount, 0);
-#ifdef Q_OS_WINCE
- QEXPECT_FAIL("poller", "Directory does not get updated on file removal(See #137910)", Abort);
-#endif
QCOMPARE(dirChangedSpy.count(), 1);
dirChangedSpy.clear();
diff --git a/tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp b/tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp
index 8d5a4055b8..2a5d593d9a 100644
--- a/tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp
+++ b/tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp
@@ -100,9 +100,6 @@ void tst_QIODevice::getSetCheck()
//----------------------------------------------------------------------------------
void tst_QIODevice::constructing_QTcpSocket()
{
-#if defined(Q_OS_WINCE) && defined(WINCE_EMULATOR_TEST)
- QSKIP("Networking tests in a WinCE emulator are unstable");
-#endif
if (!QtNetworkSettings::verifyTestNetworkSettings())
QSKIP("No network test server available");
@@ -205,9 +202,6 @@ void tst_QIODevice::read_QByteArray()
//--------------------------------------------------------------------
void tst_QIODevice::unget()
{
-#if defined(Q_OS_WINCE) && defined(WINCE_EMULATOR_TEST)
- QSKIP("Networking tests in a WinCE emulator are unstable");
-#endif
#if defined(Q_OS_MAC)
QSKIP("The unget network test is unstable on Mac. See QTBUG-39983.");
#endif
diff --git a/tests/auto/corelib/io/qlockfile/tst_qlockfile.cpp b/tests/auto/corelib/io/qlockfile/tst_qlockfile.cpp
index 851c104c6a..6814302a1f 100644
--- a/tests/auto/corelib/io/qlockfile/tst_qlockfile.cpp
+++ b/tests/auto/corelib/io/qlockfile/tst_qlockfile.cpp
@@ -34,7 +34,7 @@
#include <qsysinfo.h>
#if defined(Q_OS_UNIX) && !defined(Q_OS_VXWORKS)
#include <unistd.h>
-#elif defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT)
+#elif defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
# include <qt_windows.h>
#endif
@@ -281,7 +281,7 @@ void tst_QLockFile::staleLockFromCrashedProcessReusedPid()
{
#if defined(QT_NO_PROCESS)
QSKIP("This test requires QProcess support");
-#elif defined(Q_OS_WINRT) || defined(Q_OS_WINCE) || defined(Q_OS_IOS)
+#elif defined(Q_OS_WINRT) || defined(Q_OS_IOS)
QSKIP("We cannot retrieve information about other processes on this platform.");
#else
const QString fileName = dir.path() + "/staleLockFromCrashedProcessReusedPid";
@@ -455,7 +455,7 @@ Q_DECLARE_OPERATORS_FOR_FLAGS(ProcessProperties)
static inline ProcessProperties processProperties()
{
ProcessProperties result;
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT)
+#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
HANDLE processToken = NULL;
if (OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &processToken)) {
DWORD elevation; // struct containing a DWORD, not present in some MinGW headers.
@@ -484,7 +484,7 @@ void tst_QLockFile::noPermissionsWindows()
{
// Windows: Do the permissions test in a system directory in which
// files cannot be created.
-#if !defined(Q_OS_WIN) || defined(Q_OS_WINCE) || defined(Q_OS_WINRT)
+#if !defined(Q_OS_WIN) || defined(Q_OS_WINRT)
QSKIP("This test is for desktop Windows only");
#endif
#ifdef Q_OS_WIN
diff --git a/tests/auto/corelib/io/qlockfile/tst_qlockfile.pro b/tests/auto/corelib/io/qlockfile/tst_qlockfile.pro
index 6eb72343bc..7b83d5dbe8 100644
--- a/tests/auto/corelib/io/qlockfile/tst_qlockfile.pro
+++ b/tests/auto/corelib/io/qlockfile/tst_qlockfile.pro
@@ -4,4 +4,4 @@ TARGET = tst_qlockfile
SOURCES += tst_qlockfile.cpp
QT = core testlib concurrent
-win32:!wince:!winrt:LIBS += -ladvapi32
+win32:!winrt:LIBS += -ladvapi32
diff --git a/tests/auto/corelib/io/qprocess/qprocess.pri b/tests/auto/corelib/io/qprocess/qprocess.pri
index a43c823846..d5a7532ee1 100644
--- a/tests/auto/corelib/io/qprocess/qprocess.pri
+++ b/tests/auto/corelib/io/qprocess/qprocess.pri
@@ -10,13 +10,12 @@ SUBPROGRAMS = \
testProcessDeadWhileReading \
testProcessEOF \
testExitCodes \
+ testForwarding \
testGuiProcess \
testDetached \
fileWriterProcess \
testSetWorkingDirectory \
testSoftExit
-!contains(QMAKE_PLATFORM, wince): SUBPROGRAMS += testForwarding
-
!qtHaveModule(widgets): SUBPROGRAMS -= \
testGuiProcess
diff --git a/tests/auto/corelib/io/qprocess/qprocess.pro b/tests/auto/corelib/io/qprocess/qprocess.pro
index 6ba54b1e92..3867ac5741 100644
--- a/tests/auto/corelib/io/qprocess/qprocess.pro
+++ b/tests/auto/corelib/io/qprocess/qprocess.pro
@@ -8,7 +8,7 @@ SUBDIRS += testProcessSpacesArgs/nospace.pro \
testProcessSpacesArgs/twospaces.pro \
testSpaceInName
-win32:!wince* {
+win32 {
SUBDIRS += \
testProcessEchoGui \
testSetNamedPipeHandleState
diff --git a/tests/auto/corelib/io/qprocess/testProcessSpacesArgs/main.cpp b/tests/auto/corelib/io/qprocess/testProcessSpacesArgs/main.cpp
index 494d8147a7..0d40a9b83c 100644
--- a/tests/auto/corelib/io/qprocess/testProcessSpacesArgs/main.cpp
+++ b/tests/auto/corelib/io/qprocess/testProcessSpacesArgs/main.cpp
@@ -31,21 +31,10 @@
int main(int argc, char ** argv)
{
-#if defined(WINCE) || defined(_WIN32_WCE)
- // No pipes on this "OS"
- FILE* file = fopen("\\temp\\qprocess_args_test.txt","w+");
- for (int i = 0; i < argc; ++i) {
- if (i)
- fprintf(file, "|");
- fprintf(file, argv[i]);
- }
- fclose(file);
-#else
for (int i = 0; i < argc; ++i) {
if (i)
printf("|");
printf("%s", argv[i]);
}
-#endif
return 0;
}
diff --git a/tests/auto/corelib/io/qprocess/testSoftExit/testSoftExit.pro b/tests/auto/corelib/io/qprocess/testSoftExit/testSoftExit.pro
index d19a631cae..80e8bcad98 100644
--- a/tests/auto/corelib/io/qprocess/testSoftExit/testSoftExit.pro
+++ b/tests/auto/corelib/io/qprocess/testSoftExit/testSoftExit.pro
@@ -1,6 +1,6 @@
win32 {
SOURCES = main_win.cpp
- !wince: LIBS += -luser32
+ LIBS += -luser32
}
unix {
SOURCES = main_unix.cpp
diff --git a/tests/auto/corelib/io/qprocess/tst_qprocess.cpp b/tests/auto/corelib/io/qprocess/tst_qprocess.cpp
index c47e88b0e6..1da9cf38a1 100644
--- a/tests/auto/corelib/io/qprocess/tst_qprocess.cpp
+++ b/tests/auto/corelib/io/qprocess/tst_qprocess.cpp
@@ -66,7 +66,6 @@ private slots:
void startDetached();
void crashTest();
void crashTest2();
-#ifndef Q_OS_WINCE
void echoTest_data();
void echoTest();
void echoTest2();
@@ -112,7 +111,6 @@ private slots:
void discardUnwantedOutput();
void setWorkingDirectory();
void setNonExistentWorkingDirectory();
-#endif // not Q_OS_WINCE
void exitStatus_data();
void exitStatus();
@@ -156,11 +154,9 @@ protected slots:
void readFromProcess();
void exitLoopSlot();
void processApplicationEvents();
-#ifndef Q_OS_WINCE
void restartProcess();
void waitForReadyReadInAReadyReadSlotSlot();
void waitForBytesWrittenInABytesWrittenSlotSlot();
-#endif
private:
qint64 bytesAvailable;
@@ -411,8 +407,6 @@ void tst_QProcess::crashTest2()
QCOMPARE(process.exitStatus(), QProcess::CrashExit);
}
-#ifndef Q_OS_WINCE
-//Reading and writing to a process is not supported on Qt/CE
void tst_QProcess::echoTest_data()
{
QTest::addColumn<QByteArray>("input");
@@ -467,7 +461,6 @@ void tst_QProcess::echoTest()
QCOMPARE(process.exitStatus(), QProcess::NormalExit);
QCOMPARE(process.exitCode(), 0);
}
-#endif
void tst_QProcess::exitLoopSlot()
{
@@ -479,8 +472,6 @@ void tst_QProcess::processApplicationEvents()
QCoreApplication::processEvents();
}
-#ifndef Q_OS_WINCE
-// Reading and writing to a process is not supported on Qt/CE
void tst_QProcess::echoTest2()
{
@@ -528,10 +519,8 @@ void tst_QProcess::echoTest2()
QCOMPARE(process.exitStatus(), QProcess::NormalExit);
QCOMPARE(process.exitCode(), 0);
}
-#endif
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
-// Reading and writing to a process is not supported on Qt/CE
+#if defined(Q_OS_WIN)
void tst_QProcess::echoTestGui()
{
QProcess process;
@@ -560,10 +549,9 @@ void tst_QProcess::testSetNamedPipeHandleState()
QCOMPARE(process.exitCode(), 0);
QCOMPARE(process.exitStatus(), QProcess::NormalExit);
}
-#endif // !Q_OS_WINCE && Q_OS_WIN
+#endif // Q_OS_WIN
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
-// Batch files are not supported on Windows CE
+#if defined(Q_OS_WIN)
void tst_QProcess::batFiles_data()
{
QTest::addColumn<QString>("batFile");
@@ -590,7 +578,7 @@ void tst_QProcess::batFiles()
QVERIFY(proc.readAll().startsWith(output));
}
-#endif // !Q_OS_WINCE && Q_OS_WIN
+#endif // Q_OS_WIN
void tst_QProcess::exitStatus_data()
{
@@ -632,8 +620,6 @@ void tst_QProcess::exitStatus()
}
}
-#ifndef Q_OS_WINCE
-// Reading and writing to a process is not supported on Qt/CE
void tst_QProcess::loopBackTest()
{
@@ -654,10 +640,7 @@ void tst_QProcess::loopBackTest()
QCOMPARE(process.exitStatus(), QProcess::NormalExit);
QCOMPARE(process.exitCode(), 0);
}
-#endif
-#ifndef Q_OS_WINCE
-// Reading and writing to a process is not supported on Qt/CE
void tst_QProcess::readTimeoutAndThenCrash()
{
@@ -688,7 +671,6 @@ void tst_QProcess::readTimeoutAndThenCrash()
QCOMPARE(spy2.count(), 1);
QCOMPARE(*static_cast<const QProcess::ProcessError *>(spy2.at(0).at(0).constData()), QProcess::Crashed);
}
-#endif
void tst_QProcess::waitForFinished()
{
@@ -699,9 +681,6 @@ void tst_QProcess::waitForFinished()
QVERIFY(process.waitForFinished());
QCOMPARE(process.exitStatus(), QProcess::NormalExit);
-#if defined (Q_OS_WINCE)
- QEXPECT_FAIL("", "Reading and writing to a process is not supported on Qt/CE", Continue);
-#endif
QString output = process.readAll();
QCOMPARE(output.count("\n"), 10*1024);
@@ -713,8 +692,6 @@ void tst_QProcess::waitForFinished()
QCOMPARE(process.error(), QProcess::FailedToStart);
}
-#ifndef Q_OS_WINCE
-// Reading and writing to a process is not supported on Qt/CE
void tst_QProcess::deadWhileReading()
{
QProcess process;
@@ -732,10 +709,7 @@ void tst_QProcess::deadWhileReading()
QCOMPARE(process.exitStatus(), QProcess::NormalExit);
QCOMPARE(process.exitCode(), 0);
}
-#endif
-#ifndef Q_OS_WINCE
-// Reading and writing to a process is not supported on Qt/CE
void tst_QProcess::restartProcessDeadlock()
{
@@ -765,10 +739,7 @@ void tst_QProcess::restartProcess()
QVERIFY(process);
process->start("testProcessEcho/testProcessEcho");
}
-#endif
-#ifndef Q_OS_WINCE
-// Reading and writing to a process is not supported on Qt/CE
void tst_QProcess::closeWriteChannel()
{
QProcess more;
@@ -794,10 +765,7 @@ void tst_QProcess::closeWriteChannel()
QCOMPARE(more.exitStatus(), QProcess::NormalExit);
QCOMPARE(more.exitCode(), 0);
}
-#endif
-#ifndef Q_OS_WINCE
-// Reading and writing to a process is not supported on Qt/CE"
void tst_QProcess::closeReadChannel()
{
for (int i = 0; i < 10; ++i) {
@@ -827,10 +795,7 @@ void tst_QProcess::closeReadChannel()
QCOMPARE(proc.exitCode(), 0);
}
}
-#endif
-#ifndef Q_OS_WINCE
-// Reading and writing to a process is not supported on Qt/CE
void tst_QProcess::openModes()
{
QProcess proc;
@@ -871,10 +836,7 @@ void tst_QProcess::openModes()
QVERIFY(!proc.isWritable());
QCOMPARE(proc.state(), QProcess::NotRunning);
}
-#endif
-#ifndef Q_OS_WINCE
-// Reading and writing to a process is not supported on Qt/CE
void tst_QProcess::emitReadyReadOnlyWhenNewDataArrives()
{
@@ -908,17 +870,12 @@ void tst_QProcess::emitReadyReadOnlyWhenNewDataArrives()
QCOMPARE(proc.exitStatus(), QProcess::NormalExit);
QCOMPARE(proc.exitCode(), 0);
}
-#endif
void tst_QProcess::hardExit()
{
QProcess proc;
-#if defined(Q_OS_WINCE)
- proc.start("testSoftExit/testSoftExit");
-#else
proc.start("testProcessEcho/testProcessEcho");
-#endif
QVERIFY2(proc.waitForStarted(), qPrintable(proc.errorString()));
proc.kill();
@@ -935,9 +892,7 @@ void tst_QProcess::softExit()
proc.start("testSoftExit/testSoftExit");
QVERIFY(proc.waitForStarted(10000));
-#if !defined(Q_OS_WINCE)
QVERIFY(proc.waitForReadyRead(10000));
-#endif
QVERIFY(proc.processId() > 0);
@@ -948,8 +903,6 @@ void tst_QProcess::softExit()
QCOMPARE(int(proc.error()), int(QProcess::UnknownError));
}
-#ifndef Q_OS_WINCE
-// Reading and writing to a process is not supported on Qt/CE
class SoftExitProcess : public QProcess
{
Q_OBJECT
@@ -1071,10 +1024,7 @@ void tst_QProcess::softExitInSlots()
QTRY_VERIFY_WITH_TIMEOUT(proc.waitedForFinished, 10000);
QCOMPARE(proc.state(), QProcess::NotRunning);
}
-#endif
-#ifndef Q_OS_WINCE
-// Reading and writing to a process is not supported on Qt/CE
void tst_QProcess::mergedChannels()
{
QProcess process;
@@ -1097,10 +1047,6 @@ void tst_QProcess::mergedChannels()
QCOMPARE(process.exitStatus(), QProcess::NormalExit);
QCOMPARE(process.exitCode(), 0);
}
-#endif
-
-#ifndef Q_OS_WINCE
-// Reading and writing to a process is not supported on Qt/CE
void tst_QProcess::forwardedChannels_data()
{
@@ -1153,10 +1099,7 @@ void tst_QProcess::forwardedChannels()
QCOMPARE(process.readAllStandardOutput(), outdata);
QCOMPARE(process.readAllStandardError(), errdata);
}
-#endif
-#ifndef Q_OS_WINCE
-// Reading and writing to a process is not supported on Qt/CE
void tst_QProcess::atEnd()
{
QProcess process;
@@ -1178,7 +1121,6 @@ void tst_QProcess::atEnd()
QCOMPARE(process.exitStatus(), QProcess::NormalExit);
QCOMPARE(process.exitCode(), 0);
}
-#endif
class TestThread : public QThread
{
@@ -1200,9 +1142,7 @@ protected:
process.start("testProcessEcho/testProcessEcho");
-#if !defined(Q_OS_WINCE)
QCOMPARE(process.write("abc\0", 4), qint64(4));
-#endif
exitCode = exec();
}
@@ -1251,8 +1191,6 @@ void tst_QProcess::processesInMultipleThreads()
}
}
-#ifndef Q_OS_WINCE
-// Reading and writing to a process is not supported on Qt/CE
void tst_QProcess::waitForFinishedWithTimeout()
{
QProcess process;
@@ -1266,10 +1204,7 @@ void tst_QProcess::waitForFinishedWithTimeout()
QVERIFY(process.waitForFinished());
}
-#endif
-#ifndef Q_OS_WINCE
-// Reading and writing to a process is not supported on Qt/CE
void tst_QProcess::waitForReadyReadInAReadyReadSlot()
{
QProcess process;
@@ -1295,10 +1230,7 @@ void tst_QProcess::waitForReadyReadInAReadyReadSlot()
QCOMPARE(process.exitCode(), 0);
QVERIFY(process.bytesAvailable() > bytesAvailable);
}
-#endif
-#ifndef Q_OS_WINCE
-// Reading and writing to a process is not supported on Qt/CE
void tst_QProcess::waitForReadyReadInAReadyReadSlotSlot()
{
QProcess *process = qobject_cast<QProcess *>(sender());
@@ -1308,10 +1240,7 @@ void tst_QProcess::waitForReadyReadInAReadyReadSlotSlot()
QVERIFY(process->waitForReadyRead(5000));
QTestEventLoop::instance().exitLoop();
}
-#endif
-#ifndef Q_OS_WINCE
-// Reading and writing to a process is not supported on Qt/CE
void tst_QProcess::waitForBytesWrittenInABytesWrittenSlot()
{
QProcess process;
@@ -1334,10 +1263,7 @@ void tst_QProcess::waitForBytesWrittenInABytesWrittenSlot()
QCOMPARE(process.exitStatus(), QProcess::NormalExit);
QCOMPARE(process.exitCode(), 0);
}
-#endif
-#ifndef Q_OS_WINCE
-// Reading and writing to a process is not supported on Qt/CE
void tst_QProcess::waitForBytesWrittenInABytesWrittenSlotSlot()
{
QProcess *process = qobject_cast<QProcess *>(sender());
@@ -1346,7 +1272,6 @@ void tst_QProcess::waitForBytesWrittenInABytesWrittenSlotSlot()
QVERIFY(process->waitForBytesWritten(5000));
QTestEventLoop::instance().exitLoop();
}
-#endif
void tst_QProcess::spaceArgsTest_data()
{
@@ -1425,14 +1350,12 @@ void tst_QProcess::spaceArgsTest()
QCOMPARE(process.exitStatus(), QProcess::NormalExit);
QCOMPARE(process.exitCode(), 0);
-#if !defined(Q_OS_WINCE)
QStringList actual = QString::fromLatin1(process.readAll()).split("|");
QVERIFY(!actual.isEmpty());
// not interested in the program name, it might be different.
actual.removeFirst();
QCOMPARE(actual, args);
-#endif
if (program.contains(QLatin1Char(' ')))
program = QLatin1Char('"') + program + QLatin1Char('"');
@@ -1449,14 +1372,12 @@ void tst_QProcess::spaceArgsTest()
QVERIFY2(started, errorMessage.constData());
QVERIFY(process.waitForFinished(5000));
-#if !defined(Q_OS_WINCE)
actual = QString::fromLatin1(process.readAll()).split("|");
QVERIFY(!actual.isEmpty());
// not interested in the program name, it might be different.
actual.removeFirst();
QCOMPARE(actual, args);
-#endif
}
}
@@ -1477,26 +1398,12 @@ void tst_QProcess::nativeArguments()
QCOMPARE(proc.exitStatus(), QProcess::NormalExit);
QCOMPARE(proc.exitCode(), 0);
-#if defined(Q_OS_WINCE)
- // WinCE test outputs to a file, so check that
- FILE* file = fopen("\\temp\\qprocess_args_test.txt","r");
- QVERIFY(file);
- char buf[256];
- fgets(buf, 256, file);
- fclose(file);
- QStringList actual = QString::fromLatin1(buf).split(QLatin1Char('|'));
-#else
QStringList actual = QString::fromLatin1(proc.readAll()).split(QLatin1Char('|'));
-#endif
QVERIFY(!actual.isEmpty());
// not interested in the program name, it might be different.
actual.removeFirst();
QStringList expected;
-#if defined(Q_OS_WINCE)
- expected << "hello" << "kitty," << "\"*\"!"; // Weird, weird ...
-#else
expected << "hello" << "kitty," << "*!";
-#endif
QCOMPARE(actual, expected);
}
@@ -1715,8 +1622,6 @@ void tst_QProcess::failToStartEmptyArgs()
QCOMPARE(process.error(), QProcess::FailedToStart);
}
-#ifndef Q_OS_WINCE
-// Reading and writing to a process is not supported on Qt/CE
void tst_QProcess::removeFileWhileProcessIsRunning()
{
QFile file(m_temporaryDir.path() + QLatin1String("/removeFile.txt"));
@@ -1734,9 +1639,7 @@ void tst_QProcess::removeFileWhileProcessIsRunning()
QCOMPARE(process.exitStatus(), QProcess::NormalExit);
QCOMPARE(process.exitCode(), 0);
}
-#endif
-#ifndef Q_OS_WINCE
-// OS doesn't support environment variables
+
void tst_QProcess::setEnvironment_data()
{
QTest::addColumn<QString>("name");
@@ -1811,9 +1714,7 @@ void tst_QProcess::setEnvironment()
QCOMPARE(process.readAll(), value.toLocal8Bit());
}
}
-#endif
-#ifndef Q_OS_WINCE
-// OS doesn't support environment variables
+
void tst_QProcess::setProcessEnvironment_data()
{
setEnvironment_data();
@@ -1851,25 +1752,16 @@ void tst_QProcess::setProcessEnvironment()
QCOMPARE(process.readAll(), value.toLocal8Bit());
}
}
-#endif
void tst_QProcess::systemEnvironment()
{
-#if defined (Q_OS_WINCE)
- // there is no concept of system variables on Windows CE as there is no console
- QVERIFY(QProcess::systemEnvironment().isEmpty());
- QVERIFY(QProcessEnvironment::systemEnvironment().isEmpty());
-#else
QVERIFY(!QProcess::systemEnvironment().isEmpty());
QVERIFY(!QProcessEnvironment::systemEnvironment().isEmpty());
QVERIFY(QProcessEnvironment::systemEnvironment().contains("PATH"));
QVERIFY(!QProcess::systemEnvironment().filter(QRegExp("^PATH=", Qt::CaseInsensitive)).isEmpty());
-#endif
}
-#ifndef Q_OS_WINCE
-// Reading and writing to a process is not supported on Qt/CE
void tst_QProcess::spaceInName()
{
QProcess process;
@@ -1880,7 +1772,6 @@ void tst_QProcess::spaceInName()
QCOMPARE(process.exitStatus(), QProcess::NormalExit);
QCOMPARE(process.exitCode(), 0);
}
-#endif
void tst_QProcess::lockupsInStartDetached()
{
@@ -1895,8 +1786,6 @@ void tst_QProcess::lockupsInStartDetached()
QProcess::startDetached("yjhbrty");
}
-#ifndef Q_OS_WINCE
-// Reading and writing to a process is not supported on Qt/CE
void tst_QProcess::atEnd2()
{
QProcess process;
@@ -1911,7 +1800,6 @@ void tst_QProcess::atEnd2()
}
QCOMPARE(lines.size(), 7);
}
-#endif
void tst_QProcess::waitForReadyReadForNonexistantProcess()
{
@@ -1944,8 +1832,6 @@ void tst_QProcess::waitForReadyReadForNonexistantProcess()
QCOMPARE(finishedSpy2.count(), 0);
}
-#ifndef Q_OS_WINCE
-// Reading and writing to a process is not supported on Qt/CE
void tst_QProcess::setStandardInputFile()
{
static const char data[] = "A bunch\1of\2data\3\4\5\6\7...";
@@ -1973,10 +1859,7 @@ void tst_QProcess::setStandardInputFile()
all = process2.readAll();
QCOMPARE(all.size(), 0);
}
-#endif
-#ifndef Q_OS_WINCE
-// Reading and writing to a process is not supported on Qt/CE
void tst_QProcess::setStandardOutputFile_data()
{
QTest::addColumn<int>("channelToTest");
@@ -2094,10 +1977,7 @@ void tst_QProcess::setStandardOutputFileAndWaitForBytesWritten()
QCOMPARE(all, QByteArray::fromRawData(testdata, sizeof testdata - 1));
}
-#endif
-#ifndef Q_OS_WINCE
-// Reading and writing to a process is not supported on Qt/CE
void tst_QProcess::setStandardOutputProcess_data()
{
QTest::addColumn<bool>("merged");
@@ -2138,10 +2018,7 @@ void tst_QProcess::setStandardOutputProcess()
else
QCOMPARE(all, QByteArray("HHeelllloo,, WWoorrlldd"));
}
-#endif
-#ifndef Q_OS_WINCE
-// Reading and writing to a process is not supported on Qt/CE
void tst_QProcess::fileWriterProcess()
{
const QByteArray line = QByteArrayLiteral(" -- testing testing 1 2 3\n");
@@ -2175,16 +2052,11 @@ void tst_QProcess::fileWriterProcess()
QCOMPARE(QFile(fileName).size(), qint64(stdinStr.size()));
} while (stopWatch.elapsed() < 3000);
}
-#endif
void tst_QProcess::detachedWorkingDirectoryAndPid()
{
qint64 pid;
-#ifdef Q_OS_WINCE
- QTest::qSleep(1000);
-#endif
-
QFile infoFile(m_temporaryDir.path() + QLatin1String("/detachedinfo.txt"));
if (infoFile.exists())
QVERIFY(infoFile.remove());
@@ -2221,8 +2093,6 @@ void tst_QProcess::detachedWorkingDirectoryAndPid()
QCOMPARE(actualPid, pid);
}
-#ifndef Q_OS_WINCE
-// Reading and writing to a process is not supported on Qt/CE
void tst_QProcess::switchReadChannels()
{
const char data[] = "ABCD";
@@ -2251,10 +2121,7 @@ void tst_QProcess::switchReadChannels()
process.setReadChannel(QProcess::StandardOutput);
QCOMPARE(process.read(1), QByteArray("D"));
}
-#endif
-#ifndef Q_OS_WINCE
-// Reading and writing to a process is not supported on Qt/CE
void tst_QProcess::discardUnwantedOutput()
{
QProcess process;
@@ -2272,11 +2139,8 @@ void tst_QProcess::discardUnwantedOutput()
process.setReadChannel(QProcess::StandardError);
QCOMPARE(process.bytesAvailable(), Q_INT64_C(0));
}
-#endif
-#ifndef Q_OS_WINCE
// Q_OS_WIN - setWorkingDirectory will chdir before starting the process on unices
-// Windows CE does not support working directory logic
void tst_QProcess::setWorkingDirectory()
{
QProcess process;
@@ -2315,7 +2179,6 @@ void tst_QProcess::setNonExistentWorkingDirectory()
QVERIFY2(process.errorString().startsWith("chdir:"), process.errorString().toLocal8Bit());
#endif
}
-#endif
void tst_QProcess::startFinishStartFinish()
{
@@ -2325,11 +2188,9 @@ void tst_QProcess::startFinishStartFinish()
QCOMPARE(process.state(), QProcess::NotRunning);
process.start("testProcessOutput/testProcessOutput");
-#if !defined(Q_OS_WINCE)
QVERIFY(process.waitForReadyRead(10000));
QCOMPARE(QString::fromLatin1(process.readLine().trimmed()),
QString("0 -this is a number"));
-#endif
if (process.state() != QProcess::NotRunning) {
QVERIFY(process.waitForFinished(10000));
QCOMPARE(process.exitStatus(), QProcess::NormalExit);
diff --git a/tests/auto/corelib/io/qprocessenvironment/tst_qprocessenvironment.cpp b/tests/auto/corelib/io/qprocessenvironment/tst_qprocessenvironment.cpp
index a4a5d5b0c7..af5078a3dc 100644
--- a/tests/auto/corelib/io/qprocessenvironment/tst_qprocessenvironment.cpp
+++ b/tests/auto/corelib/io/qprocessenvironment/tst_qprocessenvironment.cpp
@@ -44,9 +44,7 @@ private slots:
void caseSensitivity();
void systemEnvironment();
-#ifndef Q_OS_WINCE
void putenv();
-#endif
};
void tst_QProcessEnvironment::operator_eq()
@@ -257,12 +255,6 @@ void tst_QProcessEnvironment::systemEnvironment()
QVERIFY(nonexistant.isNull());
-#ifdef Q_OS_WINCE
- // Windows CE has no environment
- QVERIFY(path.isEmpty());
- QVERIFY(!system.contains("PATH"));
- QVERIFY(system.isEmpty());
-#else
// all other system have environments
if (path.isEmpty())
QFAIL("Could not find the PATH environment variable -- please correct the test environment");
@@ -272,18 +264,15 @@ void tst_QProcessEnvironment::systemEnvironment()
QVERIFY(!system.contains(envname));
-# ifdef Q_OS_WIN
+#ifdef Q_OS_WIN
// check case-insensitive too
QVERIFY(system.contains("path"));
QCOMPARE(system.value("path"), QString::fromLocal8Bit(path));
QVERIFY(!system.contains(QString(envname).toLower()));
-# endif
#endif
}
-#ifndef Q_OS_WINCE
-//Windows CE has no environment
void tst_QProcessEnvironment::putenv()
{
static const char envname[] = "WE_RE_SETTING_THIS_ENVIRONMENT_VARIABLE";
@@ -317,7 +306,6 @@ void tst_QProcessEnvironment::putenv()
QCOMPARE(eAfter.value(lower), QString("Hello, World"));
# endif
}
-#endif
QTEST_MAIN(tst_QProcessEnvironment)
diff --git a/tests/auto/corelib/io/qsettings/tst_qsettings.cpp b/tests/auto/corelib/io/qsettings/tst_qsettings.cpp
index 87a801c9dd..60252a91de 100644
--- a/tests/auto/corelib/io/qsettings/tst_qsettings.cpp
+++ b/tests/auto/corelib/io/qsettings/tst_qsettings.cpp
@@ -1521,7 +1521,7 @@ void tst_QSettings::sync()
// Now "some other app" will change other.software.org.ini
QString userConfDir = settingsPath("__user__") + QDir::separator();
-#if !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT)
+#if !defined(Q_OS_WINRT)
unlink((userConfDir + "other.software.org.ini").toLatin1());
rename((userConfDir + "software.org.ini").toLatin1(),
(userConfDir + "other.software.org.ini").toLatin1());
diff --git a/tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp b/tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp
index 410f512a77..9380b7d73c 100644
--- a/tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp
+++ b/tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp
@@ -266,7 +266,7 @@ void tst_QTemporaryDir::nonWritableCurrentDir()
void tst_QTemporaryDir::openOnRootDrives()
{
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT)
+#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
unsigned int lastErrorMode = SetErrorMode(SEM_FAILCRITICALERRORS);
#endif
// If it's possible to create a file in the root directory, it
@@ -280,7 +280,7 @@ void tst_QTemporaryDir::openOnRootDrives()
QVERIFY(dir.isValid());
}
}
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT)
+#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
SetErrorMode(lastErrorMode);
#endif
}
diff --git a/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp b/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp
index 53c64166c4..93a3bc895c 100644
--- a/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp
+++ b/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp
@@ -374,9 +374,7 @@ void tst_QTemporaryFile::size()
// On CE it takes more time for the filesystem to update
// the information. Usually you have to close it or seek
// to get latest information. flush() does not help either.
-#if !defined(Q_OS_WINCE)
QCOMPARE(file.size(), qint64(6));
-#endif
file.seek(0);
QCOMPARE(file.size(), qint64(6));
}
@@ -395,7 +393,7 @@ void tst_QTemporaryFile::resize()
void tst_QTemporaryFile::openOnRootDrives()
{
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT)
+#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
unsigned int lastErrorMode = SetErrorMode(SEM_FAILCRITICALERRORS);
#endif
// If it's possible to create a file in the root directory, it
@@ -409,19 +407,14 @@ void tst_QTemporaryFile::openOnRootDrives()
QVERIFY(file.open());
}
}
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT)
+#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
SetErrorMode(lastErrorMode);
#endif
}
void tst_QTemporaryFile::stressTest()
{
-#if defined(Q_OS_WINCE)
- // 200 is still ok, first colision happens after ~30
- const int iterations = 200;
-#else
const int iterations = 1000;
-#endif
QSet<QString> names;
for (int i = 0; i < iterations; ++i) {
diff --git a/tests/auto/corelib/io/qtextstream/tst_qtextstream.cpp b/tests/auto/corelib/io/qtextstream/tst_qtextstream.cpp
index 104873b85e..9533989b9d 100644
--- a/tests/auto/corelib/io/qtextstream/tst_qtextstream.cpp
+++ b/tests/auto/corelib/io/qtextstream/tst_qtextstream.cpp
@@ -175,20 +175,16 @@ private slots:
void octTest();
void zeroTermination();
void ws_manipulator();
-#ifndef Q_OS_WINCE
void stillOpenWhenAtEnd();
-#endif
void readNewlines_data();
void readNewlines();
void seek();
void pos();
void pos2();
void pos3LargeFile();
-#if !defined(Q_OS_WINCE)
void readStdin();
void readAllFromStdin();
void readLineFromStdin();
-#endif
void read();
void qbool();
void forcePoint();
@@ -1207,8 +1203,6 @@ void tst_QTextStream::ws_manipulator()
}
// ------------------------------------------------------------------------------
-#ifndef Q_OS_WINCE
-// Qt/CE: Cannot test network on emulator
void tst_QTextStream::stillOpenWhenAtEnd()
{
QFile file(QFINDTESTDATA("tst_qtextstream.cpp"));
@@ -1229,7 +1223,6 @@ void tst_QTextStream::stillOpenWhenAtEnd()
while (!stream2.readLine().isNull()) {}
QVERIFY(socket.isOpen());
}
-#endif
// ------------------------------------------------------------------------------
void tst_QTextStream::readNewlines_data()
@@ -1498,8 +1491,6 @@ void tst_QTextStream::pos3LargeFile()
}
// ------------------------------------------------------------------------------
-// Qt/CE has no stdin/out support for processes
-#if !defined(Q_OS_WINCE)
void tst_QTextStream::readStdin()
{
#ifdef QT_NO_PROCESS
@@ -1527,7 +1518,6 @@ void tst_QTextStream::readStdin()
}
// ------------------------------------------------------------------------------
-// Qt/CE has no stdin/out support for processes
void tst_QTextStream::readAllFromStdin()
{
#ifdef QT_NO_PROCESS
@@ -1549,7 +1539,6 @@ void tst_QTextStream::readAllFromStdin()
}
// ------------------------------------------------------------------------------
-// Qt/CE has no stdin/out support for processes
void tst_QTextStream::readLineFromStdin()
{
#ifdef QT_NO_PROCESS
@@ -1572,7 +1561,6 @@ void tst_QTextStream::readLineFromStdin()
QVERIFY(stdinProcess.waitForFinished(5000));
#endif
}
-#endif
// ------------------------------------------------------------------------------
void tst_QTextStream::read()
@@ -2799,12 +2787,7 @@ void tst_QTextStream::status_real_read()
void tst_QTextStream::status_integer_read()
{
-#ifdef Q_OS_WINCE
- QString text = QLatin1String("123 abc ");
- QTextStream s(&text);
-#else
QTextStream s("123 abc ");
-#endif
int i;
QString w;
s >> i;
@@ -2822,12 +2805,7 @@ void tst_QTextStream::status_integer_read()
void tst_QTextStream::status_word_read()
{
-#ifdef Q_OS_WINCE
- QString text = QLatin1String("abc ");
- QTextStream s(&text);
-#else
QTextStream s("abc ");
-#endif
QString w;
s >> w;
QCOMPARE(s.status(), QTextStream::Ok);