forked from qt-creator/qt-creator
QmlJS: Set correct scope in signal handlers.
This means the code model will now offer correct completion and
highlighting for arguments of signals in their handlers, example:
MouseArea {
onClicked: {
mou<complete> // now also completes 'mouse'
}
}
Reviewed-by: Fawzi Mohamed
Change-Id: I01838ef00e391b13e6e5a832c9ec3cd983689c5b
Reviewed-on: http://codereview.qt-project.org/6147
Reviewed-by: Christian Kamm <christian.d.kamm@nokia.com>
Sanity-Review: Christian Kamm <christian.d.kamm@nokia.com>
This commit is contained in:
@@ -187,6 +187,12 @@ void ScopeChain::setJsScopes(const QList<const ObjectValue *> &jsScopes)
|
||||
m_jsScopes = jsScopes;
|
||||
}
|
||||
|
||||
void ScopeChain::appendJsScope(const ObjectValue *scope)
|
||||
{
|
||||
m_modified = true;
|
||||
m_jsScopes += scope;
|
||||
}
|
||||
|
||||
QList<const ObjectValue *> ScopeChain::all() const
|
||||
{
|
||||
if (m_modified)
|
||||
|
||||
Reference in New Issue
Block a user