Showing the changes to libraries/script-engine/src/ScriptEngine.cpp (1 of 2 files). Show all
Unified · Split
| @@ -575,9 +575,9 @@ QScriptValue ScriptEngine::evaluate(const QString& sourceCode, const QString& fi · 574 unmodified lines | |||
| 575 | return result; | 575 | return result; |
| 576 | } | 576 | } |
| 577 | 577 | ||
| 578 | // Check synthax | 578 | // Check syntax |
| 579 | const QScriptProgram program(sourceCode, fileName, lineNumber); | 579 | const QScriptProgram program(sourceCode, fileName, lineNumber); |
| 580 | if (!checkSynthax(program)) { | 580 | if (!checkSyntax(program)) { |
| 581 | return QScriptValue(); | 581 | return QScriptValue(); |
| 582 | } | 582 | } |
| 583 | 583 | ||
| @@ -892,7 +892,7 @@ void ScriptEngine::load(const QString& loadFile) { · 308 unmodified lines | |||
| 892 | } | 892 | } |
| 893 | 893 | ||
| 894 | 894 | ||
| 895 | bool ScriptEngine::checkSynthax(const QScriptProgram& program) { | 895 | bool ScriptEngine::checkSyntax(const QScriptProgram& program) { |
| 896 | const auto syntaxCheck = QScriptEngine::checkSyntax(program.sourceCode()); | 896 | const auto syntaxCheck = QScriptEngine::checkSyntax(program.sourceCode()); |
| 897 | if (syntaxCheck.state() != QScriptSyntaxCheckResult::Valid) { | 897 | if (syntaxCheck.state() != QScriptSyntaxCheckResult::Valid) { |
| 898 | const auto error = syntaxCheck.errorMessage(); | 898 | const auto error = syntaxCheck.errorMessage(); |