diff options
author | Kent Hansen <kent.hansen@nokia.com> | 2012-07-13 13:15:09 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-07-13 19:47:34 +0200 |
commit | d08de20171c0df99513514af050372fc1aee8720 (patch) | |
tree | c6a9e62706fac3f40539d2f183d3d5b8e105fc14 /src/script/bridge/qscriptqobject_p.h | |
parent | db17c14cace450e20745839014075c0263f8618f (diff) | |
download | qtscript-d08de20171c0df99513514af050372fc1aee8720.tar.gz |
Fix QScriptContextInfo::functionMetaIndex() for overloaded slots
This was a regression against the pre-JavaScriptCore
implementation, where we used to store the selected method index as
an internal member of the QScriptContext(Private). But in the
JSC-based implementation, QScriptContext is implemented as a
pointer to a JSC::CallFrame, and there are no unused fields in
CallFrame where the method index can be stashed.
Refactor the Qt method call logic so that the method selection is
separate from the actual processing of the target method. This way,
QScriptContextInfo can compute the method index the same way that
the actual method call did.
Task-number: QTBUG-6133
Change-Id: I619fa8b91542d0b6ab5a44b00266cc0705c95823
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Diffstat (limited to 'src/script/bridge/qscriptqobject_p.h')
-rw-r--r-- | src/script/bridge/qscriptqobject_p.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/script/bridge/qscriptqobject_p.h b/src/script/bridge/qscriptqobject_p.h index c6ebc8a..55ed0f7 100644 --- a/src/script/bridge/qscriptqobject_p.h +++ b/src/script/bridge/qscriptqobject_p.h @@ -225,6 +225,7 @@ public: QObject *qobject() const; const QMetaObject *metaObject() const; int initialIndex() const; + int specificIndex(const QScriptContext *context) const; bool maybeOverloaded() const; int mostGeneralMethod(QMetaMethod *out = 0) const; QList<int> overloadedIndexes() const; |