void QmlDirParser::reportError(quint16 line, quint16 column, const QString &description) { QmlError error; error.setLine(line); error.setColumn(column); error.setDescription(description); _errors.append(error); }
void QmlDirParser::reportError(int line, int column, const QString &description) { QmlError error; error.setUrl(_url); error.setLine(line); error.setColumn(column); error.setDescription(description); _errors.append(error); }
QList<QmlError> QmlDirParser::errors(const QString &uri) const { QUrl url(uri); QList<QmlError> errors; const int numErrors = _errors.size(); errors.reserve(numErrors); for (int i = 0; i < numErrors; ++i) { const QmlJS::DiagnosticMessage &msg = _errors.at(i); QmlError e; QString description = msg.message; description.replace(QLatin1String("$$URI$$"), uri); e.setDescription(description); e.setUrl(url); e.setLine(msg.loc.startLine); e.setColumn(msg.loc.startColumn); errors << e; } return errors; }