Skip to content
GitLab
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
081f27e3
Commit
081f27e3
authored
Feb 11, 2010
by
Oswald Buddenhagen
Browse files
process second arg of include()
parent
07abc847
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/shared/proparser/profileevaluator.cpp
View file @
081f27e3
...
...
@@ -2698,18 +2698,29 @@ ProItem::ProItemReturn ProFileEvaluator::Private::evaluateConditionalFunction(
if
((
args
.
count
()
==
2
)
||
(
args
.
count
()
==
3
)
)
{
parseInto
=
args
[
1
];
}
else
if
(
args
.
count
()
!=
1
)
{
logMessage
(
format
(
"include(file) requires one, two or three arguments."
));
logMessage
(
format
(
"include(file
, into, silent
) requires one, two or three arguments."
));
return
ProItem
::
ReturnFalse
;
}
State
sts
=
m_sts
;
bool
ok
=
evaluateFile
(
resolvePath
(
expandEnvVars
(
args
.
first
())));
m_sts
=
sts
;
QString
fn
=
resolvePath
(
expandEnvVars
(
args
.
first
()));
bool
ok
;
if
(
parseInto
.
isEmpty
())
{
State
sts
=
m_sts
;
ok
=
evaluateFile
(
fn
);
m_sts
=
sts
;
}
else
{
QHash
<
QString
,
QStringList
>
symbols
;
if
((
ok
=
evaluateFileInto
(
fn
,
&
symbols
,
0
)))
for
(
QHash
<
QString
,
QStringList
>::
ConstIterator
it
=
symbols
.
constBegin
();
it
!=
symbols
.
constEnd
();
++
it
)
if
(
!
it
.
key
().
startsWith
(
QLatin1Char
(
'.'
)))
m_valuemapStack
.
top
().
insert
(
parseInto
+
QLatin1Char
(
'.'
)
+
it
.
key
(),
it
.
value
());
}
return
returnBool
(
ok
);
}
case
T_LOAD
:
{
if
(
m_skipLevel
&&
!
m_cumulative
)
return
ProItem
::
ReturnFalse
;
QString
parseInto
;
bool
ignore_error
=
false
;
if
(
args
.
count
()
==
2
)
{
QString
sarg
=
args
[
1
];
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment