Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
42959f8f
Commit
42959f8f
authored
Feb 12, 2010
by
Christian Kamm
Browse files
Remove the lookup into including Qml files in the root scope of a JS file.
parent
7e01c3b5
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/libs/qmljs/qmljslink.cpp
View file @
42959f8f
...
...
@@ -54,13 +54,16 @@ void Link::scopeChainAt(Document::Ptr doc, Node *currentObject)
if
(
const
ObjectValue
*
typeEnvironment
=
_context
->
typeEnvironment
(
doc
.
data
()))
_context
->
pushScope
(
typeEnvironment
);
}
else
{
// add scope chains for all components that source this document
foreach
(
Document
::
Ptr
otherDoc
,
_docs
)
{
if
(
otherDoc
->
bind
()
->
includedScripts
().
contains
(
doc
->
fileName
()))
pushScopeChainForComponent
(
otherDoc
,
&
linkedDocs
);
}
// the global scope of a js file does not see the instantiating component
if
(
currentObject
!=
0
)
{
// add scope chains for all components that source this document
foreach
(
Document
::
Ptr
otherDoc
,
_docs
)
{
if
(
otherDoc
->
bind
()
->
includedScripts
().
contains
(
doc
->
fileName
()))
pushScopeChainForComponent
(
otherDoc
,
&
linkedDocs
);
}
// ### TODO: Which type environment do scripts see?
// ### TODO: Which type environment do scripts see?
}
_context
->
pushScope
(
bind
->
rootObjectValue
());
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment