-
Suggestion
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
The comment says it is "only meant as a way to the errors in script". I dunno what that means, but this function is useful, especially if you're trying to create a string for the error message without using streaming operators (and not everyone will know about QDebug::toString() for that purpose, and it also unfortunately prints everything on one line):
/*!
\internal
errorString is only meant as a way to get the errors in script
*/
QString QQmlComponent::errorString() const
{
Q_D(const QQmlComponent);
QString ret;
if(!isError())
return ret;
for (const QQmlError &e : d->state.errors) {
ret += e.url().toString() + QLatin1Char(':') +
QString::number(e.line()) + QLatin1Char(' ') +
e.description() + QLatin1Char('\n');
}
return ret;
}
I actually thought it already was public. ![]()