diff options
Diffstat (limited to 'src/qml/qml/qqmlboundsignal.cpp')
-rw-r--r-- | src/qml/qml/qqmlboundsignal.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/qml/qml/qqmlboundsignal.cpp b/src/qml/qml/qqmlboundsignal.cpp index da81244f18..0bac2f45a2 100644 --- a/src/qml/qml/qqmlboundsignal.cpp +++ b/src/qml/qml/qqmlboundsignal.cpp @@ -24,6 +24,10 @@ QT_BEGIN_NAMESPACE +Q_TRACE_POINT(qtqml, QQmlHandlingSignal_entry, const QQmlEngine *engine, const QString &function, + const QString &fileName, int line, int column) +Q_TRACE_POINT(qtqml, QQmlHandlingSignal_exit) + QQmlBoundSignalExpression::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, const QString ¶meterString) @@ -58,7 +62,8 @@ QQmlBoundSignalExpression::QQmlBoundSignalExpression(const QObject *target, int function += QLatin1String(") { ") + expression + QLatin1String(" })"); QV4::Scope valueScope(v4); - QV4::ScopedFunctionObject f(valueScope, evalFunction(context(), scopeObject(), function, fileName, line)); + QV4::Scoped<QV4::JavaScriptFunctionObject> f( + valueScope, evalFunction(context(), scopeObject(), function, fileName, line)); QV4::ScopedContext context(valueScope, f->scope()); setupFunction(context, f->function()); } @@ -103,7 +108,7 @@ QQmlBoundSignalExpression::QQmlBoundSignalExpression(const QObject *target, int // we need to run the outer function to get the nested one. if (function->isClosureWrapper()) { bool isUndefined = false; - QV4::ScopedFunctionObject result( + QV4::Scoped<QV4::JavaScriptFunctionObject> result( valueScope, QQmlJavaScriptExpression::evaluate(&isUndefined)); Q_ASSERT(!isUndefined); @@ -175,7 +180,7 @@ void QQmlBoundSignalExpression::evaluate(void **a) QMetaObjectPrivate::signal(targetMeta, m_index).methodIndex()); int argCount = metaMethod.parameterCount(); - QQmlMetaObject::ArgTypeStorage storage; + QQmlMetaObject::ArgTypeStorage<9> storage; storage.reserve(argCount + 1); storage.append(QMetaType()); // We're not interested in the return value for (int i = 0; i < argCount; ++i) { @@ -183,7 +188,7 @@ void QQmlBoundSignalExpression::evaluate(void **a) if (!type.isValid()) argCount = 0; else if (type.flags().testFlag(QMetaType::IsEnumeration)) - storage.append(QMetaType::fromType<int>()); + storage.append(type.underlyingType()); else storage.append(type); } |