Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
exampleqjsengine.cpp File Reference

(0dc4fd240a2897c5c443a0ef6d84c416843e4938)

Go to the source code of this file.

Functions

val property ("f")
 
 qDebug ()<< engine.hasError()
 [1]
 
QJSManagedValue managed (std::move(val), &engine)
 
 Q_ASSERT (error.toInt(), 42)
 

Variables

QJSEngine engine
 [qjs-engine-example]
 
auto val = engine.evaluate("let o = { get f() {throw 42;} }; o")
 
QJSValue error = engine.catchError()
 

Function Documentation

◆ managed()

QJSManagedValue managed ( std::move(val) ,
& engine )

Referenced by QV4::Value::cast(), QV4::Value::cast(), QJSValuePrivate::encode(), QJSManagedValue::prototype(), and writeToConsole().

+ Here is the caller graph for this function:

◆ property()

val property ( "f" )

◆ Q_ASSERT()

Q_ASSERT ( error. toInt(),
42  )

◆ qDebug()

qDebug ( )

[1]

[7]

[toString]

Variable Documentation

◆ engine

QJSEngine engine

[qjs-engine-example]

Definition at line 6 of file exampleqjsengine.cpp.

◆ error

QJSValue error = engine.catchError()

Definition at line 18 of file exampleqjsengine.cpp.

◆ val

val = engine.evaluate("let o = { get f() {throw 42;} }; o")

Definition at line 8 of file exampleqjsengine.cpp.