summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/corelib/io/qfile/test/test.pro2
-rw-r--r--tests/auto/corelib/io/qfile/tst_qfile.cpp6
2 files changed, 5 insertions, 3 deletions
diff --git a/tests/auto/corelib/io/qfile/test/test.pro b/tests/auto/corelib/io/qfile/test/test.pro
index bd7792edb6..39f47a0ae5 100644
--- a/tests/auto/corelib/io/qfile/test/test.pro
+++ b/tests/auto/corelib/io/qfile/test/test.pro
@@ -3,6 +3,8 @@ CONFIG += parallel_test
QT = core-private core network testlib
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
TESTDATA += ../dosfile.txt ../noendofline.txt ../testfile.txt \
diff --git a/tests/auto/corelib/io/qfile/tst_qfile.cpp b/tests/auto/corelib/io/qfile/tst_qfile.cpp
index 440cb832d3..ae80159e88 100644
--- a/tests/auto/corelib/io/qfile/tst_qfile.cpp
+++ b/tests/auto/corelib/io/qfile/tst_qfile.cpp
@@ -3248,14 +3248,14 @@ void tst_QFile::autocloseHandle()
//file is not closed, read should succeed
char buf;
QCOMPARE((int)QT_READ(fd_, &buf, 1), 1);
- ::close(fd_);
+ QT_CLOSE(fd_);
fd_ = -1;
}
{
QFile file("readonlyfile");
QVERIFY(openFile(file, QIODevice::ReadOnly, OpenStream, QFile::AutoCloseHandle));
- int fd = fileno(stream_);
+ int fd = QT_FILENO(stream_);
QCOMPARE(file.handle(), fd);
file.close();
stream_ = 0;
@@ -3270,7 +3270,7 @@ void tst_QFile::autocloseHandle()
{
QFile file("readonlyfile");
QVERIFY(openFile(file, QIODevice::ReadOnly, OpenStream, QFile::DontCloseHandle));
- QCOMPARE(file.handle(), fileno(stream_));
+ QCOMPARE(file.handle(), QT_FILENO(stream_));
file.close();
QCOMPARE(file.handle(), -1);
//file is not closed, read should succeed