diff --git a/src/corelib/kernel/qfunctions_winrt_p.h b/src/corelib/kernel/qfunctions_winrt_p.h index aa32747bc8..d98571906e 100644 --- a/src/corelib/kernel/qfunctions_winrt_p.h +++ b/src/corelib/kernel/qfunctions_winrt_p.h @@ -118,7 +118,7 @@ static inline HRESULT _await_impl(const Microsoft::WRL::ComPtr &asyncOp, Awai while (SUCCEEDED(hr = asyncInfo->get_Status(&status)) && status == AsyncStatus::Started) { QCoreApplication::processEvents(); if (timeout && t.hasExpired(timeout)) - return ERROR_TIMEOUT; + return HRESULT_FROM_WIN32(ERROR_TIMEOUT); } break; case ProcessThreadEvents: @@ -126,7 +126,7 @@ static inline HRESULT _await_impl(const Microsoft::WRL::ComPtr &asyncOp, Awai while (SUCCEEDED(hr = asyncInfo->get_Status(&status)) && status == AsyncStatus::Started) { dispatcher->processEvents(QEventLoop::AllEvents); if (timeout && t.hasExpired(timeout)) - return ERROR_TIMEOUT; + return HRESULT_FROM_WIN32(ERROR_TIMEOUT); } break; } @@ -136,7 +136,7 @@ static inline HRESULT _await_impl(const Microsoft::WRL::ComPtr &asyncOp, Awai while (SUCCEEDED(hr = asyncInfo->get_Status(&status)) && status == AsyncStatus::Started) { QThread::yieldCurrentThread(); if (timeout && t.hasExpired(timeout)) - return ERROR_TIMEOUT; + return HRESULT_FROM_WIN32(ERROR_TIMEOUT); } break; }