fix: Print a warning message if the Xcb EGL initialize failed

Before, No matter what the value of "success" is, Will print
the "Xcb EGL gl-integration successfully initialized".
If egl initialization fails, this line of printing will be very
confusing.

Change-Id: I6a06e2c14372913823c56ffe2fd8b831e084c719
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
This commit is contained in:
JiDe Zhang 2021-02-03 14:32:43 +08:00
parent d984fd13ad
commit cc7911beb1

View File

@ -87,7 +87,11 @@ bool QXcbEglIntegration::initialize(QXcbConnection *connection)
m_native_interface_handler.reset(new QXcbEglNativeInterfaceHandler(connection->nativeInterface()));
qCDebug(lcQpaGl) << "Xcb EGL gl-integration successfully initialized";
if (success)
qCDebug(lcQpaGl) << "Xcb EGL gl-integration successfully initialized";
else
qCWarning(lcQpaGl) << "Xcb EGL gl-integration initialize failed";
return success;
}