Fix erroneous use of errno with qErrnoWarning

On Windows, the error code to be used with qErrnoWarning is not errno,
but Windows's GetLastError(). Obviously, right?

So don't pass errno to it, just let it get the error message straight
from qt_error_string(), which will use GetLastError().

Change-Id: I44e7d800c68141bdaae0fffd155619c93e3f3dab
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
This commit is contained in:
Thiago Macieira 2018-09-20 06:57:54 -05:00
parent 7e1a0c0739
commit e3e28915c3

View File

@ -511,7 +511,7 @@ void QThread::start(Priority priority)
#endif // Q_OS_WINRT
if (!d->handle) {
qErrnoWarning(errno, "QThread::start: Failed to create thread");
qErrnoWarning("QThread::start: Failed to create thread");
d->running = false;
d->finished = true;
return;