summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/io/qfile/tst_qfile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/corelib/io/qfile/tst_qfile.cpp')
-rw-r--r--tests/auto/corelib/io/qfile/tst_qfile.cpp6
1 files changed, 3 insertions, 3 deletions
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