Updated the QML/JS front-end.

Reviewed-by: Christian Kamm
This commit is contained in:
Roberto Raggi
2010-10-19 16:08:44 +02:00
parent 1fb5ffa00f
commit 5e28dad574
9 changed files with 197 additions and 220 deletions

View File

@@ -170,10 +170,9 @@ bool QmlDirParser::parse()
const int dotIndex = version.indexOf(QLatin1Char('.'));
if (dotIndex == -1) {
qWarning() << "expected '.'"; // ### use reportError
reportError(lineNumber, -1, QLatin1String("expected '.'"));
} else if (version.indexOf(QLatin1Char('.'), dotIndex + 1) != -1) {
qWarning() << "unexpected '.'"; // ### use reportError
reportError(lineNumber, -1, QLatin1String("unexpected '.'"));
} else {
bool validVersionNumber = false;
const int majorVersion = version.left(dotIndex).toInt(&validVersionNumber);
@@ -189,8 +188,8 @@ bool QmlDirParser::parse()
}
}
} else {
// ### use reportError
qWarning() << "a component declaration requires 3 arguments, but" << (sectionCount + 1) << "were provided";
reportError(lineNumber, -1,
QString::fromUtf8("a component declaration requires 3 arguments, but %1 were provided").arg(sectionCount + 1));
}
}