summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJanne Anttila <janne.anttila@digia.com>2012-06-19 11:11:13 +0300
committerQt by Nokia <qt-info@nokia.com>2012-06-21 00:58:16 +0200
commitd527f2b9339e20500be0b1c46d81625ba0583895 (patch)
tree9baac7a069c03f65f87fede21b76da3400ebf0a5
parentd8ad5161509d5fe58e67621a3deb48651e57b270 (diff)
Fix qfile autotest build for WEC7
Change-Id: I6c4b4c91ea841ccb91ad685510caaecaf51baced Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com> Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
-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