QScriptSyntaxCheckResult Class

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

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

Public Types

enum State { Error, Intermediate, Valid }

Public Functions

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

Detailed Description

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.

Member Type Documentation

enum QScriptSyntaxCheckResult::State

This enum specifies the state of a syntax check.

Constant Value Description
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.

Member Function Documentation

QScriptSyntaxCheckResult::QScriptSyntaxCheckResult(const QScriptSyntaxCheckResult &other)

Constructs a new QScriptSyntaxCheckResult from the other result.

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.

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

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

Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
FREE!
create apps
create games
cross platform
native performance
3rd party services
game network
multiplayer
level editor
easiest to learn
biggest time saving
best support