summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2017-06-29 21:18:04 -0700
committerThiago Macieira <thiago.macieira@intel.com>2017-07-18 15:51:22 +0000
commitf3205a49498d3084f46bc2c2abcd085c8436553b (patch)
tree74556aab75224d973fc8a1e2e77135fb0793229f /tests/auto
parentc0bd7ade1aa49ed6877e5f13a74bcb72ff662062 (diff)
Merge qt_error_string and QSystemError
This removes a lot of duplicated code that existed in both qglobal.cpp and qsystemerror.cpp, including the hack to get the correct strerror_r signature. This removes the incorrect use of EACCES, EMFILE, ENOENT, and ENOSPC from qt_error_string on Windows. qt_error_string is supposed to be used only with Win32 error codes from GetLastError(), despite there being a lot of uses in cross-platform and even Windows-specific code that pass errno constants. It may or may not work: that depends on whether the constants happen to match. ENOENT matches ERROR_FILE_NOT_FOUND and one could argue that ENOSPC matching ERROR_OUT_OF_PAPER is acceptable, but EMFILE isn't the same as ERROR_BAD_LENGTH nor is EACCES, ERROR_INVALID_DATA. Change-Id: I1eba2b016de74620bfc8fffd14cccb7f77f4b510 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/tools/qmakelib/evaltest.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/auto/tools/qmakelib/evaltest.cpp b/tests/auto/tools/qmakelib/evaltest.cpp
index 4e215b8570..03fd4753fd 100644
--- a/tests/auto/tools/qmakelib/evaltest.cpp
+++ b/tests/auto/tools/qmakelib/evaltest.cpp
@@ -2303,7 +2303,11 @@ 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")