QScriptSyntaxCheckResult Class

The QScriptSyntaxCheckResult class provides the result of a script syntax check. More...

Header: #include <QScriptSyntaxCheckResult>
qmake: QT += script
Since: Qt 4.5

This class was introduced in Qt 4.5.

Public Types

enum State { Error, Intermediate, Valid }

Public Functions

QScriptSyntaxCheckResult(const QScriptSyntaxCheckResult &other)
QScriptSyntaxCheckResult &operator=(const QScriptSyntaxCheckResult &other)
~QScriptSyntaxCheckResult()
int errorColumnNumber() const
int errorLineNumber() const
QString errorMessage() const
QScriptSyntaxCheckResult::State state() const

Detailed Description

QScriptSyntaxCheckResult is returned by QScriptEngine::checkSyntax() to provide information about the syntactical (in)correctness of a script.

Member Type Documentation

enum QScriptSyntaxCheckResult::State

This enum specifies the state of a syntax check.

ConstantValueDescription
QScriptSyntaxCheckResult::Error0The program contains a syntax error.
QScriptSyntaxCheckResult::Intermediate1The program is incomplete.
QScriptSyntaxCheckResult::Valid2The program is a syntactically correct Qt Script program.

Member Function Documentation

QScriptSyntaxCheckResult::QScriptSyntaxCheckResult(const QScriptSyntaxCheckResult &other)

Constructs a new QScriptSyntaxCheckResult from the other result.

QScriptSyntaxCheckResult &QScriptSyntaxCheckResult::operator=(const QScriptSyntaxCheckResult &other)

Assigns the other result to this QScriptSyntaxCheckResult, and returns a reference to this QScriptSyntaxCheckResult.

QScriptSyntaxCheckResult::~QScriptSyntaxCheckResult()

Destroys this QScriptSyntaxCheckResult.

int QScriptSyntaxCheckResult::errorColumnNumber() const

Returns the error column number of this QScriptSyntaxCheckResult, or -1 if there is no error.

See also state() and errorLineNumber().

int QScriptSyntaxCheckResult::errorLineNumber() const

Returns the error line number of this QScriptSyntaxCheckResult, or -1 if there is no error.

See also state() and errorMessage().

QString QScriptSyntaxCheckResult::errorMessage() const

Returns the error message of this QScriptSyntaxCheckResult, or an empty string if there is no error.

See also state() and errorLineNumber().

QScriptSyntaxCheckResult::State QScriptSyntaxCheckResult::state() const

Returns the state of this QScriptSyntaxCheckResult.

© 2021 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.