xcb: Replace qCWarning by qCDebug in QXcbConnection::printXcbError()

Example:
Error "BadWindow" (3) is raised by the XCB backend when a mouse event
is processed on a resource that disappears between posting and
processing of the event.
That constellation is harmless and can occur in async environments.

As XCB errors point to coding issues, this patch changes their logging
behavior from qCWarning to qCDebug.

Fixes: QTBUG-56893
Pick-to: 6.4 6.3 5.15
Change-Id: Idee5ee80efaf9cd6686448779f76c68d5e4c9b63
Reviewed-by: Liang Qi <liang.qi@qt.io>
This commit is contained in:
Axel Spoerl 2022-06-14 10:06:34 +02:00 committed by Liang Qi
parent 94207621ee
commit 373392eeb4

View File

@ -449,12 +449,12 @@ void QXcbConnection::printXcbError(const char *message, xcb_generic_error_t *err
uint clamped_error_code = qMin<uint>(error->error_code, (sizeof(xcb_errors) / sizeof(xcb_errors[0])) - 1);
uint clamped_major_code = qMin<uint>(error->major_code, (sizeof(xcb_protocol_request_codes) / sizeof(xcb_protocol_request_codes[0])) - 1);
qCWarning(lcQpaXcb, "%s: %d (%s), sequence: %d, resource id: %d, major code: %d (%s), minor code: %d",
message,
int(error->error_code), xcb_errors[clamped_error_code],
int(error->sequence), int(error->resource_id),
int(error->major_code), xcb_protocol_request_codes[clamped_major_code],
int(error->minor_code));
qCDebug(lcQpaXcb, "%s: %d (%s), sequence: %d, resource id: %d, major code: %d (%s), minor code: %d",
message,
int(error->error_code), xcb_errors[clamped_error_code],
int(error->sequence), int(error->resource_id),
int(error->major_code), xcb_protocol_request_codes[clamped_major_code],
int(error->minor_code));
}
static Qt::MouseButtons translateMouseButtons(int s)