qErrnoWarning: downgrade from critical to warning

The name says it's a warning, it's pretty unexpected that it should
lead to a critical message.

One case where this is a problem is QTBUG-48488
where merely printing with "Microsoft Print To PDF" and canceling
the file dialog leads to "QWin32PrintEngine::begin: StartDoc failed"
as a *critical* message. Some Windows applications have a message
handler that shows a msgbox in case of a critical message,
and getting such a msgbox after canceling the file dialog seems very
wrong.

Task-number: QTBUG-48488
Pick-to: 6.7
Change-Id: I1c842340dd2faf2be6e64e0522f9e2b33547d3cf
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
David Faure 2024-03-04 16:40:58 +01:00
parent c11beb8d32
commit 30225da91f

View File

@ -2075,7 +2075,7 @@ void qErrnoWarning(const char *msg, ...)
buf += " ("_L1 + error_string + u')';
QMessageLogContext context;
qt_message_output(QtCriticalMsg, context, buf);
qt_message_output(QtWarningMsg, context, buf);
}
void qErrnoWarning(int code, const char *msg, ...)
@ -2089,7 +2089,7 @@ void qErrnoWarning(int code, const char *msg, ...)
buf += " ("_L1 + qt_error_string(code) + u')';
QMessageLogContext context;
qt_message_output(QtCriticalMsg, context, buf);
qt_message_output(QtWarningMsg, context, buf);
}
/*!