Improve opengl debug messages

Summary: Don't include the \n at the end of the debug messages

Test Plan: Now I can see the debug errors without an empty line below

Reviewers: #kwin, zzag

Reviewed By: #kwin, zzag

Subscribers: zzag, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D29684
This commit is contained in:
Aleix Pol 2020-05-15 12:24:36 +02:00
parent 1b7fd0db3f
commit da81b0f86c

View file

@ -411,8 +411,9 @@ void SceneOpenGL::initDebugOutput()
Q_UNUSED(source)
Q_UNUSED(severity)
Q_UNUSED(userParam)
while (message[length] == '\n' || message[length] == '\r')
while (length && std::isspace(message[length - 1])) {
--length;
}
switch (type) {
case GL_DEBUG_TYPE_ERROR: