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
494f0764
Commit
494f0764
authored
Apr 06, 2009
by
Thorbjørn Lindeijer
Browse files
Fix the navigation links on Ctrl-hover
Link position had the wrong offset. Also took out a redundant check on token kind.
parent
733fb8fb
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/plugins/cppeditor/cppeditor.cpp
View file @
494f0764
...
...
@@ -625,11 +625,6 @@ CPPEditor::Link CPPEditor::findLinkAt(const QTextCursor &cursor,
QTextBlock
block
;
const
SimpleToken
tk
=
tokenUnderCursor
(
tc
,
&
block
);
if
(
tk
.
isLiteral
()
||
tk
.
isComment
())
{
// Drop out if we're at a number, string or comment
return
link
;
}
if
(
tk
.
isNot
(
T_IDENTIFIER
))
return
link
;
...
...
@@ -668,7 +663,7 @@ CPPEditor::Link CPPEditor::findLinkAt(const QTextCursor &cursor,
def
=
findDefinition
(
symbol
);
link
=
linkToSymbol
(
def
?
def
:
symbol
);
link
.
pos
=
nameStart
;
link
.
pos
=
block
.
position
()
+
nameStart
;
link
.
length
=
nameLength
;
return
link
;
...
...
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