86 Message debugMessageToString(const QOpenGLDebugMessage& glmessage) |
86 Message debugMessageToString(const QOpenGLDebugMessage& glmessage) |
87 { |
87 { |
88 QString text; |
88 QString text; |
89 QTextStream stream{&text}; |
89 QTextStream stream{&text}; |
90 stream << QObject::tr("OpenGL debug message [%1]").arg(glmessage.id()) << "\n"; |
90 stream << QObject::tr("OpenGL debug message [%1]").arg(glmessage.id()) << "\n"; |
91 stream << QObject::tr("Source: %1\n").arg(sourceToString(glmessage.source())); |
91 stream << QObject::tr("Source: %1, ").arg(sourceToString(glmessage.source())); |
92 stream << QObject::tr("Type: %1\n").arg(typeToString(glmessage.type())); |
92 stream << QObject::tr("type: %1, ").arg(typeToString(glmessage.type())); |
93 stream << QObject::tr("Severity: %1\n").arg(severityToString(glmessage.severity())); |
93 stream << QObject::tr("severity: %1\n").arg(severityToString(glmessage.severity())); |
94 stream << glmessage.message(); |
94 stream << glmessage.message(); |
95 return Message{ |
95 return Message{ |
96 .time = QDateTime::currentDateTime(), |
96 .time = QDateTime::currentDateTime(), |
97 .type = severityToMessageType(glmessage.severity()), |
97 .type = severityToMessageType(glmessage.severity()), |
98 .text = text, |
98 .text = text, |