Qt 4.8
Public Types | Public Functions | Private Functions | Properties | Friends | List of all members
QScriptSyntaxCheckResult Class Reference

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

#include <qscriptengine.h>

Public Types

enum  State { Error, Intermediate, Valid }
 This enum specifies the state of a syntax check. More...
 

Public Functions

int errorColumnNumber () const
 Returns the error column number of this QScriptSyntaxCheckResult, or -1 if there is no error. More...
 
int errorLineNumber () const
 Returns the error line number of this QScriptSyntaxCheckResult, or -1 if there is no error. More...
 
QString errorMessage () const
 Returns the error message of this QScriptSyntaxCheckResult, or an empty string if there is no error. More...
 
QScriptSyntaxCheckResultoperator= (const QScriptSyntaxCheckResult &other)
 Assigns the other result to this QScriptSyntaxCheckResult, and returns a reference to this QScriptSyntaxCheckResult. More...
 
 QScriptSyntaxCheckResult (const QScriptSyntaxCheckResult &other)
 Constructs a new QScriptSyntaxCheckResult from the other result. More...
 
State state () const
 Returns the state of this QScriptSyntaxCheckResult. More...
 
 ~QScriptSyntaxCheckResult ()
 Destroys this QScriptSyntaxCheckResult. More...
 

Private Functions

 QScriptSyntaxCheckResult ()
 
 QScriptSyntaxCheckResult (QScriptSyntaxCheckResultPrivate *d)
 

Properties

QExplicitlySharedDataPointer< QScriptSyntaxCheckResultPrivated_ptr
 

Friends

class QScriptEngine
 
class QScriptEnginePrivate
 

Detailed Description

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

Since
4.5

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

Definition at line 75 of file qscriptengine.h.

Enumerations

◆ State

This enum specifies the state of a syntax check.

  • Error The program contains a syntax error.
  • Intermediate The program is incomplete.
  • Valid The program is a syntactically correct Qt Script program.
Enumerator
Error 
Intermediate 
Valid 

Definition at line 78 of file qscriptengine.h.

Constructors and Destructors

◆ QScriptSyntaxCheckResult() [1/3]

QScriptSyntaxCheckResult::QScriptSyntaxCheckResult ( const QScriptSyntaxCheckResult other)

Constructs a new QScriptSyntaxCheckResult from the other result.

Definition at line 4463 of file qscriptengine.cpp.

4464  : d_ptr(other.d_ptr)
4465 {
4466 }
QExplicitlySharedDataPointer< QScriptSyntaxCheckResultPrivate > d_ptr
Definition: qscriptengine.h:97

◆ ~QScriptSyntaxCheckResult()

QScriptSyntaxCheckResult::~QScriptSyntaxCheckResult ( )

Destroys this QScriptSyntaxCheckResult.

Definition at line 4487 of file qscriptengine.cpp.

4488 {
4489 }

◆ QScriptSyntaxCheckResult() [2/3]

QScriptSyntaxCheckResult::QScriptSyntaxCheckResult ( )
private
Warning
This function is not part of the public interface.

Definition at line 4479 of file qscriptengine.cpp.

4480  : d_ptr(0)
4481 {
4482 }
QExplicitlySharedDataPointer< QScriptSyntaxCheckResultPrivate > d_ptr
Definition: qscriptengine.h:97

◆ QScriptSyntaxCheckResult() [3/3]

QScriptSyntaxCheckResult::QScriptSyntaxCheckResult ( QScriptSyntaxCheckResultPrivate d)
private
Warning
This function is not part of the public interface.

Definition at line 4471 of file qscriptengine.cpp.

4472  : d_ptr(d)
4473 {
4474 }
QExplicitlySharedDataPointer< QScriptSyntaxCheckResultPrivate > d_ptr
Definition: qscriptengine.h:97

Functions

◆ errorColumnNumber()

int QScriptSyntaxCheckResult::errorColumnNumber ( ) const

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

See also
state(), errorLineNumber()

Definition at line 4522 of file qscriptengine.cpp.

4523 {
4525  if (!d)
4526  return -1;
4527  return d->errorColumnNumber;
4528 }
double d
Definition: qnumeric_p.h:62
#define Q_D(Class)
Definition: qglobal.h:2482
The QScriptSyntaxCheckResult class provides the result of a script syntax check.
Definition: qscriptengine.h:75

◆ errorLineNumber()

int QScriptSyntaxCheckResult::errorLineNumber ( ) const

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

See also
state(), errorMessage()

Definition at line 4508 of file qscriptengine.cpp.

4509 {
4511  if (!d)
4512  return -1;
4513  return d->errorLineNumber;
4514 }
double d
Definition: qnumeric_p.h:62
#define Q_D(Class)
Definition: qglobal.h:2482
The QScriptSyntaxCheckResult class provides the result of a script syntax check.
Definition: qscriptengine.h:75

◆ errorMessage()

QString QScriptSyntaxCheckResult::errorMessage ( ) const

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

See also
state(), errorLineNumber()

Definition at line 4536 of file qscriptengine.cpp.

4537 {
4539  if (!d)
4540  return QString();
4541  return d->errorMessage;
4542 }
double d
Definition: qnumeric_p.h:62
The QString class provides a Unicode character string.
Definition: qstring.h:83
#define Q_D(Class)
Definition: qglobal.h:2482
The QScriptSyntaxCheckResult class provides the result of a script syntax check.
Definition: qscriptengine.h:75

◆ operator=()

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

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

Definition at line 4548 of file qscriptengine.cpp.

4549 {
4550  d_ptr = other.d_ptr;
4551  return *this;
4552 }
QExplicitlySharedDataPointer< QScriptSyntaxCheckResultPrivate > d_ptr
Definition: qscriptengine.h:97

◆ state()

QScriptSyntaxCheckResult::State QScriptSyntaxCheckResult::state ( ) const

Returns the state of this QScriptSyntaxCheckResult.

Definition at line 4494 of file qscriptengine.cpp.

Referenced by QScriptDebuggerConsole::consumeInput(), QScriptDebuggerLocalsItemDelegate::validateInput(), and QScriptBreakpointsItemDelegate::validateInput().

4495 {
4497  if (!d)
4498  return Valid;
4499  return d->state;
4500 }
double d
Definition: qnumeric_p.h:62
#define Q_D(Class)
Definition: qglobal.h:2482
The QScriptSyntaxCheckResult class provides the result of a script syntax check.
Definition: qscriptengine.h:75

Friends and Related Functions

◆ QScriptEngine

friend class QScriptEngine
friend

Definition at line 100 of file qscriptengine.h.

◆ QScriptEnginePrivate

friend class QScriptEnginePrivate
friend

Definition at line 101 of file qscriptengine.h.

Properties

◆ d_ptr

QExplicitlySharedDataPointer<QScriptSyntaxCheckResultPrivate> QScriptSyntaxCheckResult::d_ptr
private

Definition at line 97 of file qscriptengine.h.

Referenced by operator=().


The documentation for this class was generated from the following files: