Skip to content
GitLab
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
99b2020c
Commit
99b2020c
authored
Jun 02, 2010
by
Roberto Raggi
Browse files
Check the type of the token that triggered the completion.
parent
ffa66f4f
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/plugins/cpptools/cppcodecompletion.cpp
View file @
99b2020c
...
...
@@ -634,8 +634,10 @@ int CppCodeCompletion::startPosition() const
bool
CppCodeCompletion
::
triggersCompletion
(
TextEditor
::
ITextEditable
*
editor
)
{
const
int
pos
=
editor
->
position
();
if
(
startOfOperator
(
editor
,
pos
,
/*token =*/
0
,
/*want function call=*/
true
)
!=
pos
)
{
if
(
m_completionOperator
==
T_POUND
)
{
unsigned
token
=
T_EOF_SYMBOL
;
if
(
startOfOperator
(
editor
,
pos
,
&
token
,
/*want function call=*/
true
)
!=
pos
)
{
if
(
token
==
T_POUND
)
{
if
(
TextEditor
::
BaseTextEditor
*
edit
=
qobject_cast
<
TextEditor
::
BaseTextEditor
*>
(
editor
->
widget
()))
{
QTextCursor
tc
(
edit
->
document
());
tc
.
setPosition
(
pos
);
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment