Skip to content
GitLab
Menu
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
fbd624d1
Commit
fbd624d1
authored
Jan 26, 2010
by
Roberto Raggi
Browse files
Update the ranges also for recovered ASTs.
parent
521c69a7
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/plugins/qmljseditor/qmljseditor.cpp
View file @
fbd624d1
...
...
@@ -535,26 +535,30 @@ void QmlJSTextEditor::onDocumentUpdated(QmlJS::Document::Ptr doc)
m_idsRevision
=
document
()
->
revision
();
m_ids
=
updateIds
(
doc
->
qmlProgram
());
if
(
doc
->
isParsedCorrectly
())
{
// create the ranges
if
(
doc
->
ast
())
{
// got a correctly parsed (or recovered) file.
// create the ranges and update the semantic info.
CreateRanges
createRanges
;
SemanticInfo
sem
;
sem
.
document
=
doc
;
sem
.
ranges
=
createRanges
(
document
(),
doc
);
m_semanticInfo
=
sem
;
FindDeclarations
findDeclarations
;
m_declarations
=
findDeclarations
(
doc
->
ast
());
if
(
doc
->
isParsedCorrectly
())
{
FindDeclarations
findDeclarations
;
m_declarations
=
findDeclarations
(
doc
->
ast
());
QStringList
items
;
items
.
append
(
tr
(
"<Select Symbol>"
));
QStringList
items
;
items
.
append
(
tr
(
"<Select Symbol>"
));
foreach
(
Declaration
decl
,
m_declarations
)
items
.
append
(
decl
.
text
);
foreach
(
Declaration
decl
,
m_declarations
)
items
.
append
(
decl
.
text
);
m_methodCombo
->
clear
();
m_methodCombo
->
addItems
(
items
);
updateMethodBoxIndex
();
m_methodCombo
->
clear
();
m_methodCombo
->
addItems
(
items
);
updateMethodBoxIndex
();
}
}
QList
<
QTextEdit
::
ExtraSelection
>
selections
;
...
...
Write
Preview
Supports
Markdown
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