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
Change-Id: I1c842340dd2faf2be6e64e0522f9e2b33547d3cf
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 30225da91f89f7c0356bbc930896ee3e14319aae)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
David Faure 2024-03-04 16:40:58 +01:00 committed by Qt Cherry-pick Bot
parent 113ecff9f2
commit 12c69ad04d

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);
}
/*!