Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Q
qt-creator
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tobias Hunger
qt-creator
Commits
1395b87f
Commit
1395b87f
authored
Oct 05, 2009
by
Roberto Raggi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Introduced an overload of reportResult() that can deal with strong and weak results.
parent
6ccc08fb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
11 deletions
+14
-11
src/plugins/cpptools/cppfindreferences.cpp
src/plugins/cpptools/cppfindreferences.cpp
+14
-11
No files found.
src/plugins/cpptools/cppfindreferences.cpp
View file @
1395b87f
...
...
@@ -115,6 +115,14 @@ protected:
}
void
reportResult
(
unsigned
tokenIndex
,
const
QList
<
Symbol
*>
&
candidates
)
{
const
bool
isStrongResult
=
checkCandidates
(
candidates
);
if
(
isStrongResult
)
reportResult
(
tokenIndex
);
}
void
reportResult
(
unsigned
tokenIndex
)
{
const
Token
&
tk
=
tokenAt
(
tokenIndex
);
...
...
@@ -130,7 +138,7 @@ protected:
if
(
_future
)
_future
->
reportResult
(
Utils
::
FileSearchResult
(
QDir
::
toNativeSeparators
(
_doc
->
fileName
()),
line
,
lineText
,
col
,
len
));
line
,
lineText
,
col
,
len
));
_references
.
append
(
tokenIndex
);
}
...
...
@@ -197,8 +205,7 @@ protected:
if
(
identifier
(
simple
->
identifier_token
)
==
_id
)
{
LookupContext
context
=
currentContext
(
ast
);
const
QList
<
Symbol
*>
candidates
=
context
.
resolve
(
simple
->
name
);
if
(
checkCandidates
(
candidates
))
reportResult
(
simple
->
identifier_token
);
reportResult
(
simple
->
identifier_token
,
candidates
);
}
}
accept
(
ast
->
expression
);
...
...
@@ -262,8 +269,7 @@ protected:
candidates
.
append
(
lastVisibleSymbol
);
}
if
(
checkCandidates
(
candidates
))
reportResult
(
endToken
);
reportResult
(
endToken
,
candidates
);
}
virtual
bool
visit
(
QualifiedNameAST
*
ast
)
...
...
@@ -331,8 +337,7 @@ protected:
if
(
id
==
_id
)
{
LookupContext
context
=
currentContext
(
ast
);
const
QList
<
Symbol
*>
candidates
=
context
.
resolve
(
ast
->
name
);
if
(
checkCandidates
(
candidates
))
reportResult
(
ast
->
identifier_token
);
reportResult
(
ast
->
identifier_token
,
candidates
);
}
return
false
;
...
...
@@ -344,8 +349,7 @@ protected:
if
(
id
==
_id
)
{
LookupContext
context
=
currentContext
(
ast
);
const
QList
<
Symbol
*>
candidates
=
context
.
resolve
(
ast
->
name
);
if
(
checkCandidates
(
candidates
))
reportResult
(
ast
->
identifier_token
);
reportResult
(
ast
->
identifier_token
,
candidates
);
}
return
false
;
...
...
@@ -357,8 +361,7 @@ protected:
if
(
id
==
_id
)
{
LookupContext
context
=
currentContext
(
ast
);
const
QList
<
Symbol
*>
candidates
=
context
.
resolve
(
ast
->
name
);
if
(
checkCandidates
(
candidates
))
reportResult
(
ast
->
identifier_token
);
reportResult
(
ast
->
identifier_token
,
candidates
);
}
return
false
;
...
...
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