Commit 87f49ab3 authored by Christian Kamm's avatar Christian Kamm
Browse files

QmlJS: Fix scoping for non-js files without scope objects.



For instance the Connections and ListModel elements have their scope
objects cleared but should still see the instantiating component chain.

Change-Id: I6fe48d77e4a99bbae2b7faa3ed38669832ccaa6a
Reviewed-by: default avatarLeandro Melo <leandro.melo@nokia.com>
parent e1d1c9e6
......@@ -259,7 +259,7 @@ void ScopeChain::update() const
m_all += m_cppContextProperties;
// the root scope in js files doesn't see instantiating components
if (m_jsScopes.count() != 1 || !m_qmlScopeObjects.isEmpty()) {
if (m_document->language() != Document::JavaScriptLanguage || m_jsScopes.count() != 1) {
if (m_qmlComponentScope) {
foreach (const QmlComponentChain *parent, m_qmlComponentScope->instantiatingComponents())
collectScopes(parent, &m_all);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment