summaryrefslogtreecommitdiffstats
path: root/tests/auto/tools/qmakelib/evaltest.cpp
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@qt.io>2016-10-28 20:10:40 +0200
committerOswald Buddenhagen <oswald.buddenhagen@qt.io>2018-03-29 18:14:58 +0000
commite2de837198884b64345f746ef257e6d83bffa571 (patch)
tree18385813951e64b769d32bb35e331cdf673c30a8 /tests/auto/tools/qmakelib/evaltest.cpp
parentfe5f2a235cd51020c04570ec3f37070f6be7a1a3 (diff)
qmake: let QMakeVfs::readFile() report ENOFILE explicitly
when the QFile object is already constructed, querying whether the file exists is actually cheap, so do it right away instead of later on demand. that makes the calling code a bit cleaner. fwiw, that we need to explicitly query the file's existence at all is a result of QFile's completely useless error "codes" (which merely say which function failed, as if the caller would not know). Change-Id: Ifec39d05b1713d8128046f679287e510f10e45dc Reviewed-by: Tobias Hunger <tobias.hunger@qt.io> (cherry picked from qtcreator/5ba32e3484ead2e35cc7732dcd59a97e7459dbfd) Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'tests/auto/tools/qmakelib/evaltest.cpp')
-rw-r--r--tests/auto/tools/qmakelib/evaltest.cpp4
1 files changed, 0 insertions, 4 deletions
diff --git a/tests/auto/tools/qmakelib/evaltest.cpp b/tests/auto/tools/qmakelib/evaltest.cpp
index abb7a1a964..3fdd30b685 100644
--- a/tests/auto/tools/qmakelib/evaltest.cpp
+++ b/tests/auto/tools/qmakelib/evaltest.cpp
@@ -2375,11 +2375,7 @@ void tst_qmakelib::addTestFunctions(const QString &qindir)
QTest::newRow("include(): fail")
<< "include(include/nope.pri): OK = 1"
<< "OK = UNDEF"
-#ifdef Q_OS_WIN
- << "Cannot read " + m_indir + "/include/nope.pri: The system cannot find the file specified."
-#else
<< "Cannot read " + m_indir + "/include/nope.pri: No such file or directory"
-#endif
<< true;
QTest::newRow("include(): silent fail")