Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
qt-creator
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Tobias Hunger
qt-creator
Commits
6b504c61
Commit
6b504c61
authored
15 years ago
by
Erik Verbruggen
Browse files
Options
Downloads
Patches
Plain Diff
Changed navigation back for now.
parent
0b2b6f96
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/plugins/duieditor/duieditor.cpp
+25
-25
25 additions, 25 deletions
src/plugins/duieditor/duieditor.cpp
with
25 additions
and
25 deletions
src/plugins/duieditor/duieditor.cpp
+
25
−
25
View file @
6b504c61
...
@@ -716,35 +716,35 @@ TextEditor::BaseTextEditor::Link ScriptEditor::findLinkAt(const QTextCursor &cur
...
@@ -716,35 +716,35 @@ TextEditor::BaseTextEditor::Link ScriptEditor::findLinkAt(const QTextCursor &cur
if
(
!
doc
)
if
(
!
doc
)
return
link
;
return
link
;
// NavigationTokenFinder finder;
NavigationTokenFinder
finder
;
// finder(doc, cursor.position(), snapshot);
finder
(
doc
,
cursor
.
position
(),
snapshot
);
// if (finder.targetFound()) {
if
(
finder
.
targetFound
())
{
// link.fileName = finder.fileName();
link
.
fileName
=
finder
.
fileName
();
// link.pos = finder.linkPosition();
link
.
pos
=
finder
.
linkPosition
();
// link.length = finder.linkLength();
link
.
length
=
finder
.
linkLength
();
if
(
resolveTarget
)
{
link
.
line
=
finder
.
targetLine
();
link
.
column
=
finder
.
targetColumn
()
-
1
;
}
}
// QmlExpressionUnderCursor expressionUnderCursor;
// expressionUnderCursor(cursor, doc->program());
//
//
// if (resolveTarget) {
// QmlLookupContext context(expressionUnderCursor.expressionScopes(),
// link.line = finder.targetLine();
// expressionUnderCursor.expressionNode(),
// link.column = finder.targetColumn() - 1;
// doc, snapshot);
//
// ResolveQmlExpression resolve(context);
// if (QmlLookupContext::Symbol *symbol = resolve(expressionUnderCursor.expressionNode())) {
// if (UiObjectMember *member = static_cast<UiObjectMember *>(symbol)) { // ### FIXME: don't use static_cast<>
// const int begin = member->firstSourceLocation().begin();
// const int end = member->lastSourceLocation().end();
// qDebug() << doc->source().mid(begin, end - begin);
// }
// }
// }
// }
QmlExpressionUnderCursor
expressionUnderCursor
;
expressionUnderCursor
(
cursor
,
doc
->
program
());
QmlLookupContext
context
(
expressionUnderCursor
.
expressionScopes
(),
expressionUnderCursor
.
expressionNode
(),
doc
,
snapshot
);
ResolveQmlExpression
resolve
(
context
);
if
(
QmlLookupContext
::
Symbol
*
symbol
=
resolve
(
expressionUnderCursor
.
expressionNode
()))
{
if
(
UiObjectMember
*
member
=
static_cast
<
UiObjectMember
*>
(
symbol
))
{
// ### FIXME: don't use static_cast<>
const
int
begin
=
member
->
firstSourceLocation
().
begin
();
const
int
end
=
member
->
lastSourceLocation
().
end
();
qDebug
()
<<
doc
->
source
().
mid
(
begin
,
end
-
begin
);
}
}
return
link
;
return
link
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment