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
99b2020c
Commit
99b2020c
authored
14 years ago
by
Roberto Raggi
Browse files
Options
Downloads
Patches
Plain Diff
Check the type of the token that triggered the completion.
parent
ffa66f4f
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/plugins/cpptools/cppcodecompletion.cpp
+4
-2
4 additions, 2 deletions
src/plugins/cpptools/cppcodecompletion.cpp
with
4 additions
and
2 deletions
src/plugins/cpptools/cppcodecompletion.cpp
+
4
−
2
View file @
99b2020c
...
@@ -634,8 +634,10 @@ int CppCodeCompletion::startPosition() const
...
@@ -634,8 +634,10 @@ int CppCodeCompletion::startPosition() const
bool
CppCodeCompletion
::
triggersCompletion
(
TextEditor
::
ITextEditable
*
editor
)
bool
CppCodeCompletion
::
triggersCompletion
(
TextEditor
::
ITextEditable
*
editor
)
{
{
const
int
pos
=
editor
->
position
();
const
int
pos
=
editor
->
position
();
if
(
startOfOperator
(
editor
,
pos
,
/*token =*/
0
,
/*want function call=*/
true
)
!=
pos
)
{
unsigned
token
=
T_EOF_SYMBOL
;
if
(
m_completionOperator
==
T_POUND
)
{
if
(
startOfOperator
(
editor
,
pos
,
&
token
,
/*want function call=*/
true
)
!=
pos
)
{
if
(
token
==
T_POUND
)
{
if
(
TextEditor
::
BaseTextEditor
*
edit
=
qobject_cast
<
TextEditor
::
BaseTextEditor
*>
(
editor
->
widget
()))
{
if
(
TextEditor
::
BaseTextEditor
*
edit
=
qobject_cast
<
TextEditor
::
BaseTextEditor
*>
(
editor
->
widget
()))
{
QTextCursor
tc
(
edit
->
document
());
QTextCursor
tc
(
edit
->
document
());
tc
.
setPosition
(
pos
);
tc
.
setPosition
(
pos
);
...
...
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