diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp index d69b1d346f..eb8dd73727 100644 --- a/src/corelib/global/qglobal.cpp +++ b/src/corelib/global/qglobal.cpp @@ -2988,7 +2988,7 @@ QString qt_error_string(int errorCode) // Retrieve the system error message for the last-error code. # ifndef Q_OS_WINRT wchar_t *string = 0; - FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER|FORMAT_MESSAGE_FROM_SYSTEM, + FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS | FORMAT_MESSAGE_ALLOCATE_BUFFER, NULL, errorCode, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),