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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Tobias Hunger
qt-creator
Commits
f8531cc8
Commit
f8531cc8
authored
Jun 29, 2009
by
Roberto Raggi
Browse files
Options
Downloads
Patches
Plain Diff
Merge the environment from the previous parse.
parent
02de7907
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/libs/cplusplus/FastPreprocessor.cpp
+10
-0
10 additions, 0 deletions
src/libs/cplusplus/FastPreprocessor.cpp
src/libs/cplusplus/FastPreprocessor.h
+1
-2
1 addition, 2 deletions
src/libs/cplusplus/FastPreprocessor.h
with
11 additions
and
2 deletions
src/libs/cplusplus/FastPreprocessor.cpp
+
10
−
0
View file @
f8531cc8
...
@@ -38,10 +38,20 @@ FastPreprocessor::FastPreprocessor(const Snapshot &snapshot)
...
@@ -38,10 +38,20 @@ FastPreprocessor::FastPreprocessor(const Snapshot &snapshot)
QByteArray
FastPreprocessor
::
run
(
QString
fileName
,
const
QString
&
source
)
QByteArray
FastPreprocessor
::
run
(
QString
fileName
,
const
QString
&
source
)
{
{
if
(
Document
::
Ptr
doc
=
_snapshot
.
value
(
fileName
))
{
_merged
.
insert
(
fileName
);
foreach
(
const
Document
::
Include
&
i
,
doc
->
includes
())
mergeEnvironment
(
i
.
fileName
());
}
const
QByteArray
preprocessed
=
_preproc
(
fileName
,
source
);
const
QByteArray
preprocessed
=
_preproc
(
fileName
,
source
);
return
preprocessed
;
return
preprocessed
;
}
}
void
FastPreprocessor
::
sourceNeeded
(
QString
&
fileName
,
IncludeType
,
unsigned
)
{
mergeEnvironment
(
fileName
);
}
void
FastPreprocessor
::
mergeEnvironment
(
const
QString
&
fileName
)
void
FastPreprocessor
::
mergeEnvironment
(
const
QString
&
fileName
)
{
{
if
(
!
_merged
.
contains
(
fileName
))
{
if
(
!
_merged
.
contains
(
fileName
))
{
...
...
This diff is collapsed.
Click to expand it.
src/libs/cplusplus/FastPreprocessor.h
+
1
−
2
View file @
f8531cc8
...
@@ -54,8 +54,7 @@ public:
...
@@ -54,8 +54,7 @@ public:
QByteArray
run
(
QString
fileName
,
const
QString
&
source
);
QByteArray
run
(
QString
fileName
,
const
QString
&
source
);
// CPlusPlus::Client
// CPlusPlus::Client
virtual
void
sourceNeeded
(
QString
&
fileName
,
IncludeType
,
unsigned
)
virtual
void
sourceNeeded
(
QString
&
fileName
,
IncludeType
,
unsigned
);
{
mergeEnvironment
(
fileName
);
}
virtual
void
macroAdded
(
const
Macro
&
)
{}
virtual
void
macroAdded
(
const
Macro
&
)
{}
...
...
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
sign in
to comment