Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
f8531cc8
Commit
f8531cc8
authored
Jun 29, 2009
by
Roberto Raggi
Browse files
Merge the environment from the previous parse.
parent
02de7907
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/libs/cplusplus/FastPreprocessor.cpp
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
))
{
...
...
src/libs/cplusplus/FastPreprocessor.h
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
&
)
{}
...
...
Write
Preview
Supports
Markdown
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