This commit is contained in:
Atlante45 2015-10-26 10:49:41 -07:00
parent c8c9118d4d
commit 13b7fa6b5d
2 changed files with 4 additions and 4 deletions

View file

@ -575,9 +575,9 @@ QScriptValue ScriptEngine::evaluate(const QString& sourceCode, const QString& fi
return result;
}
// Check synthax
// Check syntax
const QScriptProgram program(sourceCode, fileName, lineNumber);
if (!checkSynthax(program)) {
if (!checkSyntax(program)) {
return QScriptValue();
}
@ -892,7 +892,7 @@ void ScriptEngine::load(const QString& loadFile) {
}
bool ScriptEngine::checkSynthax(const QScriptProgram& program) {
bool ScriptEngine::checkSyntax(const QScriptProgram& program) {
const auto syntaxCheck = QScriptEngine::checkSyntax(program.sourceCode());
if (syntaxCheck.state() != QScriptSyntaxCheckResult::Valid) {
const auto error = syntaxCheck.errorMessage();

View file

@ -182,7 +182,7 @@ private:
QObject* setupTimerWithInterval(const QScriptValue& function, int intervalMS, bool isSingleShot);
void stopTimer(QTimer* timer);
static bool checkSynthax(const QScriptProgram& program);
static bool checkSyntax(const QScriptProgram& program);
static bool checkExceptions(QScriptEngine* engine, const QString& fileName);
AbstractControllerScriptingInterface* _controllerScriptingInterface;