Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qv4qmlcontext.cpp File Reference
#include "qv4qmlcontext_p.h"
#include <private/qjsvalue_p.h>
#include <private/qqmlcontext_p.h>
#include <private/qqmlengine_p.h>
#include <private/qqmlglobal_p.h>
#include <private/qqmljavascriptexpression_p.h>
#include <private/qqmllistwrapper_p.h>
#include <private/qqmltypewrapper_p.h>
#include <private/qv4compileddata_p.h>
#include <private/qv4engine_p.h>
#include <private/qv4function_p.h>
#include <private/qv4identifiertable_p.h>
#include <private/qv4lookup_p.h>
#include <private/qv4mm_p.h>
#include <private/qv4module_p.h>
#include <private/qv4objectproto_p.h>
#include <private/qv4qobjectwrapper_p.h>
#include <private/qv4stackframe_p.h>
#include <private/qv4value_p.h>
#include <QtCore/qloggingcategory.h>
+ Include dependency graph for qv4qmlcontext.cpp:

Go to the source code of this file.

Functions

QT_BEGIN_NAMESPACE Q_LOGGING_CATEGORY (lcQmlContext, "qt.qml.context")
 
 DEFINE_OBJECT_VTABLE (QQmlContextWrapper)
 
 DEFINE_MANAGED_VTABLE (QmlContext)
 
static OptionalReturnedValue searchContextProperties (QV4::ExecutionEngine *v4, const QQmlRefPointer< QQmlContextData > &context, String *name, bool *hasProperty, Value *base, QV4::Lookup *lookup, QV4::Lookup *originalLookup, QQmlEnginePrivate *ep)
 
template<typename Lookup >
bool performLookup (ScopedValue *result, bool *hasProperty, const Lookup &lookup)
 
static QV4::QObjectWrapper::Flags getQmlPropertyFlags (const Lookup *l)
 
static ReturnedValue revertObjectPropertyLookup (Lookup *l, ExecutionEngine *engine, Value *base)
 
static ReturnedValue revertObjectMethodLookup (Lookup *l, ExecutionEngine *engine, Value *base)
 
template<typename Call >
ReturnedValue callWithScopeObject (ExecutionEngine *engine, Value *base, Call c)
 
template<typename Call >
ReturnedValue callWithContextObject (ExecutionEngine *engine, Value *base, Call c)
 

Function Documentation

◆ callWithContextObject()

template<typename Call >
ReturnedValue callWithContextObject ( ExecutionEngine engine,
Value base,
Call  c 
)

Definition at line 660 of file qv4qmlcontext.cpp.

References base, context, engine, qmlContext(), QV4::Encode::undefined(), QQmlData::wasDeleted(), and QV4::QObjectWrapper::wrap().

Referenced by QV4::QQmlContextWrapper::lookupContextObjectMethod(), and QV4::QQmlContextWrapper::lookupContextObjectProperty().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ callWithScopeObject()

template<typename Call >
ReturnedValue callWithScopeObject ( ExecutionEngine engine,
Value base,
Call  c 
)

Definition at line 613 of file qv4qmlcontext.cpp.

References base, engine, qmlContext(), QV4::Encode::undefined(), QQmlData::wasDeleted(), and QV4::QObjectWrapper::wrap().

Referenced by QV4::QQmlContextWrapper::lookupScopeObjectMethod(), and QV4::QQmlContextWrapper::lookupScopeObjectProperty().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DEFINE_MANAGED_VTABLE()

DEFINE_MANAGED_VTABLE ( QmlContext  )

◆ DEFINE_OBJECT_VTABLE()

DEFINE_OBJECT_VTABLE ( QQmlContextWrapper  )

◆ getQmlPropertyFlags()

static QV4::QObjectWrapper::Flags getQmlPropertyFlags ( const Lookup l)
static

Definition at line 107 of file qv4qmlcontext.cpp.

References QV4::QObjectWrapper::AttachMethods, QV4::QObjectWrapper::CheckRevision, and QV4::Lookup::forCall.

Referenced by QV4::QQmlContextWrapper::getPropertyAndBase(), and QV4::QQmlContextWrapper::lookupInParentContextHierarchy().

+ Here is the caller graph for this function:

◆ performLookup()

template<typename Lookup >
bool performLookup ( ScopedValue result,
bool *  hasProperty,
const Lookup lookup 
)

Definition at line 96 of file qv4qmlcontext.cpp.

Referenced by QV4::QQmlContextWrapper::getPropertyAndBase().

+ Here is the caller graph for this function:

◆ Q_LOGGING_CATEGORY()

QT_BEGIN_NAMESPACE Q_LOGGING_CATEGORY ( lcQmlContext  ,
"qt.qml.context"   
)

◆ revertObjectMethodLookup()

static ReturnedValue revertObjectMethodLookup ( Lookup l,
ExecutionEngine engine,
Value base 
)
static

Definition at line 604 of file qv4qmlcontext.cpp.

References base, engine, QV4::Lookup::propertyCache, QV4::Lookup::qmlContextPropertyGetter, QV4::Lookup::qobjectMethodLookup, QQmlRefCounted< T >::release(), and QV4::QQmlContextWrapper::resolveQmlContextPropertyLookupGetter().

Referenced by QV4::QQmlContextWrapper::lookupContextObjectMethod(), and QV4::QQmlContextWrapper::lookupScopeObjectMethod().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ revertObjectPropertyLookup()

static ReturnedValue revertObjectPropertyLookup ( Lookup l,
ExecutionEngine engine,
Value base 
)
static

Definition at line 596 of file qv4qmlcontext.cpp.

References base, engine, QV4::Lookup::propertyCache, QV4::Lookup::qmlContextPropertyGetter, QV4::Lookup::qobjectLookup, QQmlRefCounted< T >::release(), and QV4::QQmlContextWrapper::resolveQmlContextPropertyLookupGetter().

Referenced by QV4::QQmlContextWrapper::lookupContextObjectProperty(), and QV4::QQmlContextWrapper::lookupScopeObjectProperty().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ searchContextProperties()

static OptionalReturnedValue searchContextProperties ( QV4::ExecutionEngine v4,
const QQmlRefPointer< QQmlContextData > &  context,
String name,
bool *  hasProperty,
Value base,
QV4::Lookup lookup,
QV4::Lookup originalLookup,
QQmlEnginePrivate ep 
)
static