diff options
Diffstat (limited to 'src/qml/qml/qqmlboundsignal_p.h')
-rw-r--r-- | src/qml/qml/qqmlboundsignal_p.h | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/src/qml/qml/qqmlboundsignal_p.h b/src/qml/qml/qqmlboundsignal_p.h index 910e1e3f1e..ffb3d06770 100644 --- a/src/qml/qml/qqmlboundsignal_p.h +++ b/src/qml/qml/qqmlboundsignal_p.h @@ -70,18 +70,16 @@ class Q_QML_PRIVATE_EXPORT QQmlBoundSignalExpression : public QQmlAbstractExpres { public: QQmlBoundSignalExpression(QObject *target, int index, - QQmlContextData *ctxt, QObject *scope, const QByteArray &expression, - bool isRewritten, const QString &fileName, quint16 line, quint16 column); - QQmlBoundSignalExpression(QObject *target, int index, QQmlContextData *ctxt, QObject *scope, const QString &expression, - bool isRewritten, const QString &fileName, quint16 line, quint16 column); + const QString &fileName, quint16 line, quint16 column, + const QString &handlerName = QString(), + const QString ¶meterString = QString()); + // "inherited" from QQmlJavaScriptExpression. static QString expressionIdentifier(QQmlJavaScriptExpression *); static void expressionChanged(QQmlJavaScriptExpression *); - void setParameterCountForJS(int count) { m_parameterCountForJS = count; } - // evaluation of a bound signal expression doesn't return any value void evaluate(void **a); @@ -97,27 +95,23 @@ private: ~QQmlBoundSignalExpression(); void init(QQmlContextData *ctxt, QObject *scope); - bool hasParameterInfo() const { return m_parameterCountForJS > 0; } - v8::Persistent<v8::Object> m_v8qmlscope; - v8::Persistent<v8::Function> m_v8function; + QV4::PersistentValue m_v8qmlscope; + QV4::PersistentValue m_v8function; - //either expressionUtf8 or expression will be used (but not both). - //once m_v8function is valid, we clear both expressions, and + QString m_handlerName; + QString m_parameterString; + //once m_v8function is valid, we clear expression and //extract it from m_v8function if needed. - QByteArray m_expressionUtf8; QString m_expression; //only used when expression needs to be rewritten QString m_fileName; quint16 m_line; quint16 m_column; - int m_parameterCountForJS; - QObject *m_target; int m_index; bool m_expressionFunctionValid:1; - bool m_expressionFunctionRewritten:1; bool m_invalidParameterName:1; }; |