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
Tobias Hunger
qt-creator
Commits
a86ea403
Commit
a86ea403
authored
Jun 30, 2010
by
Christian Kamm
Browse files
C++: Fix range(tokenIndex) function in CppQuickFixOperation.
parent
82cc4b43
Changes
1
Show whitespace changes
Inline
Side-by-side
src/plugins/cppeditor/cppquickfix.cpp
View file @
a86ea403
...
...
@@ -926,7 +926,10 @@ int CppQuickFixOperation::match(TextEditor::QuickFixState *state)
Utils
::
ChangeSet
::
Range
CppQuickFixOperation
::
range
(
unsigned
tokenIndex
)
const
{
const
CPlusPlus
::
Token
&
token
=
tokenAt
(
tokenIndex
);
return
Utils
::
ChangeSet
::
Range
(
token
.
begin
(),
token
.
end
());
unsigned
line
,
column
;
_document
->
translationUnit
()
->
getPosition
(
token
.
begin
(),
&
line
,
&
column
);
const
int
start
=
editor
()
->
document
()
->
findBlockByNumber
(
line
-
1
).
position
()
+
column
-
1
;
return
Utils
::
ChangeSet
::
Range
(
start
,
start
+
token
.
length
());
}
Utils
::
ChangeSet
::
Range
CppQuickFixOperation
::
range
(
CPlusPlus
::
AST
*
ast
)
const
...
...
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