Details
Description
qglobal.cpp
QString qt_error_string(int errorCode) { ... #elif !defined(QT_NO_THREAD) && defined(_POSIX_THREAD_SAFE_FUNCTIONS) && _POSIX_VERSION >= 200112L && !defined(Q_OS_INTEGRITY) && !defined(Q_OS_QNX) QByteArray buf(1024, '\0'); strerror_r(errorCode, buf.data(), buf.size()); ret = QString::fromLocal8Bit(buf.constData()); #else ret = QString::fromLocal8Bit(strerror(errorCode)); #endif ... }
The GNU-specific strerror_r() function so does not work, and in the buffer (buf) writes nothing.
man strerror >
The GNU-specific strerror_r() returns a pointer to a string containing the error message. This may be either a pointer to a string that the function stores in buf, or a pointer to some (immutable) static string (in which case buf is unused).
*****************************************************************************************
And as a result we will not see any message if we will try to print out it as follows
fprintf(stderr, "%s\n", qt_error_string(ENAMETOOLONG).toLocal8Bit().constData());