Prevent QOpenGLShaderProgram::link() from showing unnecessary warnings.
If the liking didn't fail there's no need to print out warnings. The
warnings can still be accessed by the application after calling link()
through the log() function.
This prevents warnings such as these from appearing:
QOpenGLShader:🔗 "No errors."
Task-number: QTBUG-31326
Change-Id: I03c9be5dfada8822c3ab1c3610eac2fc0a91410b
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
This commit is contained in:
parent
6359f42064
commit
9ae5162b3c
@ -907,11 +907,13 @@ bool QOpenGLShaderProgram::link()
|
||||
GLint len;
|
||||
d->glfuncs->glGetProgramInfoLog(program, value, &len, logbuf);
|
||||
d->log = QString::fromLatin1(logbuf);
|
||||
QString name = objectName();
|
||||
if (name.isEmpty())
|
||||
qWarning() << "QOpenGLShader::link:" << d->log;
|
||||
else
|
||||
qWarning() << "QOpenGLShader::link[" << name << "]:" << d->log;
|
||||
if (!d->linked) {
|
||||
QString name = objectName();
|
||||
if (name.isEmpty())
|
||||
qWarning() << "QOpenGLShader::link:" << d->log;
|
||||
else
|
||||
qWarning() << "QOpenGLShader::link[" << name << "]:" << d->log;
|
||||
}
|
||||
delete [] logbuf;
|
||||
}
|
||||
return d->linked;
|
||||
|
@ -957,10 +957,12 @@ bool QGLShaderProgram::link()
|
||||
d->glfuncs->glGetProgramInfoLog(program, value, &len, logbuf);
|
||||
d->log = QString::fromLatin1(logbuf);
|
||||
QString name = objectName();
|
||||
if (name.isEmpty())
|
||||
qWarning() << "QGLShader::link:" << d->log;
|
||||
else
|
||||
qWarning() << "QGLShader::link[" << name << "]:" << d->log;
|
||||
if (!d->linked) {
|
||||
if (name.isEmpty())
|
||||
qWarning() << "QGLShader::link:" << d->log;
|
||||
else
|
||||
qWarning() << "QGLShader::link[" << name << "]:" << d->log;
|
||||
}
|
||||
delete [] logbuf;
|
||||
}
|
||||
return d->linked;
|
||||
|
Loading…
Reference in New Issue
Block a user