From d527f2b9339e20500be0b1c46d81625ba0583895 Mon Sep 17 00:00:00 2001 From: Janne Anttila Date: Tue, 19 Jun 2012 11:11:13 +0300 Subject: Fix qfile autotest build for WEC7 Change-Id: I6c4b4c91ea841ccb91ad685510caaecaf51baced Reviewed-by: Andreas Holzammer Reviewed-by: Shane Kearns --- tests/auto/corelib/io/qfile/test/test.pro | 2 ++ tests/auto/corelib/io/qfile/tst_qfile.cpp | 6 +++--- 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 -- cgit v1.2.3