QScriptSyntaxCheckResult Class

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

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

公共类型

enum State { Error, Intermediate, Valid }

公共函数

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

详细描述

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

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

成员类型文档编制

enum QScriptSyntaxCheckResult:: State

This enum specifies the state of a syntax check.

常量 描述
QScriptSyntaxCheckResult::Error 0 The program contains a syntax error.
QScriptSyntaxCheckResult::Intermediate 1 The program is incomplete.
QScriptSyntaxCheckResult::Valid 2 The program is a syntactically correct Qt Script program.

成员函数文档编制

QScriptSyntaxCheckResult:: QScriptSyntaxCheckResult (const QScriptSyntaxCheckResult & other )

构造新的 QScriptSyntaxCheckResult other 结果。

QScriptSyntaxCheckResult:: ~QScriptSyntaxCheckResult ()

销毁此 QScriptSyntaxCheckResult .

int QScriptSyntaxCheckResult:: errorColumnNumber () const

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

另请参阅 state () 和 errorLineNumber ().

int QScriptSyntaxCheckResult:: errorLineNumber () const

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

另请参阅 state () 和 errorMessage ().

QString QScriptSyntaxCheckResult:: errorMessage () const

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

另请参阅 state () 和 errorLineNumber ().

QScriptSyntaxCheckResult::State QScriptSyntaxCheckResult:: state () const

Returns the state of this QScriptSyntaxCheckResult .

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

赋值 other result to this QScriptSyntaxCheckResult , and returns a reference to this QScriptSyntaxCheckResult .