6#include <private/qmetaobject_p.h>
7#include <private/qmetaobjectbuilder_p.h>
10#include <private/qqmlprofiler_p.h>
11#include <private/qqmldebugconnector_p.h>
12#include <private/qqmldebugserviceinterfaces_p.h>
15#include <private/qjsvalue_p.h>
16#include <private/qv4value_p.h>
17#include <private/qv4jscall_p.h>
18#include <private/qv4qobjectwrapper_p.h>
19#include <private/qv4qmlcontext_p.h>
21#include <QtCore/qdebug.h>
23#include <qtqml_tracepoints_p.h>
49 if (parameterString.isEmpty()) {
56 if (!
error.isEmpty()) {
61 function += parameterString;
68 setupFunction(
context,
f->function());
82 if (!function->isClosureWrapper()) {
84 if (!signalParameters.isEmpty()) {
87 if (!
error.isEmpty()) {
91 function->updateInternalClass(
engine, signalParameters);
99 if (
auto closure = function->nestedFunction()) {
109 if (function->isClosureWrapper()) {
110 bool isUndefined =
false;
116 Q_ASSERT(
result->function()->compilationUnit == function->compilationUnit);
124void QQmlBoundSignalExpression::init(
const QQmlRefPointer<QQmlContextData> &ctxt,
QObject *scope)
151 if (expressionFunctionValid())
160 if (!expressionFunctionValid())
178 const QMetaObject *targetMeta = m_target->metaObject();
186 for (
int i = 0;
i < argCount; ++
i) {
198 void *ignoredResult =
nullptr;
236void QQmlBoundSignal::addToObject(
QObject *
obj)
243 m_nextSignal =
data->signalHandlers;
244 if (m_nextSignal) m_nextSignal->m_prevSignal = &m_nextSignal;
245 m_prevSignal = &
data->signalHandlers;
246 data->signalHandlers =
this;
252 *m_prevSignal = m_nextSignal;
253 if (m_nextSignal) m_nextSignal->m_prevSignal = m_prevSignal;
254 m_prevSignal =
nullptr;
255 m_nextSignal =
nullptr;
264 return m_expression.
data();
274 m_expression.
adopt(e);
298 if (!
s->m_expression || !
s->m_enabled)
301 QV4DebugService *service = QQmlDebugConnector::service<QV4DebugService>();
304 s->m_expression->target()->metaObject(),
305 s->signalIndex()).methodSignature()));
308 if (
s->m_expression && (
engine =
s->m_expression->engine())) {
310 s->m_expression->function() ?
s->m_expression->function()->name()->toQString() :
QString(),
311 s->m_expression->sourceLocation().sourceFile,
s->m_expression->sourceLocation().line,
312 s->m_expression->sourceLocation().column);
314 s->m_expression.data());
315 s->m_expression->evaluate(
a);
316 if (
s->m_expression &&
s->m_expression->hasError()) {
327 This->expression->
evaluate(
nullptr);
330 expression.adopt(expr);
QV4::ExecutionEngine * handle() const
~QQmlBoundSignalExpression() override
QString expressionIdentifier() const override
QQmlBoundSignalExpression(const QObject *target, int index, const QQmlRefPointer< QQmlContextData > &ctxt, QObject *scope, const QString &expression, const QString &fileName, quint16 line, quint16 column, const QString &handlerName=QString(), const QString ¶meterString=QString())
QString expression() const
void expressionChanged() override
void setEnabled(bool enabled)
This property holds whether the item will emit signals.
void takeExpression(QQmlBoundSignalExpression *)
Sets the signal expression to e.
QQmlBoundSignalExpression * expression() const
Returns the signal expression.
static QQmlData * get(QObjectPrivate *priv, bool create)
void warning(const QQmlError &)
static QQmlEnginePrivate * get(QQmlEngine *e)
void referenceScarceResources()
void dereferenceScarceResources()
The QQmlEngine class provides an environment for instantiating QML components.
QQmlContext * rootContext() const
Returns the engine's root context.
void setNotifyOnValueChanged(bool v)
void setupFunction(QV4::ExecutionContext *qmlContext, QV4::Function *f)
QObject * scopeObject() const
QV4::ReturnedValue evaluate(bool *isUndefined)
void setContext(const QQmlRefPointer< QQmlContextData > &context)
QQmlEngine * engine() const
virtual QQmlSourceLocation sourceLocation() const
void setScopeObject(QObject *v)
void connect(QObject *source, int sourceSignal, QQmlEngine *engine, bool doNotify=true)
static QString signalParameterStringForJS(QV4::ExecutionEngine *engine, const QList< QByteArray > ¶meterNameList, QString *errorString=nullptr)
int originalClone(int index) const
QQmlPropertyObserver(QQmlBoundSignalExpression *expr)
QQmlRefPointer< T > & adopt(T *)
Takes ownership of other.
\macro QT_RESTRICTED_CAST_FROM_ASCII
static QString fromUtf8(QByteArrayView utf8)
This is an overloaded member function, provided for convenience. It differs from the above function o...
static QString number(int, int base=10)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Combined button and popup list for selecting options.
Scoped< ExecutionContext > ScopedContext
DBusConnection const char DBusError DBusBusType DBusError return DBusConnection DBusHandleMessageFunction function
DBusConnection const char DBusError * error
constexpr const T & qMax(const T &a, const T &b)
GLboolean GLboolean GLboolean GLboolean a
[7]
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLenum GLenum GLsizei const GLuint GLboolean enabled
GLenum GLenum GLsizei void GLsizei void * column
QQmlContext * qmlContext(const QObject *obj)
void QQmlBoundSignal_callback(QQmlNotifierEndpoint *e, void **a)
Q_QML_EXPORT QQmlInfo qmlWarning(const QObject *me)
QLatin1StringView QLatin1String
#define QStringLiteral(str)
static QT_BEGIN_NAMESPACE void init(QTextBoundaryFinder::BoundaryType type, QStringView str, QCharAttributes *attributes)
#define Q_TRACE_SCOPE(x,...)
#define Q_TRACE_POINT(provider, tracepoint,...)
\inmodule QtCore \reentrant
static Heap::QmlContext * create(QV4::ExecutionContext *parent, QQmlRefPointer< QQmlContextData > context, QObject *scopeObject)