Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Tobias Hunger
qt-creator
Commits
68be307b
Commit
68be307b
authored
Jul 16, 2010
by
Christian Kamm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
QmlJS: Use LookupContext in findLinkAt.
parent
d292eca5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
12 deletions
+3
-12
src/plugins/qmljseditor/qmljseditor.cpp
src/plugins/qmljseditor/qmljseditor.cpp
+3
-12
No files found.
src/plugins/qmljseditor/qmljseditor.cpp
View file @
68be307b
...
...
@@ -35,14 +35,10 @@
#include "qmloutlinemodel.h"
#include <qmljs/qmljsindenter.h>
#include <qmljs/qmljsinterpreter.h>
#include <qmljs/qmljsbind.h>
#include <qmljs/qmljscheck.h>
#include <qmljs/qmljsevaluate.h>
#include <qmljs/qmljsdocument.h>
#include <qmljs/qmljslink.h>
#include <qmljs/qmljsscopebuilder.h>
#include <qmljs/qmljsicontextpane.h>
#include <qmljs/qmljslookupcontext.h>
#include <qmljs/parser/qmljsastvisitor_p.h>
#include <qmljs/parser/qmljsast_p.h>
#include <qmljs/parser/qmljsengine_p.h>
...
...
@@ -1230,14 +1226,9 @@ TextEditor::BaseTextEditor::Link QmlJSTextEditor::findLinkAt(const QTextCursor &
AST
::
Node
*
node
=
semanticInfo
.
nodeUnderCursor
(
cursorPosition
);
Interpreter
::
Engine
interp
;
Interpreter
::
Context
context
(
&
interp
);
QmlJS
::
Link
linkedSnapshot
(
&
context
,
semanticInfo
.
document
,
semanticInfo
.
snapshot
,
m_modelManager
->
importPaths
());
ScopeBuilder
scopeBuilder
(
semanticInfo
.
document
,
&
context
);
scopeBuilder
.
push
(
semanticInfo
.
astPath
(
cursorPosition
));
LookupContext
::
Ptr
lookupContext
=
LookupContext
::
create
(
semanticInfo
.
document
,
semanticInfo
.
snapshot
,
semanticInfo
.
astPath
(
cursorPosition
));
const
Interpreter
::
Value
*
value
=
lookupContext
->
evaluate
(
node
);
Evaluate
check
(
&
context
);
const
Interpreter
::
Value
*
value
=
check
.
reference
(
node
);
QString
fileName
;
int
line
=
0
,
column
=
0
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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