From e3e28915c300cef0e997345e1bd74610fc70287f Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Thu, 20 Sep 2018 06:57:54 -0500 Subject: 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 --- src/corelib/thread/qthread_win.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/corelib/thread') diff --git a/src/corelib/thread/qthread_win.cpp b/src/corelib/thread/qthread_win.cpp index caf51722cd..eebaf90d9b 100644 --- a/src/corelib/thread/qthread_win.cpp +++ b/src/corelib/thread/qthread_win.cpp @@ -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; -- cgit v1.2.3