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
F
flatpak-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
Marco Bubke
flatpak-qt-creator
Commits
6ea5fdcd
Commit
6ea5fdcd
authored
Sep 07, 2009
by
Roberto Raggi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Speed up the search of a reference to a name.
parent
63cd7ffe
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
src/plugins/cpptools/cppfindreferences.cpp
src/plugins/cpptools/cppfindreferences.cpp
+9
-6
No files found.
src/plugins/cpptools/cppfindreferences.cpp
View file @
6ea5fdcd
...
...
@@ -223,6 +223,8 @@ static void find_helper(QFutureInterface<Core::Utils::FileSearchResult> &future,
future
.
setProgressRange
(
0
,
files
.
size
());
const
QByteArray
literal
=
word
.
toLatin1
();
tm
.
start
();
for
(
int
i
=
0
;
i
<
files
.
size
();
++
i
)
{
const
QString
&
fn
=
files
.
at
(
i
);
...
...
@@ -234,14 +236,15 @@ static void find_helper(QFutureInterface<Core::Utils::FileSearchResult> &future,
const
QString
source
=
QTextStream
(
&
f
).
readAll
();
const
QByteArray
preprocessedCode
=
snapshot
.
preprocessedCode
(
source
,
fn
);
Document
::
Ptr
doc
=
snapshot
.
documentFromSource
(
preprocessedCode
,
fn
);
doc
->
check
();
doc
->
tokenize
();
Control
*
control
=
doc
->
control
();
Identifier
*
id
=
control
->
findOrInsertIdentifier
(
word
.
toLatin1
().
constData
());
TranslationUnit
*
unit
=
doc
->
translationUnit
();
Process
process
(
future
,
doc
,
snapshot
);
process
(
id
,
unit
->
ast
());
if
(
Identifier
*
id
=
control
->
findIdentifier
(
literal
.
constData
(),
literal
.
size
()))
{
doc
->
check
();
TranslationUnit
*
unit
=
doc
->
translationUnit
();
Process
process
(
future
,
doc
,
snapshot
);
process
(
id
,
unit
->
ast
());
}
}
future
.
setProgressValue
(
files
.
size
());
}
...
...
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